tomclegg.net |
supervise tcpserver qmail-smtpd Posted May 18, 2003 cd /var/service mkdir smtpd cd smtpd chmod +t . mkdir log echo :allow >tcprules perl -e 'print "tcprules.cdb:\n"' >Makefile perl -e 'print "\ttcprules tcprules.cdb tcprules.tmp <tcprules\n"' >>Makefile make cat <<'EOF' >run #!/bin/sh PATH=/bin:/usr/bin:/usr/local/bin:/var/qmail/bin export PATH if [ -x /usr/local/sbin/cmd5checkpw ] then smtpd="qmail-smtpd `hostname` /usr/local/sbin/cmd5checkpw /usr/bin/true" else smtpd=qmail-smtpd fi exec envuidgid qmaild tcpserver \ -x tcprules.cdb \ -vRU -l `hostname` 0 smtp \ recordio \ rblsmtpd -c \ -a antirbl.tomclegg.net \ -r rbl.tomclegg.net \ rblsmtpd \ -r relays.ordb.org \ -r bl.spamcop.net \ -r opm.blitzed.org \ $smtpd \ 2>&1 EOF cat <<'EOF' >log/run #!/bin/sh PATH=/bin:/usr/bin:/usr/local/bin:/var/qmail/bin export PATH exec setuidgid qmaill multilog t s999999 \ '-*' \ '+* tcpserver: *' \ '+* rblsmtpd: *' \ '+* * > *' \ '+*< RCPT *' '+*< Rcpt *' '+*< rcpt *' \ '+*< MAIL F*' '+*< MAIL f*' '+*< Mail F*' '+*< Mail f*' '+*< mail F*' '+*< mail f*' \ ./main EOF chmod +x run log/run mkdir log/main chown qmaill log/main cd /service ln -s /var/service/smtpd sleep 7 svstat /service/smtpd /service/smtpd/log |