Help | Site Map
| Text size: - +
(Answer) (Category) SpamCop FAQ : (Category) SpamCop Blocking List information : (Category) How do I configure my mailserver to reject mail based on the blocklist? :
Sendmail
  1. Add the following line to your config.m4
    FEATURE(`dnsbl', `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?"$&{client_addr}')dnl
    Or for later versions:
    FEATURE(`enhdnsbl', `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?"$&{client_addr}', `t')dnl
  2. Re-compile your sendmail.cf from the config.m4
  3. Re-start sendmail

Some problems have been found with later versions of Sendmail.

The easiest fix may be to use the second method above, enhdnsblk instead of dnsbl.

SpamCop uses 'rbldns' to serve it's blocklist information. Rbldns does not yet have support for IPv6, but newer versions of sendmail (8.12.0 and greater) try IPv6 before IPv4. Sendmail asks for an AAAA record instead of an A record and SpamCop rejectes the query - resulting in spam slipping through the filters.

It appears rbldns developers are working on a fix for this, but the current version (1.05) still does not have support for AAAA records (and it handles them incorrectly even though it dosn't support them). Until rbldns releases a version which fixes this problem, a patch for sendmail should be found.

For sendmail versions after 8.12.1, adding this to the config.m4 file should solve the problem:
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl

Another fix which has been suggested is to modify the "Kdnsbl" line of the raw sendmail.cf file:
Kdnsbl dns -R A -T

An rbldns developer has this to say, implying that sendmail, and not rbldns is really to blame for this incompatibility:

I looked at the code and tried some experiments -- rbldns sends back a REFUSED code for AAAA queries.

It's hard for me to imagine a mindset that would consider the current behavior to be wrong. I suppose maybe it wants an NXDOMAIN error instead.


[Append to This Answer]