Re: postfix filter function with amavis smtpd-proxy

Patrick Ben Koetter <[email protected]>
Newsgroups gmane.mail.virus.amavis.user
Message-ID <[email protected]>
Hi,

* [email protected] <[email protected]>:
> in my lab i create in amavisd a policy bank with another port for bypass
> virus and spams for a certain domain. but amavis check every time the mail
> and block them.
> 
> i read, that the postfix filter action function doesn't work with amavis as
> a smtpd-proxy, only as a content-filter is this correct?

this is correct. The routing tables that would route a message for a specific
domain/recipient to another port, are not evaluated in a smtpd_proxy setup.

> if yes, how can i create a virus and spam whitelist for some {senders,domains,hosts}?
> all my attempts to create a whitelist failed.

For sender domains, if they DKIM-sign their messages, you can use route their
dkim-signed and verified messages like this:

@author_to_policy_bank_maps = ( {
    'state-of-mind.de'          => 'WHITELIST,NOBANNEDCHECK,NOVIRUSCHECK',
    '.paypal.de'                => 'WHITELIST',
    'amazon.de'                 => 'WHITELIST',
} );

For hosts you would use this:

@client_ipaddr_policy = (
    [qw( 0.0.0.0/8 127.0.0.1/32 [::] [::1] )] => 'LOCALHOST',
    [qw( !172.16.1.0/24 172.16.0.0/12 192.168.0.0/16 )] => 'PRIVATENETS',
    [qw( 192.0.2.0/25 192.0.2.129 192.0.2.130 )] => 'PARTNER',
    [qw( 212.7.160.0/19 )] => 'SUBMISSION',
    \@mynetworks => 'MYNETS'
);


In both cases the STRINGS on the right hand name a policy bank. One that omits
virus checks could look like this:


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

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

HTH

p@rick

-- 
[*] 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.