[Mimedefang] header info

Jim McCullars jim at info.uah.edu
Tue May 25 12:14:23 EDT 2004



On Tue, 25 May 2004, Jimmy Hayes wrote:

> And my question is, how can I make it so that good email that gets
> scanned, Gets added the points given to the e-mail in the header.
> Currently I can only see The points when the e-mail is considered as
> spam.

   If I understand your question, you want the header added for each
message that is scanned?

   Look in your filter rules file (minedefang-filter).  The sample filter
that comes with 2.35 has this in filter_end:

    # Spam checks if SpamAssassin is installed
    if ($Features{"SpamAssassin"}) {
        if (-s "./INPUTMSG" < 100*1024) {
            # Only scan messages smaller than 100kB.  Larger messages
            # are extremely unlikely to be spam, and SpamAssassin is
            # dreadfully slow on very large messages.
            my($hits, $req, $names, $report) = spam_assassin_check();
            if ($hits >= $req) {


  Note that the header stuff is done only if ($hits >= $req).  Both values
are returned from the SA call:  $hits is the score, and $req is the value
it has to be in order to be considered spam.  Now, if you want the header
printed for all emails, you could do one of two things.  One, you could
redo the logic so that it adds the header regardless of what the score is
(take out the "if" test, and remove the "else" lines and closing brace
about 20 lines below), or edit the SA config file that MD uses (mine is
called sa-mimedefang.cf, but yours may be something different) and change
the "required_hits" tag to a very low number, like .001 (I do not know
what changing it to zero would do).

   HTH...

Jim McCullars
University of Alabama in Huntsville




More information about the MIMEDefang mailing list