[Mimedefang] replace_entire_message function
John Rudd
john at rudd.cc
Sat Sep 24 03:20:09 EDT 2005
On Sep 23, 2005, at 5:13 PM, John Rudd wrote:
>
> Does anything need to happen after "replace_entire_message()", in
> filter_end, in order to make the message get delivered?
>
> I'm doing this in my filter_end (on my test servers):
>
> # set up $warning variable
>
> $newentity = MIME::Entity->build(From => "postmaster\@ucsc.edu",
> To => $Sender,
> Subject => "Rejected Virus:
> $Subject",
> Data => $warning);
>
> add_recipient($Sender); # docs say it does not add to @Recipients
>
> foreach $recipient (@Recipients) { # so, $Sender wont get
> removed here
> delete_recipient($recipient);
> }
>
> replace_entire_message($newentity);
>
Nevermind. I figured out it was an ordering thing. Here's what I've
got now:
$newentity = MIME::Entity->build(Data => $warning);
replace_entire_message($newentity);
add_recipient($Sender);
foreach $recipient (@Recipients) {
delete_recipient($recipient);
}
action_change_header("From", "postmaster\@ucsc.edu");
action_change_header("To", $Sender);
action_change_header("Subject", "Rejected Virus: $Subject");
More information about the MIMEDefang
mailing list