|Original author(s)||Stephen R. van den Berg|
|Developer(s)||Philip A. Guenther|
|Initial release||December 7, 1990|
|Stable release||3.22 / September 10, 2001|
|Operating system||Any Unix-like|
|License||GPL or Artistic License|
In email systems, procmail, a mail delivery agent (MDA), can sort incoming mail into various directories and filter out spam messages. Procmail is stable, but no longer maintained. Users who wish to use a maintained program are advised[by whom?] to use an alternative MDA, such as maildrop.
- 1 Invocation
- 2 Paradigm
- 3 Recipes
- 4 Conditions
- 5 Basic operation
- 6 Other operations
- 7 Further reading
- 8 See also
- 9 External links
- 10 References
The procmail mail delivery agent is generally not started from the command line, but is usually invoked by mail delivery subsystems, such as a mail transport agent (like Sendmail or Postfix), or from a mail retrieval agent (such as fetchmail). This makes the mail processing event-driven. The companion tool formail allows procmail to be used in batch-processing on mail that already is in a user's mailbox.
Procmail is a data-driven programming language, similar to earlier line-oriented languages such as sed and AWK: it specifies conditions to match and actions to take on matching, in the form of "recipes". This approach has been followed by later languages such as maildrop and sieve.
The procmail agent uses recipes, to determine where to deliver the various mail messages.
Elements of a recipe
Each recipe that procmail uses consists of:
Recipes can be conditional or unconditional
Recipes used by procmail can be conditional or unconditional. If the conditions are left out, the recipe is unconditional.
Types of recipes
Procmail has two kinds of recipes:
- Delivering recipes
- Non-delivering recipes
Processing of recipes
Recipes are read from top to bottom. The first delivering recipe terminates the delivery process (unless the mode flag specifies otherwise).
Conditions are usually extended regular expressions, although there are other forms of condition also.
The procmail tool reads mail messages given to it from standard input. The procmail tool will process the recipes before distributing the mail messages into the appropriate mailboxes.
Other common operations carried out with procmail include filtering and sorting of emails into different folders according to keywords in from, to, subject, text of the mail, or sending autoreplies, but more sophisticated operations are also possible.
Managing mailing lists
- Martin McCarthy, The Procmail Companion, Addison-Wesley, S. 256, November 2001, ISBN 0-201-73790-6
- Willis, Nathan. "Reports of procmail's death are not terribly exaggerated". Linux Weekly News. Retrieved 27 October 2013.
|This Unix-related article is a stub. You can help Wikipedia by expanding it.|
|This network-related software article is a stub. You can help Wikipedia by expanding it.|