Generated by GPT-5-mini| procmail | |
|---|---|
| Name | procmail |
| Author | Paul Vixie |
| Released | 1990s |
| Operating system | Unix-like |
| Genre | Mail delivery agent, mail filtering |
| License | ISC-style / permissive |
procmail procmail is a mail delivery agent and mail filtering utility for Unix-like systems originally authored by Paul Vixie. It functions as a local delivery agent integrated with sendmail, Postfix, Exim, and other qmail-compatible mail transfer agents, allowing per-user mail processing through configurable rule sets. Widely used in the 1990s and 2000s, it influenced later message processing tools and remains referenced alongside utilities like Sieve (mail filtering language) and maildrop.
procmail was developed in the context of early Unix mail infrastructures influenced by projects and institutions such as IETF, UC Berkeley, and the growth of Internet mail standards like SMTP. Its author, Paul Vixie, was active in development communities including ISC and contributed to mail and DNS software contemporaneously with systems such as BIND and Sendmail. Adoption grew as site administrators using SunOS, FreeBSD, NetBSD, and Linux systems needed flexible delivery and filtering; deployments often integrated with sendmail, Postfix, qmail, and Exim. Over time, debates about safety, portability, and maintainability prompted comparison with emerging alternatives developed by projects such as Dovecot and standards bodies including IETF working groups that produced Sieve (mail filtering language) specifications.
procmail operates as a Mail Delivery Agent (MDA) invoked by an MTA like sendmail or Postfix and runs with the privileges of the target user, interacting with /etc/aliases-style systems and per-user configuration files. Its architecture centers on a core engine implemented in C that parses a sequence of conditional recipe rules and executes actions such as delivery to mailboxes, piping to external programs, or invoking delivery agents like procmail-compatible wrappers and user-level scripts. The program interacts with system-level facilities present in operating systems such as Linux, FreeBSD, Solaris, and OpenBSD and relies on POSIX semantics standardized by IEEE and The Open Group for process control and I/O. Integration points include delivery via the mbox and Maildir formats popularized by projects like qmail and Courier and interaction patterns similar to those in fetchmail and procmail-adjacent tools.
Configuration is file-based, typically using a per-user file in the user's home directory that contains a sequence of recipes composed of conditions and actions. Recipes match message headers and bodies using regular expressions aligned with libraries influenced by Perl-style syntax and interact with environment variables defined by MTAs like sendmail and Postfix. Administrators and users write rules to test headers such as From (email), Subject (movie), or other fields produced by MTAs and to take actions like forwarding to Maildir or mbox, invoking programs such as procmail pipes, or delivering to quarantine managed by SpamAssassin or Amavis. Popular constructs and idioms spread through site HOWTOs, administrator guides at institutions like MIT, Stanford University, and University of Cambridge, and through mailing lists maintained historically by developers in communities associated with USENIX and LDP.
Common use cases include automated filing into folders, vacation autoresponders, spam and virus handling in coordination with SpamAssassin, ClamAV, or Amavis, and integration with user agents such as Mutt, Pine, Alpine, and Thunderbird. Administrators used recipes to implement mailing list delivery hooks for systems like Mailman and Majordomo and to route messages for virtual hosting managed by Postfix or Exim. Example scenarios included sorting messages from contacts maintained in enterprise directories like OpenLDAP, routing alerts from monitoring systems such as Nagios or Munin, and implementing per-user quotas enforced by storage backends like Dovecot.
Security concerns historically associated with local delivery agents include privilege escalation, race conditions, and header injection; these concerns were discussed in security advisories relevant to platforms such as Debian, Red Hat Enterprise Linux, and OpenBSD. Because the MDA runs as the target user, safe integration with privilege separation models championed by projects like OpenSSH and Postfix is important. Reliability issues centered on atomic delivery to mailbox formats, concurrency with maildirs introduced by qmail and Courier, and robust handling of malformed messages, leading administrators to combine procmail usage with filtering proxies and scanners like SpamAssassin, Amavis, and ClamAV. Audits and operational guidance from organizations including SANS Institute influenced best practices for secure configuration and logging.
procmail interacts with a variety of MTAs and mailbox formats, working on platforms such as Linux, FreeBSD, NetBSD, OpenBSD, and proprietary Unixes like Solaris. Its role has been supplanted in some deployments by language-standardized alternatives like Sieve (mail filtering language) implemented in servers such as Dovecot and client-side or delivery-side filters including maildrop, Procmail-if-style scripts replaced by Sieve filters in Cyrus IMAP and modern MDA frameworks. Other alternatives and complementary tools include SpamAssassin, Amavis, Dovecot LDA, Milter-based filters for Sendmail and Postfix, and user-agent filtering in Mozilla Thunderbird.
Category:Mail software