[Mimedefang] Why wont this work

Dave Buchanan dave at tdjsystems.net
Sun Jul 27 17:57:01 EDT 2003


I am attempting to subject tag ingound mail according to the spam
assassin score .

Anything greater than 11 I want tagged as "SPAM" less than 11 as
"probable spam"

I have modded the mimedefang filter like this ...

  
# We add a header which looks like this: 
# X-Spam-Score: 6.8 (******) NAME_OF_TEST,NAME_OF_TEST
# The number of asterisks in parens is the integer part
# of the spam score clamped to a maximum of 40.
# MUA filters can easily be written to trigger on a 
# minimum number of asterisks... 
action_change_header("X-Spam-Score", "$hits ($score) $names");
if ($hits > 11) {
action_change_header("Subject", "** SPAM ** $Subject");
} else {
action_change_header("Subject", "** Probable SPAM ** $Subject");
}
# If you find the SA report useful, add it, I guess... 
action_add_part($entity, "text/plain", "-suggest",
"$report\n",
"SpamAssassinReport.txt", "inline"); 
} else {
# Delete any existing X-Spam-Score header?
action_delete_header("X-Spam-Score");
}
}
}

The filter fails with this ...

any ideas  (btw I am not a coder...just a lowly administrator ! if my
syntax is wrong ... please feel free to tell me ! )

Thanks  




More information about the MIMEDefang mailing list