Am 22.09.2016 um 04:51 schrieb Indunil Jayasooriya:



    but somehow amavis is ignoring the bypass_header_checks_maps for
    $policy_bank{'MYNETS'}

    anymore ideas to get things working would be awesome ;)



          do you have these lines


$mydomain = 'yourdomain.com <http://yourdomain.com>'; # a convenient default for other settings


 $notify_method  = 'smtp:[127.0.0.1]:10025';
 $forward_method = 'smtp:[127.0.0.1]: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. - http://www.iredmail.org/forum/topic4681-iredmail-support-solved-how-to-bypass-amavisd-for-some-senders.html <http://www.iredmail.org/forum/topic4681-iredmail-support-solved-how-to-bypass-amavisd-for-some-senders.html>

*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 @)
Example:

|us...@example.com <mailto:us...@example.com> us...@example.org <mailto:us...@example.org> example.net <http://example.net> example.eu <http://example.eu>|

*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. 213.133.108.221, of another server of mine into the mynetworks

@mynetworks = qw( 213.133.108.221 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );

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[127.0.0.1] ... 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 ... 127.0.0.1 does not work! another IP like 213.133.108.221 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
becki

Reply via email to