excluding checks for @mynetowrks - amavis vs. postfix problem

Mark Martinec Mark.Martinec+amavis at ijs.si
Wed Sep 21 16:00:25 CEST 2011


> I want to exclude some part of Postfix's mynetworks from Amavis spam checks, 
> but really only some part, the rest should be checked as ussual. The "some 
> part" is a subnet, in that I have all my servers sending emails, that should
> be excluded.
> For example here I'm trying to say, that my servers (that I want to exclude) 
> are in subnet.

 @client_ipaddr_policy = (
   [qw( )] => 'MYSERVERS',
   \@mynetworks => 'MYNETS',

$policy_bank{'MYSERVERS'} = {
  originating => 1,
  bypass_decode_parts => 1,
  bypass_virus_checks_maps => [1],
  bypass_banned_checks_maps => [1],
  bypass_spam_checks_maps => [1],

amavisd-new-2.6.3 release notes:

- added a configuration variable @client_ipaddr_policy, which maps smtp
  client's IP address lookup lists to a policy bank name. This allows for
  loading a policy bank based on a client IP address, and generalizes a
  formerly hard-wired mapping of @mynetworks_maps into 'MYNETS'.
  The list is traversed in order, the first matching networks list stops
  the search and its associated policy name is used. Suggested by Jo Rhett.

  The default setting retains backwards compatibility:

    @client_ipaddr_policy = map { $_ => 'MYNETS' } @mynetworks_maps;

  but please keep in mind that this assignment is made during startup
  before evaluating a config file, so if amavisd.conf changes the
  @mynetworks_maps list, the assignment to @client_ipaddr_policy needs to
  be re-evaluated to retain a desired default. This is not necessary when
  @mynetworks_maps is left untouched but only its component @mynetworks
  is changed.

    @client_ipaddr_policy = (
      [qw( [::] [::1] )]            => 'LOCALHOST',
      [qw( ! )] => 'PRIVATENETS',
      [qw( )]        => 'PARTNER',
      \@some_other_networks  => 'OTHER',
      \@mynetworks           => 'MYNETS',


More information about the amavis-users mailing list