[Rspamd-Users] Regex in Multimap does not work

Andreas Wass - Glas Gasperlmair a.wass at glas-gasperlmair.at
Tue Nov 30 13:43:37 UTC 2021


now i changed map type = "header"; and  header = "subject"; and now 
following regex is matching Subject which is exactly Re:

/Re:\z/ MY_OWN_SYMBOL:5

seems regex depends on the type of map

thx a lot Vsevolod

best regards, Andi

Am 30.11.2021 um 13:57 schrieb Vsevolod Stakhov:
> Hello,
>
> Please refrain from top posting: this list uses bottom posting for replies.
>
> On 30/11/2021 12:24, Andreas Wass - Glas Gasperlmair wrote:
>> i did a few tests and in this article
>> https://rspamd.com/doc/modules/multimap.html#regexp-maps
>> is a link to
>>
>> http://intel.github.io/hyperscan/dev-reference/compilation.html#pattern-support
>>
>> and below "Supported Constructs" are also anchors ^ and $
>>
>> so why does these expressions not matching to following line
>>
>> Subject: Re:
>>
>> /Subject: Re:\z/ MY_OWN_SYMBOL:8
>> or
>> /Subject: Re:$/ MY_OWN_SYMBOL:8
>> or
>> /^Subject: Re:$/ MY_OWN_SYMBOL:8
>>
>> the following applies, but also if there is something after Re:
>>
>> /Subject: Re:/ MY_OWN_SYMBOL:8
>>
>> So, how can i match strings with rspamd, ending with in this case "Re:" ?
>>
>> best regards, Andi
>>
> As I have said previously, your problem is that you are using an
> incorrect map type. I don't have enough time to explain your error in
> more details, I'm afraid. Just change the type or wait for someone else
> to explain why your map does not work.



More information about the Users mailing list