I have been using several email blacklists on a CentOS 7 server where I use Sendmail to handle email. The blacklists, aka blocklists, I've been employing are DNS-based Blackhole Lists (DNSBLs). A DNSBL is a list of IP addresses known to be associated with the transmission of spam. The ones I've been using are listed below:
- Spamhaus
- Passive Spam Block List (PSBL
- Spam and Open Relay Blocking System (SORBS)
- Swiss Network Operators Group (SwiNOG)
- SpamCop Blocking List
I configured Sendmail to use those blacklists by putting the following lines
in /etc/mail/sendmail.mc
:
FEATURE(`blacklist_recipients')dnl FEATURE(`dnsbl', `sbl.spamhaus.org', `550 Spam Block: mail from $&{client_addr} refused - See http://www.spamhaus.org/sbl/')dnl FEATURE(`dnsbl', `psbl.surriel.com', `550 Spam Block: mail from $&{client_addr} refused - see http://psbl.surriel.com/')dnl FEATURE(`dnsbl',`dnsbl.sorbs.net',`550 Spam Block: mail from $&{client_addr} refused - see http://dnsbl.sorbs.net/')dnl FEATURE(`dnsbl',`dnsrbl.swinog.ch',`550 Spam Block: mail from $&{client_addr} refused - see http://antispam.imp.ch/spamikaze/remove.php')dnl FEATURE(`enhdnsbl', `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?"$&{client_addr}', `t')dnl
If you add those lines to the Sendmail configuration file, you need to
regenerate /etc/mail/sendmail.cf
with the command m4
/etc/mail/sendmail.mc > /etc/mail/sendmail.cf
. Then restart sendmail
with service sendmail restart
.
Still, despite those multiple anti-spam blacklists, a lot of spam is getting through to accounts on the mail server. So I decided to install Free Antispam for Mail Servers (FRAMS) from Bitdefender, which describes the software thusly:
Bitdefender Free Antispam for Mail Servers provides essential features for increased productivity in any organization by blocking spam on Linux-based mail servers. Bitdefender's award winning antispam engines provide antiphishing, content and attachment filtering. It's extremely easy to install and administrators have an easy to use web-based interface and powerful command line management.
[ More Info ]