Typo in @client_ipaddr_policy?

Mark Martinec Mark.Martinec+amavis at ijs.si
Wed Apr 4 19:47:56 CEST 2012


> is '' in your @client_ipaddr_policy example
> in RELEASE_NOTES correct?
>     @client_ipaddr_policy = (
>       [qw( [::] [::1] )]            => 'LOCALHOST',
>       [qw( ! )] => 'PRIVATENETS',
>       [qw( )]        => 'PARTNER',
>       \@some_other_networks  => 'OTHER',
>       \@mynetworks           => 'MYNETS',
>     );
> Shouldn't that be or

Yes, it should be, although the works just as well
in amavis because of the implied CIDR mask which zeroes-out trailing bits.
Now fixed in release notes.

> And what about Does that declare the IPv4 namespace to be part of
> the LOCALHOST policy bank?

Yes, the 0.*.*.* belongs to 'this' network:

RFC 5735: - Addresses in this block refer to source hosts on "this"
   network.  Address may be used as a source address for this
   host on this network; other addresses within may be used to
   refer to specified hosts on this network ([RFC1122], Section

Such address is not seen in actual TCP sessions, but has a
somewhat special meaning in a context of @client_ipaddr_policy 
(and its component @mynetworks_maps) :

amavisd-new-2.4.5 release notes

- for the purpose of looking up client IP address in @mynetworks_maps,
  treat unknown/unavailable IP address as;  this allows treating
  directly submitted mail on the MTA host (not submitted through SMTP) as
  coming from IP address (i.e. "This" Network - according to RFC 1700);

  Note that this is indistinguishable from other reasons when IP address
  is not made available to amavisd, e.g. when smtp_send_xforward_command
  option in Postfix smtp service is not enabled, which is why the default
  setting of @mynetworks does not include a network to prevent
  unintentionally loading a MYNETS policy bank.

  One should add to a @mynetworks list only when XFORWARD is known
  to work and if some software on the MTA host is submitting its mail to MTA
  directly, e.g. through a sendmail mail submission command (or its lookalike),
  and MYNETS policy bank loading is needed for proper processing of such mail
  (e.g. DKIM signing or adding disclaimers in later versions of amavisd);

amavisd-new-2.6.0 release notes

- in the absence of an smtp client's IP address (normally received by XFORWARD
  smtp command from Postfix, or in the 'client_address' attribute of AM.PDP),
  parse the topmost one or two Received header fields and use the first
  valid IP address found there; based on a suggestion by Richard Bishop;

Tobias Hachmer wrote:
> I think [::], the unspecified ipv6 address which never would be
> assigned by any node also doesn't belong to localhost...

Indeed. But in the same sense as the above it is
reasonable to treat it as local by @client_ipaddr_policy.


More information about the amavis-users mailing list