1 | #!/bin/sh |
---|
2 | |
---|
3 | QMAILDUID=`id -u qmaild` |
---|
4 | NOFILESGID=`id -g qmaild` |
---|
5 | MAXSMTPD=`cat @PREFIX@/var/qmail/control/concurrencyincoming` |
---|
6 | LOCAL=`head -1 @PREFIX@/var/qmail/control/me` |
---|
7 | |
---|
8 | if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then |
---|
9 | echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in |
---|
10 | echo @PREFIX@/var/qmail/supervise/qmail-smtpd/run |
---|
11 | exit 1 |
---|
12 | fi |
---|
13 | |
---|
14 | if [ ! -f @PREFIX@/var/qmail/control/rcpthosts ]; then |
---|
15 | echo "No @PREFIX@/var/qmail/control/rcpthosts" |
---|
16 | echo "Refusing to start SMTP listener because it'll create an open relay" |
---|
17 | exit 1 |
---|
18 | fi |
---|
19 | |
---|
20 | exec @PREFIX@/sbin/softlimit -m 30000000 \ |
---|
21 | @PREFIX@/bin/tcpserver -v -R -l "$LOCAL" -x @PREFIX@/etc/tcp.smtp.cdb -c "$MAXSMTPD" \ |
---|
22 | -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \ |
---|
23 | @PREFIX@/bin/rblsmtpd -t 300 \ |
---|
24 | -b -r safe.dnsbl.sorbs.net \ |
---|
25 | -b -r zen.spamhaus.org \ |
---|
26 | @PREFIX@/bin/fixcrio @PREFIX@/var/qmail/bin/qmail-smtpd 2>&1 |
---|