======= Queue Management ======= Reschedule messages for immediate redelivery *run qmail-tcpok to reset tcp timeouts to 0 (use qmail-tcpto to view timeout values) *kill -ALRM **qmhandle** - perl based queue viewer. Also allows you to read/delete emails in active queue. Use with -c flag for color. http://www.io.com/~mick/soft/qmhandle.html ======= Relaying ======= *edit /etc/tcp.smtp and insert hosts, netblocks from which to allow relaying *example line: 192.168.10.:allow,RELAYCLIENT="" *tcprules tcp.smtp.cdb tcp.smtp.temp < tcp.smtp ======= Spam Control ======= *http://slashdot.org/article.pl?sid=02/08/19/122256&mode=thread&tid=167 *Bayesian spam theory - http://www.paulgraham.com/spam.html *Bayesian qmail spam filter -http://www.garyarnold.com/projects.php#bayespam *procmail rule for geo spam control: #### # # Procmail rules for spam control. # Greg Retkowski # #### FROM=`/usr/bin/formail -x From:` FHOP=`formail -c -x Received: | tail -1 | \ sed -e \ 's/.*\[\([^0-9]*\)\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\)\(.*\)/\2/'` THOP=`formail -c -x Received: | head -1 | tr '\012' ' ' | \ sed -e 's/.*by \([a-zA-Z0-9\.]\{1,\}\).*/\1/'` LHOP=`formail -c -x Received: | head -1 | \ sed -e \ 's/.*\[\([^0-9]*\)\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\)\(.*\)/\2/'` GIP=/home/greg1/bin/geoiplookup # blacklist domains in my .spammers file :0 fw * ? cat /home/greg1/.spammers /home/greg1/.spammers.static | grep -i ^`echo $FROM |sed -e 's/.*@//'` >/dev/null | formail -A "X-SPAM-RULE: SENDER" # blacklist relays in .openrelays :0 fw * !? /home/greg1/rblcheck -q -s relays.osirusoft.com $LHOP | formail -A "X-SPAM-RULE: RBL" # Add a georouting header to every mail :0 fw | formail -A "X-INTL-ROUTE: `$GIP $FHOP` `$GIP $LHOP` `$GIP $THOP`" # Mark messages with bad georouting as spam :0 fw * ? test `$GIP $FHOP` != `$GIP $LHOP` && test `$GIP $LHOP` != `$GIP $THOP` | formail -A "X-SPAM-RULE: GEOROUTE" # Mails appearing with a UIDL before being in pop3 are bogus :0 fw * ^X-UIDL:.* | formail -A "X-SPAM-RULE: UIDL" ---- computer