[Mimedefang] Trying to use routine from FAQ to change recipients - not working
Whit Blauvelt
whit at transpect.com
Tue Aug 5 21:21:01 EDT 2003
Thanks to all who helped me track down that elusive needed "-c". Now I'm
running.
There still one thing I'd very much like to do: change the To: address of
e-mail that's above a SA threshold. From the FAQ I've borrowed the following
routine:
if ($hits > 5) {
# 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('spambox at transpect.com');
}
Afraid the only thing that actually happens is the added header,
X-Orig-Rcpts. Otherwise it's sent on to plague the original recipient as
always.
Now, the version in the FAQ (aka Collaborative Book on the mimedefang.org
site) has it:
if ($message_is_spam) {
# 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');
}
At first I had that cut-and-pasted exactly into the SA end of sub
filter_end. Then I tried the explicit hits threshold instead. What might the
trick be to getting the delete_recipient and add_recipient functions
working.
Thanks again,
Whit
More information about the MIMEDefang
mailing list