1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 # Contributor: T.J. Townsend <blakkheim@archlinux.org>
4 # Contributor: Sébastien Luttringer
5 # Contributor: parchd <parchd@archlinux.info>
10 pkgdesc="Free implementation of the server-side SMTP protocol"
12 url="https://www.opensmtpd.org/"
14 depends=(libevent libressl pam libxcrypt zlib)
15 optdepends=('opensmtpd-filter-rspamd: rspamd integration')
16 provides=(smtp-server smtp-forwarder)
17 conflicts=(smtp-server smtp-forwarder)
18 backup=(etc/smtpd/smtpd.conf etc/smtpd/aliases)
20 source=("https://www.opensmtpd.org/archives/${pkgname}-${pkgver}.tar.gz"
24 sha256sums=('51bf05312fe56764748faab9e63170bfbb7c7d84a37c4117b62b2681eb3a4d17'
25 'b38b64f1457b7227d55585edc711cce525e089516d16b093e6c44387380e6b13'
26 'abf5baeb2a87c60d668ad18ea41cc08cab7a4f76339dd6df05de15cdaadaf922'
27 '32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8')
28 install=${pkgname}.install
31 sed -ri 's,/etc/mail,/etc/smtpd,g' ${pkgname}-${pkgver}/usr.sbin/smtpd/smtpd.conf
35 cd ${pkgname}-${pkgver}
39 --sysconfdir=/etc/smtpd \
41 --libexecdir=/usr/lib/smtpd \
42 --with-path-mbox=/var/spool/mail \
43 --with-path-empty=/var/empty \
44 --with-path-socket=/run \
45 --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
46 --with-user-smtpd=smtpd \
47 --with-user-queue=smtpq \
48 --with-group-queue=smtpq \
50 --with-cflags='-I/usr/include/libressl -L/usr/lib/libressl -Wl,-rpath=/usr/lib/libressl'
56 cd ${pkgname}-${pkgver}
58 make DESTDIR="${pkgdir}" install SMTPD_QUEUE_USER=92
60 ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/sendmail
61 ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/mailq
62 ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/newaliases
63 ln -s /usr/bin/smtpctl "${pkgdir}"/usr/bin/makemap
65 install -Dm644 etc/aliases -t "${pkgdir}"/etc/smtpd/
67 install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
69 install -Dm644 ../smtpd.service -t "${pkgdir}"/usr/lib/systemd/system/
70 install -Dm644 ../smtpd.socket -t "${pkgdir}"/usr/lib/systemd/system/
71 install -Dm644 ../opensmtpd.sysusers "${pkgdir}"/usr/lib/sysusers.d/opensmtpd.conf