tomclegg.net |
Check for open SOCKS proxy Posted December 11, 2003 Check whether an SMTP client is an open SOCKS proxy before accepting mail from it. Here is the #!/bin/sh if tcpclient -T 3 "$TCPREMOTEIP" 1080 true 2>/dev/null >/dev/null then export RBLSMTPD="Port 1080 open at $TCPREMOTEIP" fi eval "exec $*" To use it, include it somewhere between tcpserver -x tcp.smtpd.cdb \ -vR -u 82 -g 81 -l `hostname` 10.1.2.3 smtp \ ./checksocks \ rblsmtpd -a antirbl.tomclegg.net \ qmail-smtpd `hostname` /usr/local/sbin/cmd5checkpw /usr/bin/true \ 2>&1 |