On 4/25/06, Professional Software Engineering
<PSE-L(_at_)mail(_dot_)professional(_dot_)org> wrote:
It's time for "Learning from the mistakes of others"
Always a good idea.
A common simple recipe I have is like so:
:0
* conditions (may or may not be scored, may be single or multiple lines)
{
:0c:
| formail -A "someheader: descriptor" >> $DEFAULT
:0:
| gzip -9fc >> specific_archive.gz
}
Interesting. I'd have done that like this (just the part inside the
braces, I don't care what the outer conditions are):
:0c:
| gzip -9fc >> specific_archive.gz
:0 fhw
| formail -A "someheader: descriptor"
SWITCHRC
I dislike referring directly to $DEFAULT, and I definitely dislike
appending to it by redirection rather than letting procmail figure out
the right way to deliver to it (in case it's not a plain mbox file in
some new place to which I might try to copy my procmailrc).
I *think* another advantage of rewriting it to use SWITCHRC is that in
the event of your paren-for-brace typo you'd still get the messages in
your inbox, all tagged with "descriptor", making it a little faster to
track down the problem recipe. However, I didn't actually sandbox it
to make sure.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail