MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Tue, May 06, 2008 10:58 pm

Sendmail Anti-Spam Blacklist Feature

To reduce the amount of spam reaching user's inboxes, I made some modifications to the /etc/mail/ file on a Linux server running sendmail.

The already had the line FEATURE(`blacklist_recipients')dnl. The blacklist_recipients feature turns on the ability to block incoming mail for certain recipient usernames, hostnames, or addresses. For example, you can block incoming mail to user nobody, host, or These specifications are put in the /etc/mail/access file.

Immediately below that line, I added the following lines to use the McFadden Associates E-Mail Blacklist, the Spamhaus Block List, and the Passive Spam Block List.

FEATURE(`dnsbl', `', `550 Spam Block: mail from $&{client_addr} refused - See')dnl
FEATURE(`dnsbl', `', `550 Spam Block: mail from $&{client_addr} refused - See')dnl
FEATURE(`dnsbl', `', `550 Spam Block: mail from $&{client_addr} refused - see')dnl

I removed the "dnl" from the beginning of the following line, which "uncomments" the directive, to allow the system to accept email from users who have authenticated by a trusted mechanism defined by TRUST_AUTH_MECH (see Sendmail Authorization for Outgoing Email).

dnl FEATURE(delay_checks)dnl

I didn't want a user's email to be rejected because the user's system received a dynamically assigned IP address previously assigned to a system sending out spam, which I've seen happen previously. By using the delay_checks feature, you can have sendmail skip the check_mail and check_relay rulesets, if the sender has been authenticated by a "trusted" mechanism, such as by sending the user's userid and password to the server when sending email.

I then regenerated the file from the file and restarted sendmail with the commands below.

m4 /etc/mail/ > /etc/mail/
/etc/init.d/sendmail restart


  1. Sendmail cf/README - Features
  2. Sendmail cf/README - Anti-Spam Configuration Control
  3. Passive Spam Block List (PSBL) Added
    MoonPoint Support
  4. Sendmail Authorization for Outgoing Email
    MoonPoint Support
  5. McFadden Associates E-Mail Blacklist
  6. Spamhaus Block List
  7. Passive Spam Block List

[/network/email/sendmail] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo