On 10/17/2011 1:54 AM, Roland de Lepper wrote:
> Hi again,
> 
> Last week I posted about chaining content_filters in master.cf
> <http://master.cf>, but after spending 16 hours trying to get it to
> work, i'm still with empty hands.
> So here again my situation in the hope somebody will help me to set
> this up for me.
> Btw, I'm running Postfix with Zarafa and a MS LDAP backend for user
> authentication.
> 
> I have a disclaimer working which add a disclaimer to every email
> which is send out. This disclaimer is configured in postfix as followed:
> 
> master.cf <http://master.cf>:
> smtp      inet  n       -       -       -       -       smtpd
>       -o content_filter=dfilt:
> 
> dfilt     unix    -       n       n       -       -       pipe
>    flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} --
> ${recipient}
> 
> This is all working fine!
> 
> Now I wants to add an autoreply for some resource mailboxes, like
> i...@example.com <mailto:i...@example.com>.
> If I configured it like the example below, the autoreply is working
> great:
> 
> master.cf <http://master.cf>:
> smtp      inet  n       -       -       -       -       smtpd
>       -o content_filter=autoresponder
> 
> autoresponder unix - n n - - pipe
>    flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s
> ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address}
> 
> But If I combine those two (double content_filter in the smtpd
> section on top of the master.cf <http://master.cf> file), only the
> last parameter is working.
> this is the way Postfix works. The solution to my problem, is
> chaining content_filters. But after spending 16 hours, I still don't
> have this working.
> 
> The autoresponder script i'm using is from this website:
> http://nefaria.com/project_index/autoresponse/
> 
> I understand the flow in Postfix for multiple content_filters, but
> can't seem to get it working. (25 -> queue-manager -> 10025 -> 10026
> -> 10027 -> 10028 -> queue-manager

To chain content_filters, the basic idea is to connect the output of
the first filter to the input of the next filter.

The 10025 -> 10026 -> 10027 -> 10028 method is for SMTP based filters.

You're using pipe based filters -- postfix docs call these simple
content filters -- so you need a different method.

Chaining simple content filters is generally done outside of
postfix.  What you need to do is change the first filter to send
it's output directly to the second filter rather than putting the
mail back in postfix.  The second filter then returns the mail to
postfix using the sendmail(1) command.

postfix | filter1 | filter2 | {postfix sendmail command}

Probably you can just change the final "sendmail" command in the
first filter to the command for the second filter.


  -- Noel Jones

Reply via email to