Re: [exim] Header remove before spam check or parse content …

Page principale
Supprimer ce message
Répondre à ce message
Auteur: W B Hacker
Date:  
À: exim users
Sujet: Re: [exim] Header remove before spam check or parse content in router
captain wrote:
> Hello
>
> Since two weeks few contacts send us mail with header X-Spam-Flag
> already set (to "NO")
>
> So after spamassassin check we have 1 or 2 occurrence of X-Spam-Flag
> and us router match them like spam at each time.
>
> We try a lot of configuration but we found no solution to remove
> X-Spam-Flag before ACL check or to check X-Spam-Flag value in router
> condition.
>
> Does anyone can help us ?
>
> ## Router sample
> user_spam:
>   debug_print           = "R: SPAM for $local_part@$domain"
>   cannot_route_message  = no such user
>   driver                = accept
>   condition             = {def:h_X-Spam-Flag:} }}
> ...
> ##

>
> Thanks for any help
>
> Florent
>


Simply change the name you apply and check for to something else of your own
choice. X-junk, X-Smelly, X-brackafrax ... whatever you have NOT seen in common use.

- optionally strip that choice on the way in - BEFORE anything that might add it.

- optionally strip it again on the way out in router/transport sets.

That way, no one else sees your choice. Which makes it hard to forge.

Better yet - use an acl_m class variable, and you won't need a header at all.

CAVEAT:

- an acl_m variable 'lives' only until the last delivery has been completed. It
does not travel into the final mailstore and is not part of what the end-user
receives and displays on their MUA.

- a header OTOH, 'lives' as long as any copy of the message lives - 'anywhere',
including - on the end-user's workstation.

So if you need to do debugging days or months after the fact, a header may be
preferable to perusing old logs for the acl_m value ... if you even remembered
to log it!


HTH,

Bill