OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: after-queue content filter question

From: Bryan Irvine (sparctacusgmail.com)
Date: Tue Feb 05 2008 - 13:28:39 CST


This server has lots of virtual domains, and I want all inbound mail
on a single domain only to go to a script for processing.

I've set up a pipe, and was following the after-queue content filter
readme for examples on the proper way to handle the mails.

Is this the wrong track I'm on?

-Bryan

On Feb 5, 2008 10:49 AM, Magnus Bäck <magnusdsek.lth.se> wrote:
> On Tuesday, February 05, 2008 at 18:56 CET,
>
> Bryan Irvine <sparctacusgmail.com> wrote:
>
> > I'm trying to set up a filter that takes mail for a specific domain
> > and delivers the mail to a script. I've read the README but am
> > confused a little.
> >
> > The sample shell script grabs the status of the Postfix sendmail
> > command to use as the exit status when it re-injects, but since I'm
> > not going to be re-injecting anything at all for this domain do I just
> > always return EX_UNAVAILABLE??
>
> If your script is successful, return a zero exit status. If your script
> fails in any way and the sender must be notified, return EX_UNAVAILABLE
> or some more suitable exit status. If your script fails because of a
> transient error condition, return EX_TEMPFAIL to have Postfix retry the
> delivery at a later time.
>
> But if you never reinject a message, why implement this as a filter?
>
> --
> Magnus Bäck
> magnusdsek.lth.se
>