[Rspamd-Users] Map rcpt and from in single map

Gerald Galster list+rspamd at gcore.biz
Fri Mar 15 16:24:29 UTC 2024


> This multimap type=selector looks like should do exactly what I want but can't get it to work.
> 
> /etc/rspamd/local.d/multimap.conf
> 
> whitelist_rcpt_from {
>  type = "selector";
>  selector = 'from.lower;rcpts.lower';

   ^^^^^^ try:

selector = 'from.lower.append(";");rcpts.first.lower';

There might be more than one recipient.

>  symbol = "TEST_RCPT_FROM_WHITE";
>  map = "/var/lib/rspamd/whitelits_rcpt_from.map";
>  description = "whitelist rcpt_mail:from combination";
>  #score = -10.0;
>  action = "reject";
> }
> 
> /var/lib/rspamd/whitelits_rcpt_from.map
> from-mail at domain.com:to-mail at otherdomain.tld
> from-mail at domain.com,to-mail at otherdomain.tld

It would have been:
from-mail at domain.comto-mail@otherdomain.tld

With the append(";") added to the selector it's:
from-mail at domain.com;to-mail at otherdomain.tld

To see such details, enable multimap debugging in local.d/logging.inc and watch your log:
debug_modules=['multimap'];

Best regards,
Gerald


More information about the Users mailing list