summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten de Vries2019-05-17 12:15:48 +0200
committerMaarten de Vries2019-05-17 12:29:13 +0200
commit3318a668c9b7b8695d5866cbf92c55fc5bcfc38e (patch)
treef5aefb5d56ae2d22302be3af45cb3be45227e6eb
downloadaur-3318a668c9b7b8695d5866cbf92c55fc5bcfc38e.tar.gz
Initial commit at 6.4.1p2
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD76
-rw-r--r--opensmtpd.sysusers4
-rw-r--r--opensmtpd.tmpfiles2
-rw-r--r--smtpd.conf.patch4
-rw-r--r--smtpd.service11
-rw-r--r--smtpd.socket8
7 files changed, 137 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dd94711a94d9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = opensmtpd-libressl
+ pkgdesc = A FREE implementation of the server-side SMTP protocol. Latest snapshot.
+ pkgver = 6.4.1p2
+ pkgrel = 1
+ url = http://www.opensmtpd.org/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ depends = libressl-side-by-side
+ depends = libevent
+ depends = pam
+ depends = libasr
+ provides = smtp-server
+ provides = smtp-forwarder
+ provides = opensmtpd
+ conflicts = smtp-server
+ conflicts = smtp-forwarder
+ conflicts = opensmtpd
+ options = emptydirs
+ backup = etc/smtpd/smtpd.conf
+ backup = etc/smtpd/aliases
+ source = https://www.opensmtpd.org/archives/opensmtpd-6.4.1p2.tar.gz
+ source = opensmtpd.sysusers
+ source = smtpd.service
+ source = smtpd.socket
+ sha256sums = b69b84934bcc4893ca334504411cd47f86ea04ac5e971a5746d44c473ac5f732
+ sha256sums = b38b64f1457b7227d55585edc711cce525e089516d16b093e6c44387380e6b13
+ sha256sums = abf5baeb2a87c60d668ad18ea41cc08cab7a4f76339dd6df05de15cdaadaf922
+ sha256sums = 32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8
+
+pkgname = opensmtpd-libressl
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..671371dbb53b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Maarten de Vries <maarten@de-vri.es>
+# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
+# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io>
+# Contributor: Sébastien Luttringer
+# Contributor: parchd <parchd@archlinux.info>
+
+pkgname=opensmtpd-libressl
+pkgver=6.4.1p2
+pkgrel=1
+pkgdesc='A FREE implementation of the server-side SMTP protocol. Latest snapshot.'
+arch=('i686' 'x86_64')
+url="http://www.opensmtpd.org/"
+license=('BSD')
+depends=('libressl-side' 'libevent' 'pam' 'libasr')
+provides=('smtp-server' 'smtp-forwarder' 'opensmtpd')
+conflicts=('smtp-server' 'smtp-forwarder' 'opensmtpd')
+backup=("etc/smtpd/smtpd.conf" "etc/smtpd/aliases")
+options=(emptydirs)
+source=(
+ "https://www.opensmtpd.org/archives/opensmtpd-$pkgver.tar.gz"
+ 'opensmtpd.sysusers'
+ 'opensmtpd.tmpfiles'
+ 'smtpd.service'
+ 'smtpd.socket'
+)
+sha256sums=('b69b84934bcc4893ca334504411cd47f86ea04ac5e971a5746d44c473ac5f732'
+ 'b38b64f1457b7227d55585edc711cce525e089516d16b093e6c44387380e6b13'
+ '107bc2a46fa885e355e551cc362dce5ef2362a8f4ad4cb12d6310a7b6d4edb54'
+ '5c0f60d7bcebb1a6d371e7254b20d8ed2cfd79db64b3c3e9a6e992955bd6678f'
+ '32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8')
+
+prepare() {
+ cd "opensmtpd-$pkgver"
+
+ sed -i \
+ -e 's#/etc/mail#/etc/smtpd#g' \
+ -e 's/^listen on localhost$/listen on lo/' \
+ smtpd/smtpd.conf
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/smtpd \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib/smtpd \
+ --with-user-smtpd=smtpd \
+ --with-user-queue=smtpq \
+ --with-group-queue=smtpq \
+ --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
+ --with-cflags='-I/usr/include/libressl -L/usr/lib/libressl -Wl,-rpath=/usr/lib/libressl'
+}
+
+build() {
+ cd "opensmtpd-$pkgver"
+ make
+}
+
+package() {
+ cd "opensmtpd-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+
+ ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/sendmail"
+ ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/mailq"
+ ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/newaliases"
+ ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/makemap"
+
+ # install additional files
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 "$srcdir/opensmtpd.sysusers" "$pkgdir/usr/lib/sysusers.d/opensmtpd.conf"
+ install -Dm644 "$srcdir/opensmtpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/opensmtpd.conf"
+ install -Dm644 "$srcdir/smtpd.service" "$pkgdir/usr/lib/systemd/system/smtpd.service"
+ install -Dm644 "$srcdir/smtpd.socket" "$pkgdir/usr/lib/systemd/system/smtpd.socket"
+
+ # install an empty aliases file (used by the default config)
+ install -Dm644 /dev/null "$pkgdir/etc/smtpd/aliases"
+}
diff --git a/opensmtpd.sysusers b/opensmtpd.sysusers
new file mode 100644
index 000000000000..767a607cd3d7
--- /dev/null
+++ b/opensmtpd.sysusers
@@ -0,0 +1,4 @@
+u smtpd 91 "SMTP Daemon" -
+u smtpq 92 "SMTP Queue" -
+
+m smtpd root
diff --git a/opensmtpd.tmpfiles b/opensmtpd.tmpfiles
new file mode 100644
index 000000000000..21789c31ff04
--- /dev/null
+++ b/opensmtpd.tmpfiles
@@ -0,0 +1,2 @@
+d /var/spool/smtpd 711 root root - -
+d /var/spool/smtpd/offline 770 root smtpq - -
diff --git a/smtpd.conf.patch b/smtpd.conf.patch
new file mode 100644
index 000000000000..6865ee880644
--- /dev/null
+++ b/smtpd.conf.patch
@@ -0,0 +1,4 @@
+5c5
+< listen on localhost
+---
+> listen on lo
diff --git a/smtpd.service b/smtpd.service
new file mode 100644
index 000000000000..78431b4fbb62
--- /dev/null
+++ b/smtpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenSMTPD
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/smtpd -f /etc/smtpd/smtpd.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/smtpd.socket b/smtpd.socket
new file mode 100644
index 000000000000..5d1d105cb57d
--- /dev/null
+++ b/smtpd.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=OpenSMTPD Socket
+
+[Socket]
+ListenStream=/run/smtpd.sock
+
+[Install]
+WantedBy=sockets.target