[Mimedefang] Config File Help (filters)

Stephen Loeckle stephen at lucidnetworks.net
Mon Mar 3 16:34:00 EST 2003


First off, I love mimedefang. I'm successfully running it with sendmail
and spamassassin. It's quite quick as well. Anyway, currently with my
setup, it keeps the original body and subject and attaches the
spamassassin report. Is there anyway I can prepend text to the subject
(like **** SPAM ****), make the spamassassin report what the user sees
first then has the ability to open the original message as an attachment?
Essentially doing a body attachment switch... Did I lose anyone there?

Thanks!
Stephen


ENCL: Relevent portion of my config :)

sub filter_end ($) {
    my($entity) = @_;
send_quarantine_notifications()
    return if message_rejected();
    if ($Features{"SpamAssassin"}) {
        if (-s "./INPUTMSG" < 100*1024) {
            my($hits, $req, $names, $report) = spam_assassin_check();
            if ($hits >= $req) {
                md_log('spam', $hits, $RelayAddr);
                my($score);
                if ($hits < 40) {
                    $score = "*" x int($hits);
                } else {
                    $score = "*" x 40;
                }
                action_change_header("X-Spam-Score", "$hits ($score)
$names");

                action_add_part($entity, "text/plain", "-suggest",
                                "$report\n",
                                "SpamAssassinReport.txt", "inline");
            } else {
                action_delete_header("X-Spam-Score");
            }
        }
    }
}






More information about the MIMEDefang mailing list