OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: automatically appending disclaimer to mails sent via /usr/sbin/sendmail

From: mouss (mlist.onlyfree.fr)
Date: Tue Mar 06 2007 - 16:08:39 CST


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.