Re: [exim] Filtering spam bounces

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jakob Hirsch
Date:  
À: Alastair Campbell
CC: exim-users
Sujet: Re: [exim] Filtering spam bounces
Quoting Alastair Campbell:

> I would like to have a rule somewhere that says "If email subject
> matches ('failure notice' | 'Undelivered' | 'Returned mail') and is not
> addressed to a specific (known) email address, dump it."


"dump" is bad, "deny" tells the sender that you don't want that mail.
To filter for subject, you have to do it in the acl_smtp_data, like that:

acl_check_data:

deny
condition = ${if match{$h_subject:}{\N(failure notice|bla|blub)\N}}
condition = ${if match{$recipients}{\Nknown@???\N}}
message = This address never sends out mail, so it cannot get bounces.

This is not perfect, as $recipients contains a comma-separated list, so
the condition above would also match "unknown@...", but in general it
should work well.

Would be better to do that in acl_check_rcpt:

deny
senders = :
! local_parts = known@??? : another@???
message = This address never sends out mail, so it cannot get bounces.

Keep in mind that bounces are not the only messages that have a null
sender, but in general it is a reaction to a message, so if you never
use an address to send mail, it should never get a message with a null
sender (AFAIR, somebody please correct me if I'm wrong).