Every type of software, whether it’s client software, server software, or software for personal productivity, has implementations that are available free or nearly so. Interestingly, the free implementation is sometimes the best and most popular implementation. Take sendmail, for example—it’s the most well known MTA out there. Another good example is Procmail. For nearly a decade, Procmail has been used by email wizards and by the users who depend on their skills. A straightforward but powerful mechanism for flexible mail handling, Procmail does more than just filter incoming email. Depending on a variety of attributes, it can file, forward, respond to, delete, or perform any action that can be described in software, such as shell or Perl scripts.

If sendmail is the universal tool for getting mail from MTA to MTA, Procmail is the universal tool of MDAs. For the most part, anyone who’s been exposed to Procmail fits into one of two classes: those who are wildly enthusiastic about Procmail and those who will be once they find the time to learn it.

Procmail was developed by Stephen R. van den Berg in 1990. In recent years, a complement of volunteers have joined forces to help Procmail evolve from a set of useful utilities written by one person to an ongoing effort that could very well outlast any given person working on it.

To use Procmail, you define, refine, and enshrine a series of Procmail filtering rules, which typically use regular expressions to describe common factors ...

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.