Am 22.09.2016 um 04:51 schrieb Indunil Jayasooriya:

    but somehow amavis is ignoring the bypass_header_checks_maps for

    anymore ideas to get things working would be awesome ;)

          do you have these lines

$mydomain = ' <>'; # a convenient default for other settings

 $notify_method  = 'smtp:[]:10025';
 $forward_method = 'smtp:[]:10025';  # set to undef with milter!

in addition to that , if you want to bypass spam checks based on sender you can add this to amavisd.conf file

 @whitelist_sender_maps = read_hash("$MYHOME/white.lst");

in white.lst file , you can add your domain and other trusted domains line by line.

you can have black.lst as well.

 @blacklist_sender_maps = read_hash("$MYHOME/black.lst");

Anther example. ( I have NOT DONE it. I saw this in the internet.

source. - <>

*1) I created the file /etc/amavisd/whitelist*
where I inserted the addresses of the senders that I wanted to whitelist, one per line.
it works also for whole domains (but without the @)

| <> <> <> <>|

*2) in /etc/amavisd/amavisd.conf I decommented AND modified the following section:*

|# This policy will perform virus checks only. read_hash(\%whitelist_sender, '/etc/amavisd/whitelist'); @whitelist_sender_maps = (\%whitelist_sender); $interface_policy{'10026'} = 'VIRUSONLY'; $policy_bank{'VIRUSONLY'} = { # mail from the pickup daemon bypass_spam_checks_maps => ['@whitelist_sender_maps'], # don't spam-check this mail bypass_banned_checks_maps => ['@whitelist_sender_maps'], # don't banned-check this mail bypass_header_checks_maps => ['@whitelist_sender_maps'], # don't header-check this mail };|

hello again ;)

thanks a lot for your reply!

i have already implemented whitelists like you suggested as a workaround for the not working policy MYNETS but you know how it is ... it always bugs me if something doesn't work as expected ;)
and workarounds ... well, you know ;)

i would prefer a working policy_bank MYNETS which bypasses spam checks

$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1, # is true in MYNETS by default, but let's make it explicit
  os_fingerprint_method => undef,  # don't query p0f for internal clients
  bypass_spam_checks_maps   => [1],  # don't spam-check

funny thing is, if i add another IP address, e.g., of another server of mine into the mynetworks

@mynetworks = qw( [::1] [FE80::]/10 [FEC0::]/10 );

then the policy bank works perfectly! emails from that IP will not get checked for SPAM but if it's the local host ... localhost.localdomain[] ... then the policybank isn't get picked up!

does ist perhaps something to do with the domain name 'localhost.localdomain'?
does the domain name have precedence over the IP address??

thing is ... does not work! another IP like DOES work!

i also found that piece of config with a VIRUSONLY policy_bank, but it's nothing i need at the moment.
i want that existing policy_bank MYNETS to work ;)

thanks a lot for your time & help!

greetings from germany

Reply via email to