[Rspamd-Users] issue in multimap mode regexp

Mickaël Dequidt Mickael.Dequidt at ifremer.fr
Thu May 4 07:43:38 UTC 2023


Hello,

I'm encountering an issue with the regexp mode inside a multimap rule : 
the regexp seems not to be interpreted correctly.

I have a multimap rule to basically whitelist messages based on envelope 
from :

> sender_from_whitelist {
>   type = "from";
>   filter = "email";
>   require_symbols = "!CLAM_VIRUS";
>   map = "/${LOCAL_CONFDIR}/local.d/maps.d/whitelist-envelope-from.map";
>   symbol = "SENDER_FROM_WHITELIST";
>   action = "accept";
>   regexp = true;
> }

Inside local.d/maps.d/whitelist-envelope-from.map, I have in each line 
either a domain, a subdomain or a complete address, which is possible 
thanks to the regexp mode.

But I now realize that it doesn't work every time :

> /gmail\.com/

works (message accepted and SENDER_FROM_WHITELIST symbol added)

> /name at gmail\.com/

works as well (same behaviour), but

> /surname\.name at gmail\.com/

doesn't work (no symbol added, no special treatment), and I cannot 
understand why.

Would you have an idea as to how to explain that ? Am I making an 
obvious mistake in the writing of the regexp ? Is it the . in the local 
part that is not understood ?

Thanks,

-- 
Mickaël DEQUIDT
IFREMER - Service IRSI/RIC
Centre Ifremer Bretagne - ZI de la pointe du diable
CS 10070 - 29280 Plouzané
Tel : +33 (0)2 98 22 46 04 - Fax : +33 (0)2 98 22 46 47


More information about the Users mailing list