[Mimedefang] change_header doesn't add header

Marco Berizzi pupilla at hotmail.com
Thu Nov 24 11:03:40 EST 2005




David F. Skoll wrote:

>Marco Berizzi wrote:
>
> > I'm try to use action_change_header in filter_end but MIMEDefang doesn't
> > add a new one when it doesn't exist as stated in man page.
>
>Weird; it works for me.
>
>Are you supplying an $index argument?

no, I'm not. This is my filter:

sub filter_end ($) {
    my($entity) = @_;

    # If you want quarantine reports, uncomment next line
    # send_quarantine_notifications();

    # IMPORTANT NOTE:  YOU MUST CALL send_quarantine_notifications() AFTER
    # ANY PARTS HAVE BEEN QUARANTINED.  SO IF YOU MODIFY THIS FILTER TO
    # QUARANTINE SPAM, REWORK THE LOGIC TO CALL 
send_quarantine_notifications()
    # AT THE END!!!

    # No sense doing any extra work
    return if message_rejected();

    if (!$LocalRelay) {
        my @hremove = ("Disposition-Notification-To",
                       "Disposition-Notification-Options",
                       "Return-Receipt-To",
                       "X-Confirm-Reading-To");
        foreach my $h (@hremove) {
            if ($entity->head->get($h)) {
                action_delete_all_headers($h);
            }
        }
        action_add_header("Precedence", "bulk");
    }





More information about the MIMEDefang mailing list