On Fri, Nov 01, 2013 at 11:44:10AM +0100, Zenon wrote:
> following http://www.postfix.org/FILTER_README.html#simple_filter , 
> I try to implement a simple filter, one for outgoing emails and one 
> for incoming emails.

One thing I can suggest up front is that you are "reinventing the
wheel": amavisd-new can already do this, as a high-performance single 
filter with policy banks which control settings based on criteria you 
specify.

> so , i configure my master.cf as follows:
> 
> cdmsout    unix  -       n       n       -       10      pipe
>         flags=Rq user=filtercdms null_sender=
>         argv=/etc/postfix/filterCdmsOut.sh -f ${sender} -- ${recipient}
> cdmsin    unix  -       n       n       -       10      pipe
>         flags=Rq user=filtercdms null_sender=
>         argv=/etc/postfix/filterCdmsIn.sh -f ${sender} -- ${recipient}
> smtp      inet  n       -       -       -       -       smtpd
>         -o content_filter=cdmsout:dummy
> smtp      unix  n       -       -       -       -       smtpd

This looks like you added a "d" onto the smtp(8) command line. Do not 
confuse smtpd(8), the SMTP server, with smtp, the client. smtpd is a 
type "inet" service; smtp is "unix". Most MTAs need both services.

>         -o content_filter=cdmsin:dummy
> 
> but, it is not working for outgoing emails.
> 
> what's wrong ?

Probably other things as well: how are you distinguishing "outgoing" 
emails from "incoming"? All mail comes in. All mail goes out.

> thanks for your tips

Scrap it all and start setting up amavisd-new.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to