[Mimedefang] Rerouting spam (and getting evidence for ISPs)
-ray
ray at ops.selu.edu
Fri Feb 16 23:56:32 EST 2007
On Fri, 16 Feb 2007, Philip Prindeville wrote:
> The issue is that the mail won't be read and handled via a
> local directory... It needs to be delivered to an Imap mailbox
> so it can be handled there from a client on another machine.
>
> Ok, can I simply delete the current list of recipients and
> replace it with a new recipient?
Yes. We do this in filter_end after Spamassassin checks. We don't
deliver anything that SA scores over 13 since it's obviously spam. But we
keep a copy in the spamdrop account just in case. Here's the code:
# dump all spam over 13 to spamdrop
if ($hits >= 13) {
# Add a header with original recipients, just for info
action_add_header("X-Orig-Rcpts", join(", ", @Recipients));
# Remove original recipients
foreach $recip (@Recipients) {
$res = delete_recipient($recip);
if ($res == 0) { action_add_header("X-Rcpts-Res",
"failed");}
}
# Send to spam address
add_recipient("spamdrop\@domain.com");
}
-ray
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ray DeJean http://www.r-a-y.org
Systems Engineer Southeastern Louisiana University
IBM Certified Specialist AIX Administration, AIX Support
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
More information about the MIMEDefang
mailing list