Adding the Spamhaus SBL and XBL to Sendmail

This document describes how to configure sendmail to reject email that comes from an IP that is listed in the Spamhaus SBL or XBL blacklists (DNSBL). Basically, this will reduce the amount of spam you receive. If you run a busy server, you will want to go a step farther and run your own copy of the DNSBL. Visit www.spamhaus.org for information on how to do so.

The first thing to do is edit your /etc/mail/sendmail.mc file. Add the line below to the file, and save it. I added mine near the bottom just above the MAILER lines.

FEATURE(`dnsbl',`sbl-xbl.spamhaus.org')dnl

Now, rebuild the mail databases with the following command.

make -C /etc/mail

Now restart sendmail with the following command. service sendmail restart

That's it. Your mail server should now be protected by the spamhaus.org DNS blacklist. Send a quick email to nelson-sbl-test@crynwr.com and wait for the response to test your changes.

comments powered by Disqus
linux/adding_the_spamhouse_sbl_and_xbl_to_sendmail.txt · Last modified: 2020/06/01 22:53 (external edit)