The configuration of procmail is independent of the MTA used, so everything in the rest of this chapter applies to Sendmail, Postfix, and qmail (if using .qmail files for each user). By default, Procmail can use a common configuration file, /etc/procmailrc, as well as a user-supplied one, ~/.procmailrc. The file is made up of variable assignments and recipes. Recipes consist of patterns or conditions that are matched against mail header items and actions to take in the event of a match.

There are two kinds of recipes: delivering and nondelivering. Delivering recipes write the mail message to a file, pipe it to a program, or forward it in the event of a match, and further processing stops. Nondelivering recipes continue processing ...

Get Slamming Spam: A Guide for System Administrators now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.