Re: [exim] Controlling Backscatter

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Chris Siebenmann
Ημερομηνία:  
Προς: Rob Gunther
Υ/ο: Exim Mailing List
Αντικείμενο: Re: [exim] Controlling Backscatter
> Essentially we want to control what undelivered notices we actually
> send. Any way to do this? Selectively choose what undelivered
> notices to send back to the original sender?


You can use a system Sieve filter to discard bounces that match
certain criteria, and you can use customized bounce messages to do
things like add special information or tracking headers. For example,
locally we drop all bounces of things that we scored as spam. Our spam
filtering system marks the original Subject:, so we copy the Subject:
into the bounce as 'X-Original-Subject' and then have a router that runs
bounce messages past a system Sieve filter that inspects them:

eat_spam_bounces:
    driver = redirect
    # only discard bounces going externally
    domains = ! +local_domains
    file = /magic/filter/file
    allow_filter
    allow_freeze
    user = Debian-exim
    no_verify
    no_expn
    condition = ${if and {{!eq{$interface_port}{25}} \
                {!def:return_path} {def:h_x-original-subject:} }}


The Sieve filter itself is basically:
    # Exim filter
    #
    if $h_x-original-subject: BEGINS "[PMX:SPAM] "
    then
        seen finish
    fi


(with logging and some additional conditions and etc.)

What I don't know is how you'd get necessary information from the
text of the SMTP error into the bounce message in a way that a Sieve
filter could use here. But I haven't looked into this, since we haven't
needed it.

    - cks