[Mimedefang] excluding sender/subject from spam check

Douglas, Jason jdouglas at municipality.clarington.on.ca
Thu Jan 8 16:27:27 EST 2004


Hi All,

This might be off-topic, more of a perl/logic problem, but I'm hoping
someone can still help.

I am trying to exclude particular $Sender/$Subject combinations from
being scanned by SpamAssassin. These are "newsletter" type things that
look a lot like spam (even to me) but are legitimate, and due to
politics I can't simply ask them to modify the newsletter email's format
so that it doesn't look so much like spam.
 
Anyhoo, I am trying to implement it like so:
 
if ( ( $Sender ne '<somebody at domain.com>' && $Subject ne 'This is the
subject line' ) && ( $Sender ne '<somebodyelse at anotherdomain.com>' &&
$Subject ne 'Somebodyelses Subject Line' ) ) {
        # do spamassassin filtering
}    
 
It sort of works, but it doesn't seem to care what the subject line is.
That is, any email with any subject from somebody at domain.com or
somebodyelse at anotherdomain.com would go through without being checked by
spamassassin. So that would be OK.

However it also doesn't care who the sender is when a subject line is
matched. For example if spammer at spamhaus.com sent a message with subject
"This is the subject line" it would go through.

I apologize if this is the wrong place to post this, as it would seem to
be a perl logic problem, but perhaps someone will kindly suggest a
better way of handling this annoying situation in addition to telling me
what's wrong with my current code.

Thanks in advance!


Jason Douglas
Network Support Technician
http://scopicmedia.ca/
http://scopicmedia.com/jasond/

 





More information about the MIMEDefang mailing list