postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: Newb question - simple script

Re: Newb question - simple script

From: Jeroen Geilman <jeroen_at_nospam>
Date: Tue Oct 12 2010 - 19:57:32 GMT

On 10/11/2010 11:07 PM, jimmy zoto wrote:
> I'm trying to copy all incoming mail to a local FIFO file for special
> purpose processing by a Java program. I don't know the best way to do
> this.

FIFO certainly isn't it.

If you must go this route, use a pipe(8) transport fed by always_bcc so
you can at least return the basic OK/REJECT status codes with your script.

But as both Victor and Wietse already suggested, SMTP has the full
spectrum of status codes available.

> I can execute this successfully on the command line, but I haven't
> been able to run it successfully from Postfix. It doesn't matter
> whether the destination file is a normal file or a FIFO. Nothing shows
> up in the logs. I have no indication the script is running. I copied
> the script into the queue_directory and have it entered in
> <> as :
> pipefilter unix - n n - 1 pipe flags=Rq user=filteruser
> argv=pipefilter -vvv --

How is that a FIFO ?

pipe(8) allows you to keep the session open until it returns, it's
certainly not one-way (the exit status is returned to postfix).

-- J.