-
-
Save drinchev/de5bccf68cc080454c30 to your computer and use it in GitHub Desktop.
qmail start script ( http://www.lifewithqmail.org/lwq.html )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
QMAILDUID=`id -u qmaild` | |
NOFILESGID=`id -g qmaild` | |
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming` | |
LOCAL=`head -1 /var/qmail/control/me` | |
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then | |
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in | |
echo /var/qmail/supervise/qmail-smtpd/run | |
exit 1 | |
fi | |
if [ ! -f /var/qmail/control/rcpthosts ]; then | |
echo "No /var/qmail/control/rcpthosts!" | |
echo "Refusing to start SMTP listener because it'll create an open relay" | |
exit 1 | |
fi | |
# * Changed limit from 2000000 to 5000000 | |
# * Changed path to tcp server from /usr/local/bin to /usr/bin | |
exec /usr/local/bin/softlimit -m 5000000 \ | |
/usr/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \ | |
-u "$QMAILDUID" -g "$NOFILESGID" 0 25 /var/qmail/bin/qmail-smtpd 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment