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. Procmail can only decide to filter a message to a particular folder based on expressions that evaluate to true or false (boolean).
However, procmail can filter to multiple mailboxes, for instance, you can create a rule for work-related e-mail, as well as deliver messages identified as spam to a spam folder, and non-spam, non-work related messages to your regular inbox.
Procmail is similar to simple filtering rules found in most e-mail clients.
Spamassassin can tag messages as spam based on a score based on multiple matches. Each match can add or substract from a message's "spamminess". This score is recorded in an e-mail's headers, and procmail, or a mail client's filtering rules can be used to further sort out incoming e-mail.
Spamassassin can also use rules that contribute a very high value, such as 100, to a message's score. These scores can't realistically be superceded by other spamassasin rules. In this way, Spamassassin can be used to behave as if a particular rule was a regular boolean rule.
It may be prudent to find these rules, and convert them to filtering rules in procmail that can be mathed before spamassassin is run, to help reduce CPU time.
See WritingRules.
(EditHint: I just made up the "all-or-nothing" and "soft" terms. What do you call them ?) (EditHint: "crisp" vs. "fuzzy", but since fuzzy has a particular meaning in fuzzy logic, I prefer to call "crisp" rules boolean.)
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)