Procmail is a mail delivery agent (MDA) or mail filter, a program to process incoming emails on a computer. It is typically invoked from a mail transfer agent (MTA) like Sendmail; 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 your mailbox.
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.
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.
It can be used to create mail-servers, mailing lists, sort your incoming mail into separate folders/files (real convenient when subscribing to one or more mailing lists or for prioritising your mail), preprocess your mail, start any programs upon mail arrival (e.g. to generate different chimes on your workstation for different types of mail) or selectively forward certain incoming mail automatically to someone.
Features include:
- Small.
- Very easy to install.
- Simple to maintain and configure.
- Event driven (i.e. gets invoked automagically when mail arrives).
- Does not use any temporary files.
- Uses standard egrep regular expressions.
- Poses a very low impact on your system’s resources.
- Allows for very-easy-to-use yes-no decisions on where the mail should go (can take the size of the mail into consideration).
- Also allows for neural-net-type weighted scoring of mails.
- Filters, delivers and forwards mail reliably.
- Provides a reliable hook for any programs or shell scripts you may wish to start upon mail arrival.
- Absolutely undeliverable mail.
- One of the few mailers to perform reliable mailbox locking across NFS as well.
- Supports five mailfolder standards: single file folders (standard and nonstandard VNIX format), directory folders that contain one file per message, the similar MH directory folders (numbered files), and Maildir directory folders (a multi-directory format that requires no locking).
- Native support for /var/spool/mail/b/a/bar type mailspools.
- Provides a mail log file, which logs all mail arrival, shows in summary where it came, what it was about, where it went (what folder) and how long (in bytes) it was.
- Uses this log file to display a wide range of diagnostic and error messages (if something went wrong).
- Does not impose any limits on line lengths, mail length (as long as memory permits), or the use of any character (any 8-bit character, including ‘\0’ is allowed) in the mail.
- Can be used as a local delivery agent with comsat/biff support.
- Secure system mailbox handling.
- Provides for a controlled execution of programs and scripts from the aliases file (i.e. under defined user ids).
- Allows you to painlessly shift the system mailboxes into the users’ home directories.
- Can be used as a general mailfilter for whole groups of messages (e.g. when called from within sendmail.cf rules).
- Can act as an LMTP server for reliable multiple recipient delivery.
- Works with (among others?) sendmail, ZMailer, smail, MMDF, mailsurr, qmail, and Postfix.
Website: www.procmail.org
Support: Documentation
Developer: Philip A. Guenther and others
License: GNU General Public License or Artistic License
| Explore Linux | |
|---|---|
| Best Free and Open Source Software - A huge collection of recommended free and open source software covering every major category. | |
| In-depth Linux Software Reviews - Detailed assessments of Linux software covering features, usability and overall quality. | |
| The Big List of Active Linux Distros - An extensive collection of actively developed Linux distributions. | |
| Open Source Alternatives - Alternatives to software and services from Google, Microsoft, Apple, Adobe, IBM, Autodesk, Oracle and others. | |
| Essential Linux System Tools - Indispensable utilities for monitoring, maintaining and managing Linux systems. | |
| Linux Productivity Tools - Useful utilities for improving productivity and streamlining everyday tasks. | |
| Alternatives to Popular CLI Tools - Modern alternatives to familiar command-line utilities supplied with Linux systems. | |
| Awesome Free Linux Game Tools - Tools, utilities and companion software that improve gaming on Linux. | |
| Machine Learning on Linux - Machine learning and deep learning software, self-hosted applications and practical tools. | |
| Saving Money with Linux - Practical ways to reduce electricity consumption and lower computing costs with Linux. | |
| Linux Candy - Fun, entertaining and sometimes delightfully quirky software from the lighter side of Linux. | |

Please read our Comment Policy before commenting.