[Mimedefang] Please enlighten a dim bulb

Michael Grau m.grau at kcc.state.ks.us
Fri Jul 26 12:52:00 EDT 2002

sendmail-8.12.5 + mimedefang-2.16 + Mail-SpamAssassin-2.31

Can somebody please tell me if the following
is the expected behavior of mimedefang and help me
undestand what's going on? TIA for you help and

In filter_begin I have a call to spam_assassin_check().
If the message is spam I want to add headers and pass
the message through if the message is below a certain
number of hits.

If I send a simple message that I know will be flagged
as spam all works as expected; the headers are added:

  Milter add: header: X-Spam-Status: hits=7.6, 5.5 required
  Milter add: header: X-Spam-Tests: BIG_TITS,PORN_10
  Milter add: header: X-Spam-Warning: SpamAssassin_says_this_message_is_SPAM

However, if I send the same message with a small binary
attachment, the message sails with no hits:

  Milter add: header: X-Spam-Status: hits=0, 5.5 required

The message is correctly flagged as spam if the attachment is a text file,
just not a binary. What might the explaination be?


Also, if I send the same message (no attachment); if the
required spam hits are reached and I then call

the spam headers are added to the message and the message is sent through,
but with the $GeneralWarning and the $msg passed to action_quarantine_entire_message
prepended to the recipient's message.

Why should this be? I just want to save a copy of the message to examine if
need be. The mimedefang-filter man page states that action_quarantine_entire_message

  'does not otherwise affect disposition of the message. Sends a notifica­
   tion to the MIMEDefang administrator that the message was  quarantined. If
   "$msg" is non-empty, a notification is sent to the MIMEDefang administrator.'

Why does calling action_quarantine_entire_message cause mimedefang to
molest the recipients message with the $GeneralWarning and the $msg passed to 

I can use action_notify_administrator($msg) instead of action_quarantine_entire_message.
The message is delivered unmolested, but I don't have an archived copy of the message.


Also, can the spamassassin checks be used in filter_end? I'd rather
not call spamassassin if the message is going to be rejected in fitler()


Mimedefang is running thusly:

mimedefang-multiplexor -U oas -R 50000 -M 50000 -p /var/run/mimedefang/multiplexor.pid -x 12 -m 3 -b 30 -i 300 -l -s /var/run/mimedefang/mdefang-mx.sock
/usr/local/bin/mimedefang -U oas -m /var/run/mimedefang/mdefang-mx.sock -p /var/run/mimedefang/mimedefang.sock -s -t
usr/local/bin/perl -w /usr/local/bin/mimedefang.pl -server

More information about the MIMEDefang mailing list