Whitelisting specific sender addresses for specific recipient addresses
Dominic Raferd
dominic at timedicer.co.uk
Tue Jan 8 09:47:59 CET 2019
On Tue, 8 Jan 2019 at 08:37, Engels, Jan <jan.engels at desy.de> wrote:
>
> Hi everyone,
>
> I'm currently trying to setup amavisd-new for whitelisting emails **from** a specific sender address **to** a specific recipient address (under CentOS 7). By whitelist I mean no virus/banned/header checks and no spam tagging. The whitelisting should however only apply for specific senders on a per-recipient basis.
>
> Using the @score_sender_maps I can easily assign custom spam scores on a per-recipient basis, as shown in the default amavisd.conf:
>
> @score_sender_maps = ({ # a by-recipient hash lookup table,
> # results from all matching recipient tables are summed
>
> ## per-recipient personal tables (NOTE: positive: black, negative: white)
> # 'user1 at example.com' => [{'bla-mobile.press at example.com' => 10.0}],
> # 'user3 at example.com' => [{'.ebay.com' => -3.0}],
> # 'user4 at example.com' => [{'cleargreen at cleargreen.com' => -7.0,
> # '.cleargreen.com' => -5.0}],
> #...
> });
>
> The problem is that using the *_lovers_maps variables does not work using the same syntax, i.e. I've tried for example:
>
> @virus_lovers_maps = ({ # a by-recipient hash lookup table,
> 'user1 at example.com' => [{'news at foobar.com' => 1}],
> });
>
> @banned_files_lovers_maps = ({ # a by-recipient hash lookup table,
> 'user1 at example.com' => [{'news at foobar.com' => 1}],
> });
>
> @bad_header_lovers_maps = ({ # a by-recipient hash lookup table,
> 'user1 at example.com' => [{'news at foobar.com' => 1}],
> });
>
> or using the bypass_*checks_maps variables:
>
> @bypass_virus_checks_maps = ({
> 'user1 at example.com' => [{'news at foobar.com' => 1}],
> });
>
> @bypass_banned_checks_maps = ({
> 'user1 at example.com' => [{'news at foobar.com' => 1}],
> });
>
> @bypass_header_checks_maps = ({
> 'user1 at example.com' => [{'news at foobar.com' => 1}],
> });
>
> and the result in both variants is that **all** emails sent to user1 at example.com get whitelisted (not only the ones coming from news at foobar.com).
>
> Is there some way to get the same behaviour using the *_lovers_maps or bypass_* variables as with the @score_sender_maps variable (i.e on a per-recipient basis)?
>
> Any help would be greatly appreciated.
I think you want: $per_recip_whitelist_sender_lookup_tables (although
it is marked as deprecated)
More information about the amavis-users
mailing list