[Mimedefang] Changing individual addresses to spam mailbox address.
Jim McCullars
jim at info.uah.edu
Mon Oct 6 17:32:02 EDT 2003
On Mon, 6 Oct 2003, Martin Ferguson wrote:
> For individual addresses, I've tried;
>
> 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) {
>
> if ( $recip =~
>
> /first\@addess.com|second\@address.com/i )
> {
> delete_recipient($recip);
> }
> }
>
> # Send to spam address
> add_recipient('spambox at mydomain.com');
> -------------------------------------------------------------
>
> When first at address.com and second at address.com should be the only
> recipient addresses which get forwarded to spambox at mydomain.com, instead
> the addresses on the list and any other addresses still get forwarded to
> spambox at mydomain.com.
>
Your call to add_recipient() falls outside of the if statement that
checks to see if one of the directors is a recipient, so it gets done for
everyone.
Jim
More information about the MIMEDefang
mailing list