Whitelisting mail servers

Patrick Ben Koetter p at sys4.de
Thu Nov 24 07:23:09 CET 2022


Nick,

* Nikolaos Milas <nmilas at noa.gr>:
> Hello,
> 
> Is there a way to whitelist a mail server so that all mail sent to us by
> that server is accepted, bypassing all other checks, especially Bayes
> filtering?
> 
> The problem is with Banks; we are receiving huge amounts of phishing mail,
> so trained Bayes filters tend to become over-reactive, sometimes discarding
> even real mail.
> 
> My idea was to whitelist the mail servers of the Banks (if I find out how)
> to ensure that their mail reach us, but if you suggest other ways to achieve
> the desired result, I would appreciate your advice.

IPs rarely are selective in times of cloud and shared IP mail platforms such as
outlook.com or gmail.com. You whitelist one legitimate senderdomain and risc
to whitelist another one that sends crap.

I suggest to use valid DKIM signatures, if your bank sends DKIM signed
messages and use one or a list of policy banks to overrule (here: disable)
specific content classifications:

@author_to_policy_bank_maps = ( {
    'yourba.nk'          => 'WHITELIST,NOBANNEDCHECK,NOVIRUSCHECK',
    '.another.tld'       => 'WHITELIST',
    'amazon.com'         => 'WHITELIST',
} );

#############################################################################
## POLICY BANKS: WHITELIST
#

$policy_bank{'WHITELIST'} = {
    bypass_spam_checks_maps => [1],
    spam_lovers_maps => [1],
};

#############################################################################
## POLICY BANKS: NOVIRUSCHECK
#

$policy_bank{'NOVIRUSCHECK'} = {
    bypass_decode_parts => 1,
    bypass_virus_checks_maps => [1],
    virus_lovers_maps => [1],
};

#############################################################################
## POLICY BANKS: NOBANNEDCHECK
#

$policy_bank{'NOBANNEDCHECK'} = {
    bypass_banned_checks_maps => [1],
    banned_files_lovers_maps  => [1],
};

Best,

Patrick

-- 
[*] sys4 AG

https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein



More information about the amavis-users mailing list