The 0Spam project is supported by donations from great people like you. Donations are used to improve support and functionality of the platform.
Sponsor for 11/11/2025Become a Sponsor
How do I configure Sendmail to use bl.0spam.org and rbl.0spam.org?
Follow these steps to configure bl.0spam.org and rbl.0spam.org in Sendmail:
-
Edit the Sendmail Configuration File
Locate and edit the Sendmail configuration file, usually found at
/etc/mail/sendmail.mc.Open the configuration file using your preferred text editor:
sudo nano /etc/mail/sendmail.mc -
Add the 0spam.org Blacklist and RBL Configuration
Insert the following lines into your
sendmail.mcconfiguration file to use bl.0spam.org and rbl.0spam.org as blacklists:FEATURE(`dnsbl', `bl.0spam.org', `Rejected - Listed on bl.0spam.org')dnl FEATURE(`dnsbl', `rbl.0spam.org', `Rejected - Listed on rbl.0spam.org')dnlThis tells Sendmail to query bl.0spam.org and rbl.0spam.org and reject any incoming mail that is listed there, with the custom rejection message.
-
Rebuild the Sendmail Configuration
After editing
sendmail.mc, regenerate thesendmail.cffile by running the following command:sudo m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf -
Restart Sendmail
Restart the Sendmail service to apply the new configuration:
sudo systemctl restart sendmailIf you're using an older system with init:
sudo service sendmail restart -
Verify the Configuration
Check the mail logs, typically located in
/var/log/maillogor/var/log/mail.log, to ensure the blacklists are functioning. Use this command to monitor the logs:tail -f /var/log/maillogLook for log entries indicating rejections:
Rejected - Listed on bl.0spam.org Rejected - Listed on rbl.0spam.org
