If you’re having spam trouble with qmail [edit – 2019; new fork, qmail.org is offline] based Linux servers (in our customer’s case – Plesk based) then perhaps you need to look at using SpamDyke
Installation is pretty easy –
wget http://www.spamdyke.org/releases/spamdyke-4.3.0.tgz
tar -zxf spamdyke-4.3.0
cd spamdyke-4.3.0/spamdyke
./configure
make && cp spamdyke /usr/local/bin
Then, assuming qmail is running through xinetd – edit /etc/xinetd.d/smtp_psa to look like :
service smtp { socket_type = stream protocol = tcp wait = no disable = no user = root instances = UNLIMITED env = SMTPAUTH=1 server = /var/qmail/bin/tcp-env server_args = -Rt0 /usr/local/bin/spamdyke -f /etc/spamdyke.conf /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true }
Finally, copy the example configuration file (spamdyke.conf.example to /etc/spamdyke.conf) and edit to enable some DNS Blacklists – e.g.
log-level=info
log-target=syslog
dns-blacklist-entry=zen.spamhaus.org
graylist-level=always-create-dir
graylist-dir=/var/spamdyke/graylist
graylist-max-secs=60000
graylist-min-secs=360
Once xinetd is restarted (service xinetd restart) you should see entries from SpamDyke appear in the system mail log file.
Hopefully the addition of greylisting and DNS blacklists will help stem the flow of spam in….