[exim] Condition match header with spaces

Top Page
Delete this message
Reply to this message
Author: Emanuel Gonzalez
To: exim-users@exim.org
Subject: [exim] Condition match header with spaces
I create a router in exim 4.92.2 to move all message that contain an header added by Rspamd.

EXIM Route:

driver = accept
condition = "${if {def:$h_ Symbol:}{(?i)MSGID_MKT_DOMAIN_BLK2}{yes} {no}}"
domains = lsearch;/opt/exim/userdomains
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: 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)

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?