[Mimedefang] Redirect spam to a spam maildrop by score
Kevin A. McGrail
kmcgrail at pccc.com
Tue Jan 6 12:31:47 EST 2004
That solution below will certainly work but I believe it's a "better"
solution not to use procmail. Assuming you are not using the MASQUERADE_AS
in your sendmail.mc, the following should work fine though I've never done
the bounce part so someone else please comment about that:
Inside your loop for "if ($hits >= $req) { ", add this at the bottom
if ($hits >= 20) {
#bounce anything with a score over 20 -- UNTESTED
action_bounce("Spam found in mail - rejected");
}elsif ($hits >= 10) {
#FROM THE MIMEDEFANG FAQ
# Add a header with original recipients, just for info
action_add_header("X-Orig-Rcpts", join(", ", @Recipients));
# Remove original recipients
foreach $recip (@Recipients) {
delete_recipient($recip);
}
# Send to spam address
add_recipient('spamdrop at mydomain.net');
}
Regards,
KAM
More information about the MIMEDefang
mailing list