[Mimedefang] excluding sender/subject from spam check

Kelson Vibber kelson at speed.net
Thu Jan 8 17:01:54 EST 2004


At 01:27 PM 1/8/2004, Douglas, Jason wrote:
>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
>}

Actually, it has nothing to do with perl - it's plain old logic, hinging on 
the fact that !(A&B) = !A || !B.

Let's say SE is the case where the sender matches, and SU is the case where 
the subject matches

What you want is to exclude the case where SE and SU are both true.  Which 
means you want:
         ! (SE & SU)
which is equivalent to
         !SE || !SU

What you have is
         !SE & !SU
which is equivalent to
         ! (SE || SU)

In this case, if only one matches, the entire expression is false so spam 
checks get skipped.

Just change the && in each Sender/Subject pair to an || and you should be fine.

Kelson Vibber
SpeedGate Communications <www.speed.net> 




More information about the MIMEDefang mailing list