[Mimedefang] Question about resend_message() (Sendmail)

Dianne Skoll dianne at skoll.ca
Thu Oct 18 09:30:53 EDT 2018


>             if ($hits >= $req) {
>                 action_change_header("X-Spam-Score", "$hits ($score) $names");
>                 resend_message($SpamBox);
>                 action_discard();
>             } 

Rather than using resend_message to resend the message, if you have
a new-enough version of Sendmail you can use delete_recipient to delete all
of the original recipients and then add_recipient to add $SpamBox as
a recipient.  You have to loop over @Recipients to delete all the
original recipients.

Otherwise, you could add a magical header to the message and look for
it the next time around.  You have to be careful to (1) delete the
magical header before letting the mail go out if it's not being
redirected, and (2) only trust it if the mail does originate from



More information about the MIMEDefang mailing list