On Wed, Sep 14, 2005 at 09:57:48PM +0300, Henrik Krohns wrote: > > Well.. I spent some debugging and came to the conclusion that when sending a > dsn, the first postfix doesn't send XFORWARD and that is the only thing > amavisd checks from mynetworks. > > I probably need to hack amavisd to think that if there is no XFORWARD, then > the sender addr is 127.0.0.1. I think there isn't any other case that > XFORWARD isn't sent, so it should be safe?
So the hack is done. Now it works logically, message is seen coming from mynetworks and MYNETS policy is loaded. --- amavisd-2.3.3.orig Mon Aug 22 02:46:15 2005 +++ amavisd Thu Sep 15 00:02:17 2005 @@ -11804,6 +11804,14 @@ $initial_am_id = 0; Amavis::check_mail_begin_task(); $self->prepare_tempdir; + + # if no XFORWARD is set, then local postfix submitted it directly + if ($xforward_args{'ADDR'} eq '') { + $xforward_args{'ADDR'} = "127.0.0.1"; + $xforward_args{'NAME'} = "localhost"; + $xforward_args{'PROTO'} = "ESMTP"; + $xforward_args{'HELO'} = "localpfix"; + } my($cl_ip) = $xforward_args{'ADDR'}; if ($cl_ip ne '' && defined $policy_bank{'MYNETS'} && lookup_ip_acl($cl_ip,@{ca('mynetworks_maps')}) ) { Cheers, Henrik ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/