Procmail: Difference between revisions
m Rollback edit(s) by 2A01:CB0C:71C:7E00:17A:5E12:67EF:C529 (talk): garbage (RW 16.1) |
DragonHawk (talk | contribs) convert to list defined refs |
||
Line 20: | Line 20: | ||
}} |
}} |
||
In [[email]] systems, '''procmail''', a [[mail delivery agent]] (MDA), can sort incoming mail into various directories and [[mail filter|filter out]] spam messages.<ref |
In [[email]] systems, '''procmail''', a [[mail delivery agent]] (MDA), can sort incoming mail into various directories and [[mail filter|filter out]] spam messages.<ref name="GtLIaA"/><ref name="qmailbook"/> Procmail is stable, but no longer maintained, and a number of security vulnerabilities have been discovered since its last release.<ref name="death"/> Users are advised by procmail's last maintainer, Philip Guenther,<ref name="openbsd-ports-marc"/> to use an alternative tool, because procmail is not suited for [[MIME]] traffic. |
||
{{cite web|last=Willis|first=Nathan|title= Reports of procmail's death are not terribly exaggerated|url= https://lwn.net/Articles/416901/ |publisher=Linux Weekly News |
|||
|date=24 November 2010|access-date= 27 October 2013}}</ref> Users are advised by procmail's last maintainer, Philip Guenther,<ref name=openbsd-ports-marc/> to use an alternative tool, because procmail is not suited for [[MIME]] traffic. |
|||
==Replacements== |
==Replacements== |
||
Procmail was an early example of a mail filtering tool and language. Procmail is no longer maintained,<ref name=openbsd-ports-marc |
Procmail was an early example of a mail filtering tool and language. Procmail is no longer maintained,<ref name="openbsd-ports-marc"/> and is known to have multiple security vulnerabilities.<ref name="cvedetails-procmail"/> Despite this it still remains in wide use as the security issues are not widely known,{{fact|date=February 2019}} migration can be difficult, especially for those who have complex filters developed over years, and some see its capabilities as better than available alternatives. |
||
* [[fdm (software)|fdm (fetch, filter and deliver mail)]] is an [[ISC license]]d replacement for [[fetchmail]] and procmail, written and maintained by an [[OpenBSD]]/[[tmux]] developer, originally written/released in 2006/2007 |
* [[fdm (software)|fdm (fetch, filter and deliver mail)]] is an [[ISC license]]d replacement for [[fetchmail]] and procmail, written and maintained by an [[OpenBSD]]/[[tmux]] developer, originally written/released in 2006/2007 |
||
Line 95: | Line 93: | ||
==External links== |
==External links== |
||
*[https://web.archive.org/web/20151013184044/http://www.procmail.org/ Official website] |
* [https://web.archive.org/web/20151013184044/http://www.procmail.org/ Official website] |
||
*[http://procmail.markmail.org/ Searchable procmail mailing list archives] |
* [http://procmail.markmail.org/ Searchable procmail mailing list archives] |
||
==References== |
==References== |
||
<references> |
|||
{{Reflist}} |
|||
<ref name="GtLIaA">{{cite book |
|||
|url = https://books.google.com/books?id=jQE-iUCjUKAC&q=procmail&pg=PA145 |
|||
|title = Guide to Linux Installation and Administration |
|||
|first1 = Nicholas |
|||
|last1 = Wells |
|||
|first2 = Michael |
|||
|last2 = Jang |
|||
|date = 3 October 2018 |
|||
|publisher = Cengage Learning EMEA |
|||
|isbn = 9780619000974 |
|||
|via = Google Books |
|||
}}</ref> |
|||
<ref name="qmailbook">{{cite book |
|||
|url = https://books.google.com/books?id=AYAjb7Y9HfMC&q=procmail&pg=PT52 |
|||
|title = qmail: Managing Unix-Based Mail Systems |
|||
|first = John |
|||
|last = Levine |
|||
|date = 24 March 2004 |
|||
|publisher = O'Reilly Media, Inc. |
|||
|isbn = 9780596552121 |
|||
|via = Google Books |
|||
}}</ref> |
|||
<ref name="death">{{cite web |
|||
|last = Willis |
|||
|first = Nathan |
|||
|title = Reports of procmail's death are not terribly exaggerated |
|||
|url = https://lwn.net/Articles/416901/ |
|||
|publisher = Linux Weekly News |
|||
|date = 24 November 2010 |
|||
|access-date = 27 October 2013 |
|||
}}</ref> |
|||
<ref name="openbsd-ports-marc">{{cite mailing list |
|||
|last1 = Gunther |
|||
|first1 = Philip |
|||
|title = please remove the procmail port |
|||
|url = http://marc.info/?l=openbsd-ports&m=141634350915839&w=2 |
|||
|publisher = [[OpenBSD]] |
|||
|mailing-list = ports@ |
|||
|date = 2014-11-18 |
|||
|access-date = 2019-02-25 |
|||
}}</ref> |
|||
<ref name=cvedetails-procmail>{{cite web |
|||
|title = CVEdetails: Procmail Vulnerabilities |
|||
|url = https://www.cvedetails.com/vulnerability-list/vendor_id-225/product_id-392/Procmail-Procmail.html |
|||
|publisher = CVEdetails.com |
|||
|date = 2018-02-03 |
|||
|access-date = 2020-05-02 |
|||
}}</ref> |
|||
</references> |
|||
[[Category:Mail delivery agents]] |
[[Category:Mail delivery agents]] |
Revision as of 21:31, 26 April 2022
Original author(s) | Stephen R. van den Berg |
---|---|
Developer(s) | Philip A. Guenther |
Initial release | December 7, 1990 |
Final release | 3.22
/ September 10, 2001 |
Repository | |
Operating system | Any Unix-like |
Platform | Cross-platform |
Type | Mail filter |
License | GPL or Artistic License |
Website | www |
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 are advised by procmail's last maintainer, Philip Guenther,[4] to use an alternative tool, because procmail is not suited for MIME traffic.
Replacements
Procmail was an early example of a mail filtering tool and language. Procmail is no longer maintained,[4] and is known to have multiple security vulnerabilities.[5] Despite this it still remains in wide use as the security issues are not widely known,[citation needed] migration can be difficult, especially for those who have complex filters developed over years, and some see its capabilities as better than available alternatives.
- fdm (fetch, filter and deliver mail) is an ISC licensed replacement for fetchmail and procmail, written and maintained by an OpenBSD/tmux developer, originally written/released in 2006/2007
- dovecot-pigeonhole from Dovecot, an implementation of the Sieve language
- maildrop, included as part of Courier Mail Server, but available for use with other servers, too
- Sieve mail filtering language
Invocation
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
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
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:
- mode
- conditions
- action
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
Conditions are usually extended regular expressions, although there are other forms of condition also.
Basic operation
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.
Pitfalls
By default, procmail will "bounce" undeliverable mail back to the sender. New users should be warned not to test new delivery recipes by running procmail on their existing mailboxes, since this could result in error messages being sent to all one's email contacts.
Other operations
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
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
The procmail developers have built a mailing list manager called SmartList on top of procmail.
Further reading
- McCarthy, Martin (November 2001). The Procmail Companion. Addison-Wesley. ISBN 978-0201737905.
See also
- fdm (fetch, filter and deliver mail) — an ISC licensed replacement from an OpenBSD/tmux developer
- maildrop — included as part of Courier Mail Server, but available for use with other servers, too
- Sieve mail filtering language
External links
References
- ^ Wells, Nicholas; Jang, Michael (3 October 2018). Guide to Linux Installation and Administration. Cengage Learning EMEA. ISBN 9780619000974 – via Google Books.
- ^ Levine, John (24 March 2004). qmail: Managing Unix-Based Mail Systems. O'Reilly Media, Inc. ISBN 9780596552121 – via Google Books.
- ^ Willis, Nathan (24 November 2010). "Reports of procmail's death are not terribly exaggerated". Linux Weekly News. Retrieved 27 October 2013.
- ^ a b Gunther, Philip (2014-11-18). "please remove the procmail port". ports@ (Mailing list). OpenBSD. Retrieved 2019-02-25.
- ^ "CVEdetails: Procmail Vulnerabilities". CVEdetails.com. 2018-02-03. Retrieved 2020-05-02.