Per-domain processing?

Damian amavis at arcsin.de
Mon Jan 31 13:57:13 CET 2022


> I have @local_domains_maps set to all domains for which it
> should process mail, but I'd like to be able to control virus/spam
> scanning, blocklist/allowlist, and other features on a per-domain
> basis. Is this possible?
>
> I'm aware of $policy_bank but isn't that based on IP address? Can I
> set @client_ipaddr_policy based on domain rather than IP? Or perhaps
> there's some sort of @client_domain_policy?

There is no out-of-the-box mechanism for domain-based policybanks. One 
reason might be that Amavis can handle multi-recipient mails, where 
there is no canonical choice which domain-policybank should be loaded.

> Also, Example 3 in the policy banks section from the main doc
> (https://opensource.apple.com/source/amavisd/amavisd-114/amavisd/amavisd-new-2.4.4/README_FILES/amavisd-new-docs.html#pbanks-ex)
> seems to be closest to what I need, but I'm still not understanding.

Example 2 and 3 differ in terms of Postfix configuration, so have a look 
at the Amavis configuration of Example 2. I see that you have gotten a 
"go ahead" for content filtering via transport on the Postfix-ML, so try 
that one instead of FILTER. However, I suppose you shouldn't use a 
relay-transport but something dedicated with 
smtp_send_xforward_command=yes (see README.postfix).



More information about the amavis-users mailing list