procmail
[Top] [All Lists]

Re: ackmail.rc not acking correctly?

1999-12-02 08:18:48
"W. Mark Herrick, Jr." <markh(_at_)va(_dot_)rr(_dot_)com> writes:
*This is a multi-post reply.*

At 12:31 PM 12/2/99 +0200, Era wrote:

 > I figured out where the issue was.
 > In the ackmail.rc:
 >      # Replace the body with the ack message
 >      :0 fbw
 >      | cat $ACKFILE
 > I had to add a "-" (dash) either after or before the $ACKFILE.

Confusion. I can't see how this affects Procmail's PATH in any way.

Neither do I.

I *think* it has something to do with the pipe. The error that I was 
getting in my log file was "Error while writing to cat".

I looked that up in the man pages, and it says:

"Nonexistent subdirectory, no write permission, pipe died or disk full."

Since A, B, and D aren't true, I'm thinking it's C....

I have no clue what putting that "-" (either before or after) did to the 
pipe, all I know is that now it works...

The '-' argument tells cat to copy stdin at that point in its processing.
If you put the '-' after the $ACKFILE then you'll have prepended the
contents of $ACKFILE onto the body, and if you put the '-' before the
$ACKFILE then you'll append the contents of $ACKFILE onto the body.
That's what the '-' does.

Now, if you just want to replace the body completely, you obviously
don't want to give cat the '-' argument.  This means that cat doesn't
read the data being piped to it by procmail.  This means that for large
enough messages (larger than PIPE_BUF), procmail will get a write error
on the pipe.  If the recipe has the 'w' or 'W' flag, procmail will treat
write error as a failure of the action and will undo the filtering.
To tell procmail to ignore the write error (you expect it and don't care)
give the recipe the 'i' flag.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>