|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Noel Jones (njones
megan.vbhcs.org)
Date: Tue Mar 06 2007 - 17:47:17 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 04:08 PM 3/6/2007, mouss wrote:
>Sebastian Reitenbach wrote:
>>Hi,
>>I have configured postfix to append a disclaimer on every mail that
>>comes in via
>>smtp from our users and leaves the mail server to externals. That
>>works well, with these
>>three lines in master.cf:
>>
>>
>>smtp inet n - n - 2 smtpd -o
>>content_filter=smtp:
>>[127.0.0.1]:10024
>>localhost:10025 inet n - n - - smtpd -o content_filter=dfilt:
>>dfilt unix - n n - - pipe flags=Rq
>>user=filter argv=/etc/postfix/disclaimer -f ${sender} -- ${recipient}
>>
>>it is routed via amavis on port 10024, and from amavis it is going to dfilt.
>>and no content_filter= defined in main.cf.
>>
>>
>>On the same host I have a groupware running, that uses /usr/sbin/sendmail
>>directly to send out the mail. How can I tell the sendmail binary
>>to send the mail first to a
>>contents filter and then out. as right now it is sending out the
>>mail directly.
>>
>
>so you're fighting against what you want?
>if the filter should be used for both smtp and sendmail, then put it
>in main.cf (and override it in master.cf under the 10025 listener).
>
>if you don't like that, add "-o content_filter=blahblah" under
>'pickup' in master.cf.
No, looks as if his "dfilt" filter is resubmitting via sendmail, thus
adding a content_filter line to pickup will cause a loop.
The solution is to use multiple postfix instances, or restructure the
"disclaimer" script to submit mail to an smtp port. Maybe use
mini_sendmail as a shim for this. The disclaimer script will need to
be prepared to fail gracefully and not lose mail in case the smtp
submission fails.
--
Noel Jones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]