Re: [exim] Condition match header with spaces

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Andrew C Aitchison
Dátum:  
Címzett: Emanuel Gonzalez
CC: exim-users@exim.org
Tárgy: Re: [exim] Condition match header with spaces
On Thu, 26 Dec 2019, Emanuel Gonzalez via Exim-users wrote:

> I create a router in exim 4.92.2 to move all message that contain an header added by Rspamd.
>
> EXIM Route:
>
> virtual_user_prom:
> driver = accept
> condition = "${if {def:$h_ Symbol:}{(?i)MSGID_MKT_DOMAIN_BLK2}{yes} {no}}"
> domains = lsearch;/opt/exim/userdomains
> retry_use_local_part
> transport = virtual_user_delivery_prom
>
> Here's an example of the headers:
>
> X-Spam-Bar: +++++++
> X-Spam-Report: Action: no action
> Symbol: HAS_REPLYTO(0.00)
> Symbol: BAYES_SPAM(0.35)
> Symbol: REDIRECTOR_FALSE(0.00)
> Symbol: R_SPF_ALLOW(-0.20)
> Symbol: RCVD_IN_DNSBL_JKM(0.00)
> Symbol: TO_DN_NONE(0.00)
> Symbol: URI_COUNT_ODD(1.00)
> Symbol: DKIM_TRACE(0.00)
> Symbol: MX_GOOD(0.00)
> Symbol: SUBJ_EXCESS_QP(1.20)
> Symbol: FORGED_SENDER(0.30)
> Symbol: RCVD_TLS_LAST(0.00)
> Symbol: MIME_TRACE(0.00)
> Symbol: ASN(0.00)
> Symbol: FROM_NEQ_ENVFROM(0.00)
> Symbol: R_MIXED_CHARSET(0.58)
> Symbol: ARC_NA(0.00)
> Symbol: MSGID_MKT_DOMAIN_BLK2(5.00)
>
>
> Rspamd adds to the headers as a space or tabulation in the string "Symbol:".
>
>
> With the following condition I am trying to find the Symbol header but it doesn't work for me:
>
> condition = "${if match{def:$h_ Symbol:}{(?i)MSGID_MKT_DOMAIN_BLK2}{yes} {no}}"
>
> The problem occurs because there are spaces in the spam report.
>
> Any ideas?


My first thought is, can you use a system filter (like an exim-format .forward file,
but applies to all deliveries, not just those to a specific user) ?
-- 
Andrew C. Aitchison                    Kendal, UK
             andrew@???