See UsedViaProcmail for a quick introduction.
more complex discussion
Many people used procmail rules to filter out spam long before they ever heard of SpamAssassin. Those rules are all-or-nothing – perhaps it would be better to convert them to "soft" SpamAssassin rules (rules that merely add a small amount to the score). See WritingRules.
A few people convert "all-or-nothing" SpamAssassin rules (most people mark these by giving them a score of "100") to procmail rules, to help reduce CPU time.
(EditHint: I just made up the "all-or-nothing" and "soft" terms. What do you call them ?)
In the example
http://spamassassin.org/dist/procmailrc.example
# Work around procmail bug: any output on stderr will cause the "F" in "From" # to be dropped. This will re-add it. :0 * ^^rom[ ]
. The double-caret (^^
) anchors the expression at the very start of the search area (it's a procmail extension to the egrep syntax). The very beginning of the envelope *should* start with "From" followed by a space (later in the email there's often another "From" followed by a colon).
Once everyone has installed the 3.23pre version of procmail (or an even more recent version), we should no longer need the work-around: http://q.queso.com/archives/000927
(Thanks Martin ! – DavidCary)