Created
April 12, 2014 18:01
-
-
Save nbari/10548546 to your computer and use it in GitHub Desktop.
qmail-smtpd-TLS-587
This file contains 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 | |
exec 2>&1 | |
# | |
# SMTP service | |
# | |
QMAIL="/var/qmail" | |
ME="`head -1 $QMAIL/control/me`" | |
CONCURRENCY=${CONCURRENCY:=50} | |
QUSER="qmaild" | |
PATH="$QMAIL/bin:$PATH" | |
# source the environemt in ./env | |
eval `env - PATH=$PATH envdir ./env awk '\ | |
BEGIN { for (i in ENVIRON) \ | |
if (i != "PATH") { \ | |
printf "export %s=\"%s\"\\n", i, ENVIRON[i] \ | |
} \ | |
}'` | |
# enforce some sane defaults | |
QUSER=${QUSER:="qmaild"} | |
exec \ | |
envuidgid $QUSER \ | |
tcpserver -v -URl $ME -x$QMAIL/control/qmail-smtpd.cdb \ | |
${CONCURRENCY:+"-c$CONCURRENCY"} ${BACKLOG:+"-b$BACKLOG"} 0 587 \ | |
$QMAIL/bin/qmail-smtpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment