Ticket #18218: qmail-smtpd-run.in

File qmail-smtpd-run.in, 903 bytes (added by compconsultant@…, 16 years ago)

Goes in files directory, sample configuration file

Line 
1#!/bin/sh
2
3QMAILDUID=`id -u qmaild`
4NOFILESGID=`id -g qmaild`
5MAXSMTPD=`cat @PREFIX@/var/qmail/control/concurrencyincoming`
6LOCAL=`head -1 @PREFIX@/var/qmail/control/me`
7
8if [ -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
12fi
13
14if [ ! -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
18fi
19
20exec @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