Re: [exim] Is there a way to add/remove headers in user filt…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Sandro Tosi
Data:  
Para: exim-users
Asunto: Re: [exim] Is there a way to add/remove headers in user filters?
Hi,

On 12/06/2010 09:49 AM, W B Hacker wrote:

> This works for us:
>
>     # DATA_SCAN_12: Modify Subject line with *Suspect* when score is over limit
>     # and prep for divert to quarantine if per-recipient pg_quarantine is set
>     #
>     warn
>       !condition  = ${if eq{$acl_m0}{1}}
>       condition   = ${if>{$spam_score_int}{${eval:$acl_m7}}{1}{0}}
>       spam    = spamd:true
>       message     = Subject: *Suspect* $h_Subject:


Yep that works, mut sadly we allow users to define what to do with spam
emails f.e.:

- do nothing
- add a "tag" to the subject
- forward to another email address
- simply drop the mail

Now, while I can define several routers and "somehow" let only one be
used to "handle spam emails", I find it a quite awkward solution (and
very badly scalable, since it needs changes to exim config each time a
new action is allowed for users).

We want to use filters because we can simply write them in a mysql
table, read them from the db and execute them, and the add of a new
filters doesn't change anything in the exim config but only on the
users' UI.

But then we're facing the problem of user filters not allowed to change
message headers.

> Wot's wot:
>
> The first '!condition' is granting SA exemptions to the anointed ones for whom
> acl_m0 has been set. May or may not be of interest...
>
> The second 'condition' uses a value in acl_m7 - one of MANY pulled from a
> PostgreSQL DB at the time of acl_smtp_rcpt_to. *see caveat below*
>
> Router/transport sets act on acl_m7, not on the (modified) header.
>
> While a user-filter may not alter a header, might it not be able to 'see' an
> acl_m variable and act on that instead?


yes, we already use acl_m vars

> The snippet above is but one of many per-reciint acl's, is not a 'user filter'
> but has a comparable effect.
>
> NB:
>
> Unless stripped, headers survive all the way out to the MUA, may be considered
> relatively 'permanent', and may (also) be utilized by end-user MUA filters.


indeed, but why disable headers changes in user filters?

Regards,
--
Sandro Tosi
Product Engineer
Linux based Solutions
Hosting Products
R&D | Dada.pro
sandro.tosi@???