[Rspamd-Users] whitelist a specific "from" domain in rspamd but only for a particular "to" domain.
Aban Dokht
mlist at abando.de
Sun Apr 10 11:44:01 UTC 2022
Venkata Ganesh Raju Malyala wrote:
> Dear group,
>
> I am trying to whitelist a specific "from" domain in rspamd but only
> for a particular "to" domain. The ones we generally find in
> documentation are for whitelisting for all mail domains..
>
> Is there a specifc way to do the same.. for example,
>
> I want to whitelist mails coming from the domain hotmail.com only for
> a specific domain example.com
>
> Is that possible? please advise thanks in advance
> Ganesh
I think this should be possible with combindes maps:
https://rspamd.com/doc/modules/multimap.html#combined-maps
Something like this should work:
COMBINED_MAP_AND {
type = "combined";
prefilter = true;
action = "accept";
rules {
todomain = {
type = "rcpt";
map = "$LOCAL_CONFDIR/configs/maps/todomain .list";
selector = "rcpts:domain";
}
fromdomain {
map = "$LOCAL_CONFDIR/configs/maps/fromdomain.list";
selector = "from:domain";
}
}
expression = "todomain & fromdomain "
}
Put hotmail.com in fromdomain.list and example.com in todomain.list
Perhaps there is an easier way to put the domains directly in in the config instead of a map file, but I didn't find anything in the documentation
Regards
Aban
--
Aban Dokht aban.dokht at abando.de
------------------------------------------------------------------
More information about the Users
mailing list