[Mimedefang] Tagging a message in MIMEdefang seems to make Sendmail skip blacklist checks

Ole Holm Nielsen Ole.H.Nielsen at fysik.dtu.dk
Tue Jul 15 08:48:00 EDT 2003

We're running MIMEdefang v2.34 and SpamAssassin v2.55 on our mailserver
with Sendmail 8.12.8.  In /etc/mail/mimedefang-filter I use SpamAssassin,
and if the spam-score is greather than some threshold I call
action_change_header() to tag the Subject: line, and action_add_part()
to add the SA report.  Works great, sort of...

However, when a message has been tagged as spam as described,
I have seen a number of cases of spam where apparently further tests
in Sendmail seem to have been bypassed.

I use DNS blacklists with lines like this in /etc/mail/sendmail.mc:
FEATURE(enhdnsbl,`bl.spamcop.net', ` Sorry ...
and a local list of "bad" domains,
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')
I also have this
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
in order to force Sendmail not to do IPV6 lookups (not supported
by SpamCop.net, for example).

It appears that domains in the access_db as well as the DNS based
blacklists are ignored, as I can verify by looking up the incoming
mailserver in the mentioned blacklists.  The blacklists appear to
work correctly in numerous other cases.

Question: Is it possible that MIMEdefang is playing tricks on
Sendmail's further processing of messages that have been altered
(tagging as spam) ?  Or do Sendmail's blacklist lookups occur
prior to calling MIMEdefang, so that it would appear to be a
DNS lookup problem again ?  If so, how can DNS lookups be made
more reliable (longer timeouts) with Sendmail ?

Ole Holm Nielsen
Department of Physics, Technical University of Denmark,
Building 307, DK-2800 Kongens Lyngby, Denmark

More information about the MIMEDefang mailing list