Roderick Schertler <roderick(_at_)argon(_dot_)org> wrote:
Am I misinterpreting what these flags are for?
No.
I find that I basically always want to use the flags w (this action
failed if the program exits non-zero) and r (don't add a trailing
newline) when I'm mailing to a program. That's normal, isn't it? It
Not necessarily...
seems odd to me that these aren't the default when mailing to programs.
The defaults where created with the following in mind:
- Many shell/C programmers forget to return a zero exitcode from their
script or program. Hence, they'll get surprise failures from programs
that seem to work just fine. I.e. typical cases would have been:
"I run this program from the command line and it works like a charm.
When I start it from my .procmailrc it reports a failure. Why is that?"
So 'w' is not the default. If you need/want 'w', you're supposed to know
what you are doing. Clueless people might get by without ever knowing that
'w' existed.
- As for 'r'... People tend to expect things like:
:0
| cat >>mymailbox
to work as expected and try to access "mymailbox" as any regular mailbox.
If 'r' is used, this is *not* guaranteed. Besides, most programs processing
mails would expect the mail to be in "mailbox" format. "mailbox" format
implies an empty line at the end of the mail.
--
Sincerely,
srb(_at_)cuci(_dot_)nl
Stephen R. van den Berg (AKA BuGless).
WARNING: Do not look into laser with remaining eye