procmail
[Top] [All Lists]

Re: scope of locking (tiglet)

1997-04-11 11:51:00
When I suggested to Bill Evans,

T> But here's a thought: does $SGHOMEX/eeyore.pl write to stdout?  If not,
T> we can simplify it greatly by putting the perl call into the action line
T> as we do with formail -D:

T>      :0W:$SGHOMEU/eeyore.lock
T>      | $SGHOMEX/eeyore.pl

Bill responded,

E> Simple answers like this are beautiful beyond belief, and are worth
E> far more than the price of my subscription to this list.  :)  But
E> since eeyore.pl doesn't always read all of stdin, I presume I'd need
E> to keep the "i" flag in there, right?

Yes, you would.  Otherwise, as I understand, procmail would notice a write
error and always consider the action to have failed.

However, if the part that eeyore.pl reads is the head or the body, you can
take care of that with the `h' or `b' flag respectively instead of `i'.

Stan Ryckman commented,

R> Here's another thought... even if it does write to stdout, couldn't you
R> then write instead?:

R>      :0W:$SGHOMEU/eeyore.lock
R>      | $SGHOMEX/eeyore.pl > /dev/null

Yes, you could.  (Good idea, Stan.)  In fact, if procmail is running in the
background on incoming mail, stdout of commands in action lines (except on
filter or capture recipes) usually vanishes anyway, doesn't it?  At least my
experience seems to bear that out.

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