[Mimedefang] 'spam' spam getting through

Joseph Brennan brennan at columbia.edu
Fri Oct 24 14:37:41 EDT 2003


> anyway i'm running debian unstable with mimedefang 2.35-1 and
> spamassassin 2.55-3.  i've munged the mail log entry and message headers
> for anonymity below ... it would seem that mimedefang isn't calling
> spamassassin? i'm not so hot at interpreting smtp headers so forgive me
> if i'm missing something obvious... but any suggestions welcome..

Where you send selected messages to Spamassassin, try this.

Firstly we define $doSA, and then undefine it if the message is
considered local in some way, such as smtp auth, from localhost,
or from a couple of secure campus servers we trust.   Then:

    if ($Features{"SpamAssassin"} && defined($doSA)) {
        if (-s "./INPUTMSG" < 150*1024) {
		# Send it to SA as per usual and do the
		# usual insertion of headers.
		# We put the score in ALL mail SA sees, even 0.
        } else {
            action_change_header("X-No-Spam-Score", "Too long");
        }
    } else {
        action_change_header("X-No-Spam-Score", "Local");
    }

This way we have one of two X-No-Spam-Score headers in there
if we deliberately did not send it to SA.

Joseph Brennan         Columbia University in the City of New York
Academic Technologies Group                   brennan at columbia.edu



More information about the MIMEDefang mailing list