[Mimedefang] Resend_Message_One_Recipient

pemond at techsupport.ca pemond at techsupport.ca
Fri Jan 31 00:15:01 EST 2003


Hi MimeDefang Group  ...

We use the "Resend_Message_One_Recipient" function in a unique way; but
it's not working exactly like we want it to, so I thought I'd survey the
collective wisdom of the group to see if there's an answer.

We use the above function to send all spam to a "mail-in" database on
another server.  It's working very well but none of the headers that we are
trying to put into the message (for later analysis) are added.

Here's a snippet of our mimedefang-filter ...

$spamadd = 'spam at ourdomain.com';
 # Don't run SA against messages bigger than 200k
    if ((-s "./INPUTMSG") <= (200 * 1024)) {
        my($hits, $req, $names, $report) = spam_assassin_check();
        $SAReport = $report;
        if ($hits >= $req) {
            action_add_header("X-Spam-Warning", "SpamAssassin says this
message is SPAM");
            action_add_header("X-Spam-Status", "Yes, hits=$hits required
=$req");
            action_add_header("X-Spam-Report","$report");
     Resend_Message_One_Recipient($spamadd);
     return action_bounce("SpamAssassin says this message is SPAM");
        } else {
            action_add_header("X-Spam-Status", "No");
        }
     }

A careful review of the maillog shows us that the headers are being added
after the "Resend_One_Recipient" function has already forked into a new
process.  Therefore, the message is already gone and the headers don't have
time to get added (We see them being added right before the message is
bounced).  Is there something that we're doing wrong here, or do we need to
write a new function in mimedefang.pl to do what we're trying to do (Maybe
"Resend_Message_To_Repository")?

Before someone suggests it, action_quarantine_entire_message and the other
similar functions won't work in this case because they mangle the message
slightly (from, to) and we'd like to keep the message in as close to it's
original condition as possible.

Thanks all ...

Paul.




More information about the MIMEDefang mailing list