Procmail documents:
Favorite Filters I Have Known include ones [annotate] from
Procmail is easy to set up. The most delicate aspect of a first filter is writing the .forward precisely. Here are a few variations I've encountered:
"|IFS=' ' && exec /usr/local/bin/procmail -f-
|| exit 75 #claird"
"|IFS=' ' && exec /usr/local/bin/procmail -f-
|| exit 75 #claird"
"|IFS=' ' && exec /usr/bin/procmail -f-
|| exit 75 #claird"
I have a regret about the article; it is that we didn't say a few more words about the $HOME/.procmail/log file where procmail records its activity. If procmail is doing something different from what you expect, or you want to develop metrics on what procmail does for you, or you just want to understand its operation better, browse the log. Also, be aware that procmail logs can become big; many procmail users periodically erase/archive/replace/... their logs.
Thanks to Richard Hanby and Ric Steinberger who caught the out-of-place '$' in the original release of the article. Thanks also to Jari Aalto, who wisely recommended we should warn readers that
As a precaution, always set SHELL=/bin/sh at the beginning of your .procmailrc. This is a good safety measure.Jari adds that
PATH
is also a candidate for explicit
definition.