procmail

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

procmail
Original author(s)Stephen R. van den Berg
Developer(s)Philip A. Guenther
Initial releaseDecember 7, 1990
Stable release
3.22 / September 10, 2001
Repository Edit this at Wikidata
Operating systemAny Unix-like
PlatformCross-platform
TypeMail filter
LicenseGPL or Artistic License
Websitewww.procmail.org

In email systems, procmail, a mail delivery agent (MDA), can sort incoming mail into various directories and filter out spam messages.[1][2] Procmail is stable, but no longer maintained, and a number of security vulnerabilities have been discovered since its last release.[3] Users who wish to use a maintained program are advised by procmail's author, Philip Guenther,[4] to use an alternative tool, because it has not been updated since 2001.

Replacements[edit]

Procmail was an early example of a mail filtering tool and language. Procmail is no longer maintained, yet it had just a single publicized security vulnerability since its maintainer Philip Gunther stopped maintaining it.[5] Despite this it still remains in wide use as the security issues are not widely known, migration can be difficult, especially for those who have complex filters developed over years, and some see its capabilities as better than available alternatives.

Invocation[edit]

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.

Paradigm[edit]

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.

Recipes[edit]

The procmail agent uses recipes, to determine where to deliver the various mail messages.

Elements of a recipe[edit]

Each recipe that procmail uses consists of:

  • mode
  • conditions
  • action

Recipes can be conditional or unconditional[edit]

Recipes used by procmail can be conditional or unconditional. If the conditions are left out, the recipe is unconditional.

Types of recipes[edit]

Procmail has two kinds of recipes:

  • Delivering recipes
  • Non-delivering recipes

Processing of recipes[edit]

Recipes are read from top to bottom. The first delivering recipe terminates the delivery process (unless the mode flag specifies otherwise).

Conditions[edit]

Conditions are usually extended regular expressions, although there are other forms of condition also.

Basic operation[edit]

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 operations[edit]

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.

Spam filtering[edit]

A common practice is to let procmail call an external spam filter program, such as SpamAssassin. This method can allow for spam to be filtered or even deleted.

Managing mailing lists[edit]

The procmail developers have built a mailing list manager called SmartList on top of procmail.

Further reading[edit]

  • McCarthy, Martin (November 2001). The Procmail Companion. Addison-Wesley. ISBN 978-0201737905.

See also[edit]

External links[edit]

*Official website "Site hosting in transit, information will be back up shortly." (July 17th, 2017) Website status unchanged as of (May 9th, 2018)

References[edit]

  1. ^ Wells, Nicholas; Jang, Michael (3 October 2018). "Guide to Linux Installation and Administration". Cengage Learning EMEA – via Google Books.
  2. ^ Levine, John (24 March 2004). "qmail: Managing Unix-Based Mail Systems". "O'Reilly Media, Inc." – via Google Books.
  3. ^ Willis, Nathan. "Reports of procmail's death are not terribly exaggerated". Linux Weekly News. Retrieved 27 October 2013.
  4. ^ "'please remove the procmail port' - MARC". marc.info.
  5. ^ Gunther, Philip. "Post "Please remove the procmail port"". OpenBSD ports email list archive.