[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postfix auth & content_filter



Marek Podmaka wrote:
Hello all,

Is there a way to turn off content_filter in postfix (I have postfix 2.1 -
debian stable) for all messages coming from authentificated users? What I am
trying to do is to check only inbound mail for vir&spam, but not outbound
(sent by users using smtp auth). Is something like this possible?
It's possible to use a combination of transport maps and the restriction classes to accomplish this, but I'm not sure exactly how.
If not, is it possible to configure postfix to put some information about
smtp auth to the message headers? Then my filter would be able to identify
such messages and not scan them.

Or 3rd option - which should be possible in my opinion - is to have
different IP in MX records (for inbound mail) and different IP set in users
mail clients (for "outbound") - with no content_filter and only smtp auth
users allowed. Is this possible to set-up in 1 postfix instance (master.cf)
or we need to run 2 postfix with different configs?
Bind two IP addresses to the machine.  In master.cf, use something like this

192.168.1.101:25 inet n  -       n       -       -       smtpd
   -o content_filter=
-o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject -o smtpd_helo_restrictions=permit_mynetworks,permit_sasl_authenticated,reject -o smtpd_sender_retrictions=permit_mynetworks,permit_sasl_authenticated,reject -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
   -o mynetworks=127.0.0.0/8

Where 192.168.1.101 is the IP you want your users to use.
-o content_filter= overrides the content filter for that ip, and the other -o smtpd_*_restrictions ensure that only authenticated users, or localhost, can use that ip.

--
Chris Jones // Network Administrator
Top Level Internet

e: chrisj@toplevel.net.au




Reply to: