Discussion:
Mail from localhost is not local
Thomas Bange
2005-10-24 09:06:43 UTC
Permalink
Hi,

I'm running postfix with amavis as a relay for our
exchange server. I setup the MYNETS policy bank to
skip spam checks for mail from internal to external.
For mail which originates from exchange to external
recipients this is working perfectly. However, mail
which is beeing generated local is not recognised
as local mail and is still fully checked (i.e. just
doing a 'mail -s Test root < /dev/null).

In amavisd.conf mynetworks is configured as followed:

@mynetworks = qw( 127.0.0.0/8 ::1 192.168.x.x/24 + some
other local networks );

I don't understand, why mail from localhost is not
recognised as local by amavis.
Any hints?

Greetings,
Tom


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
AMaViS-user mailing list
AMaViS-***@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/
Gary V
2005-10-24 13:44:15 UTC
Permalink
Post by Thomas Bange
Hi,
I'm running postfix with amavis as a relay for our
exchange server. I setup the MYNETS policy bank to
skip spam checks for mail from internal to external.
For mail which originates from exchange to external
recipients this is working perfectly. However, mail
which is beeing generated local is not recognised
as local mail and is still fully checked (i.e. just
doing a 'mail -s Test root < /dev/null).
@mynetworks = qw( 127.0.0.0/8 ::1 192.168.x.x/24 + some
other local networks );
I don't understand, why mail from localhost is not
recognised as local by amavis.
Any hints?
Greetings,
Tom
Locally generated mail uses the 'pickup' mechanism to send mail as
opposed to smtp (so '-o smtp_send_xforward_command' is not used here).
One thing you can do is bypass amavisd-new for locally generated mail
by using an override in the 'pickup' mechanism:

pickup fifo n - - 60 1 pickup
-o content_filter=

Gary V



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
AMaViS-user mailing list
AMaViS-***@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/
Mark Martinec
2005-10-24 17:22:03 UTC
Permalink
Tom,
Post by Thomas Bange
I setup the MYNETS policy bank to
skip spam checks for mail from internal to external.
For mail which originates from exchange to external
recipients this is working perfectly. However, mail
which is beeing generated local is not recognised
as local mail and is still fully checked (i.e. just
doing a 'mail -s Test root < /dev/null).
pickup service does not supply client IP address to a content
filter as there is no client IP address when mail is submitted
directly, e.g. through sendmail binary or 'mail' utility.

There are other mechanisms beside xforward to request policy bank
switching. If a client IP address is not available (like in case
of a pickup service), one can cause a Postfix service like pickup
to send mail for content filtering to a different port, e.g.:

pickup fifo n - n 60 1 pickup
-o content_filter=smtp-amavis:[127.0.0.1]:10043

and let amavisd apply a specific policy bank (MYNETS or any
other bank name) when request comes in on such port, e.g.:

$inet_socket_port = [10024,10043];
$interface_policy{'10043'} = 'MYNETS';

See http://www.ijs.si/software/amavisd/amavisd-new-docs.html#pbanks

If all you need is to skip content filtering for mail coming
in through pickup, just do what Gary suggested, supplying
an empty content_filter option to pickup service to override
a global setting.

Mark



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
AMaViS-user mailing list
AMaViS-***@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/
Henrik Krohns
2005-10-24 18:03:30 UTC
Permalink
Post by Thomas Bange
Hi,
I'm running postfix with amavis as a relay for our
exchange server. I setup the MYNETS policy bank to
skip spam checks for mail from internal to external.
For mail which originates from exchange to external
recipients this is working perfectly. However, mail
which is beeing generated local is not recognised
as local mail and is still fully checked (i.e. just
doing a 'mail -s Test root < /dev/null).
@mynetworks = qw( 127.0.0.0/8 ::1 192.168.x.x/24 + some
other local networks );
I don't understand, why mail from localhost is not
recognised as local by amavis.
Any hints?
I had the same problem..

If it happens that setting content_filter for pickup daemon
doesn't work, you could try my way:

http://marc.theaimsgroup.com/?l=amavis-user&m=112673242318594&w=2

Cheers,
Henrik


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
AMaViS-user mailing list
AMaViS-***@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/

Loading...