summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/netqmail/APKBUILD26
-rw-r--r--user/netqmail/netqmail.initd10
-rw-r--r--user/netqmail/smtpd-notls.run4
-rw-r--r--user/netqmail/smtpd.run4
4 files changed, 20 insertions, 24 deletions
diff --git a/user/netqmail/APKBUILD b/user/netqmail/APKBUILD
index a450db304..cc91b3b2a 100644
--- a/user/netqmail/APKBUILD
+++ b/user/netqmail/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=netqmail
pkgver=1.06
-pkgrel=8
+pkgrel=9
pkgdesc="The qmail mail transfer agent (community version)"
url="http://www.netqmail.org/"
arch="all"
@@ -58,15 +58,9 @@ makeservicedir()
echo 200 > "$1"/env/TLS_GID
echo /etc/ssl/certs > "$1"/env/CADIR
fi
- if test $5 -eq 6 ; then
- mkdir -p -m 0755 "$1"/data/rules/ip6/::_0
- touch "$1"/data/rules/ip6/::_0/allow
- sed -i -e 's/s6-tcpserver /s6-tcpserver6 /' "$1"/run
- elif test $5 -eq 4 ; then
- mkdir -p -m 0755 "$1"/data/rules/ip4/0.0.0.0_0
- touch "$1"/data/rules/ip4/0.0.0.0_0/allow
- sed -i -e 's/s6-tcpserver /s6-tcpserver4 /' "$1"/run
- fi
+ mkdir -p -m 0755 "$1"/data/rules/ip6/::_0
+ mkdir -p -m 0755 "$1"/data/rules/ip4/0.0.0.0_0
+ touch "$1"/data/rules/ip6/::_0/allow "$1"/data/rules/ip4/0.0.0.0_0/allow
fi
chmod 0755 "$1"/run "$1"/log/run
}
@@ -101,10 +95,8 @@ package() {
echo 255 > "$pkgdir"/var/qmail/control/concurrencylocal
echo 255 > "$pkgdir"/var/qmail/control/concurrencyremote
makeservicedir "$pkgdir"/var/qmail/services/qmail 7 "$srcdir"/qmail.run 'n20 s1000000 /var/log/qmail' 0 false
- makeservicedir "$pkgdir"/etc/qmail/services/smtpd4-skeleton 3 "$srcdir"/smtpd.run '/var/log/smtpd-$IP' 4 true
- makeservicedir "$pkgdir"/etc/qmail/services/smtpd6-skeleton 3 "$srcdir"/smtpd.run '/var/log/smtpd-$IP' 6 true
- makeservicedir "$pkgdir"/etc/qmail/services/smtpd4-skeleton-notls 3 "$srcdir"/smtpd-notls.run '/var/log/smtpd-$IP' 4 false
- makeservicedir "$pkgdir"/etc/qmail/services/smtpd6-skeleton-notls 3 "$srcdir"/smtpd-notls.run '/var/log/smtpd-$IP' 6 false
+ makeservicedir "$pkgdir"/etc/qmail/services/smtpd-skeleton 3 "$srcdir"/smtpd.run '/var/log/smtpd-$IP' 4 true
+ makeservicedir "$pkgdir"/etc/qmail/services/smtpd-skeleton-notls 3 "$srcdir"/smtpd-notls.run '/var/log/smtpd-$IP' 4 false
}
sha512sums="de40a6d8fac502bd785010434d99b99f2c0524e10aea3d0f2a0d35c70fce91e991eb1fb8f20a1276eb56d7e73130ea5e2c178f6075d138af47b28d9ca6e6046b netqmail-1.06.tar.gz
@@ -114,7 +106,7 @@ cbebdc72c7cc5c437531c9277534ae552c6d044a83b36e3f3ce60ab5563c55eb814d6c543cc0997a
b32a8a36c8ab8872abd4f1a117482f064a6d631a6bb2ba75cafe61743bef09f923d26935d9514eec33a7dec5aeb3d0b517d677e55924859d2db5233bc11f9f11 0004-notifyfd.patch
ac8406c1d16ce2e55e47bc83ca6e095833a54de73cecee222cad3fcececa518386b95a11cb0c9c2dcc6851bae28aa539b11069305aa887a291177bf177ee7b01 0005-CVE-2005-1513.patch
954a905bac5e3bc49f180dc0de7f6ee4c4ae8f94dd400ee4b06d3c944f1ff1cfc44bddccb07ae439f2523ad06fcb89023e57d091737da88f836013757794e931 qmail.run
-37d99446cc21e4fe12c6bb78aaff64b93d59935257d660ff31be4a3ebb122a86f3db9afb6f6abc3934fca864eb108469669e4b32b8a4b21ec055d67175f69496 smtpd.run
-9762eb50173f81ecb9b01a958457a60ef4814b4c474afe9976187b84818b69f627583a130e61fed8bfbf9e4859819bae983ebe8f27300d9ae6090a9a6d3b3881 smtpd-notls.run
+8a887769fc8c5e1abbc56b72c913b435874549c213a10219124c554640eff09ace0a00a894907d633bdf424c7f351064b94e9e12635f725edc700db8cbf25ccd smtpd.run
+721f4ae97ca302e6e1a8a8f685aed8542e408f580b51362006b385a48cbbec185080048bc3ef0953d10af1aaa15fa661dced930f321d594cbbcda8fe19f49abb smtpd-notls.run
57c30023fa479b88923712c5688469d61f70af3fc7c0d48eb445696f3b8a67e9279814932539e6958660d4ddecdce3dc804fbbde9613dab74001de25f9ef9bad netqmail.confd
-f634f6118ea7ed1966b59ca7bdb21ca83e30084bebbc362a4de1d58c44cf14560732029e28ae9bea617005729b06d9677f35c2c96ea075f5972d23b4cb021e7f netqmail.initd"
+e19719df558655e0e288bd188ed7669bd1505701680e15612ce66867bda93ea7297ecf70172d7f0245351422c94672c795ea175c3aa3b7a876434fa458bdab68 netqmail.initd"
diff --git a/user/netqmail/netqmail.initd b/user/netqmail/netqmail.initd
index 36e43e74e..1c7552df3 100644
--- a/user/netqmail/netqmail.initd
+++ b/user/netqmail/netqmail.initd
@@ -13,15 +13,19 @@ makesmtpd()
set -e
ip="$1"
ext="$2"
- if s6-tcpserver6-socketbinder -dBb0 -- "$ip" 25 true 2>/dev/null ; then
+
+ if echo "$ip" | grep -qF : ; then
ipv=6
relayfor="$smtprelay6"
- elif s6-tcpserver4-socketbinder -dBb0 -- "$ip" 25 true 2>/dev/null ; then
+ elif echo "$ip" | grep -qF . ; then
ipv=4
relayfor="$smtprelay4"
else
return 1
fi
+ if ! s6-tcpserver-socketbinder -dBb0 -- "$ip" 25 true 2>/dev/null ; then
+ return 1
+ fi
service="smtpd-$ip"
sdir=/run/services/"$service"
@@ -32,7 +36,7 @@ makesmtpd()
chmod 2700 "$logdir"
rm -rf "$sdir"
- cp -a /etc/qmail/services/smtpd"${ipv}"-skeleton"$ext" "$sdir"
+ cp -a /etc/qmail/services/smtpd-skeleton"$ext" "$sdir"
echo "$ip" > "$sdir"/env/IP
echo "$KEYFILE" > "$sdir"/env/KEYFILE
echo "$CERTFILE" > "$sdir"/env/CERTFILE
diff --git a/user/netqmail/smtpd-notls.run b/user/netqmail/smtpd-notls.run
index f29015401..fb30d0706 100644
--- a/user/netqmail/smtpd-notls.run
+++ b/user/netqmail/smtpd-notls.run
@@ -4,6 +4,6 @@ fdmove -c 2 1
s6-envdir env
importas -u IP IP
fdmove 1 3
-s6-tcpserver -v2 -1U -c 255 -- $IP 25
-s6-tcpserver-access -v2 -DRpl0 -t5000 -i data/rules --
+s6-tcpserver -v -1 -U -c 255 -- $IP 25
+s6-tcpserver-access -v2 -Dpl0 -t5000 -i data/rules --
qmail-smtpd
diff --git a/user/netqmail/smtpd.run b/user/netqmail/smtpd.run
index 02884e840..51f06a7e7 100644
--- a/user/netqmail/smtpd.run
+++ b/user/netqmail/smtpd.run
@@ -4,8 +4,8 @@ fdmove -c 2 1
s6-envdir env
importas -u IP IP
fdmove 1 3
-s6-tcpserver -v2 -1 -c 255 -- $IP 25
-s6-tcpserver-access -v2 -DRp -t5000 -i data/rules --
+s6-tcpserver -v -1 -c 255 -- $IP 25
+s6-tcpserver-access -v2 -Dp -t5000 -i data/rules --
s6-ucspitlsd -v2 -K30000 --
s6-applyuidgid -Uz --
smtpd-starttls-proxy-io