Ticket #13972: qmail-smtpd-run

File qmail-smtpd-run, 1.2 KB (added by compconsultant@…, 17 years ago)
Line 
1#!/bin/sh
2
3export TARPITCOUNT="3"
4export TARPITDELAY="10"
5export MFDNSCHECK=""
6QMAILDUID=`id -u qmaild`
7NOFILESGID=`id -g qmaild`
8MAXSMTPD=`cat /opt/local/var/qmail/control/concurrencyincoming`
9LOCAL=`head -1 /opt/local/var/qmail/control/me`
10
11if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
12  echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
13  echo /opt/local/var/qmail/supervise/qmail-smtpd/run
14  exit 1
15fi
16
17if [ ! -f /opt/local/var/qmail/control/rcpthosts ]; then
18  echo "No /opt/local/var/qmail/control/rcpthosts"
19  echo "Refusing to start SMTP listener because it'll create an open relay"
20  exit 1
21fi
22
23exec /opt/local/sbin/softlimit -m 30000000 \
24  /opt/local/bin/tcpserver -v -R -l "$LOCAL" -x /opt/local/etc/tcp.smtp.cdb -c "$MAXSMTPD" \
25  -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
26  /opt/local/bin/rblsmtpd -t 300 \
27  -b -r l1.spews.dnsbl.sorbs.net \
28  -b -r misc.dnsbl.sorbs.net \
29  -b -r http.dnsbl.sorbs.net \
30  -b -r socks.dnsbl.sorbs.net \
31  -b -r smtp.dnsbl.sorbs.net \
32  -b -r web.dnsbl.sorbs.net \
33  -b -r zombie.dnsbl.sorbs.net \
34  -b -r dul.dnsbl.sorbs.net \
35  -b -r rhsbl.sorbs.net \
36  -b -r sbl-xbl.spamhaus.org \
37  /opt/local/bin/fixcrio /opt/local/var/qmail/bin/qmail-smtpd 2>&1