[Mimedefang] using action_add_part on msgs to be quarantined

Aleksandar Milivojevic amilivojevic at pbl.ca
Tue Nov 23 10:30:21 EST 2004


Rolf wrote:
> hello
> 
> Try as I might I cannot add the spamassassin report to the mail msg 
> prior to it being quarantined.
[snip]
>                 # If you find the SA report useful, add it, I guess...
>                 action_add_part($entity, "text/plain", "-suggest",
>                                 "$report\n",
>                                 "SpamAssassinReport.txt", "inline",0);
>                 action_quarantine_entire_message();
>                 action_discard();

This one-liner should do the trick:

    # Quarantine mail and save report
    action_quarantine_entire_message($report);
    # Second line of one-liner ;-)
    return action_bounce("Smile, be happy, don't send spam");

You will find the report in file MSG.0 (unless you had some other 
action_quarantine_* with message included, each goes in its own MSG.n file).

Side-effect: When/if you send quarantine notifications later on, they 
will contain the report.

-- 
Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7



More information about the MIMEDefang mailing list