Fact-checked by Grok 2 weeks ago

procmail

Procmail is an autonomous mail delivery agent () for operating systems, designed to filter, sort, and deliver incoming messages based on user-defined recipes specified in configuration files such as .procmailrc. It processes mail received via standard input, separating headers from the body, and can forward, store, or execute actions on messages matching specified conditions, making it a versatile tool for management. Originally developed as a lightweight and efficient alternative to traditional mail handlers, procmail is invoked through mechanisms like .forward files or integration with mail transfer agents (MTAs) such as , and it supports local mail delivery while minimizing system resource usage. Developed initially by Stephen R. van den Berg in 1990, procmail's first release (v1.00) appeared on December 7, 1990, with significant milestones including v2.00 in 1991 and v3.00 in 1994, which introduced advanced features like nested recipes. Philip Guenther later joined as a key contributor and maintainer, enhancing security and compatibility in subsequent versions. After a period of unmaintenance, the original author resumed development in May 2020, with the tool reaching version 3.24 in March 2022 as the latest release as of 2025, focusing on stability and security fixes through community efforts despite its mature status. Key features of procmail include support for matching, scoring mechanisms for conditional processing, locking to prevent race conditions, and integration with tools like SpamAssassin for spam filtering. It enables users to create mailing lists, autoresponders, and custom mail servers, and is widely used in environments requiring robust, scriptable email handling without heavy dependencies. While alternatives like have gained popularity, procmail's and power continue to make it a staple in legacy and specialized Unix mail systems.

History and Development

Origins

Procmail was developed by Stephen R. van den Berg in 1990 as a personal solution for filtering and processing on systems. Originally created to address the limitations of standard mail transfer agents (MTAs) such as , which offered only basic delivery options, procmail aimed to enable more sophisticated, automated handling of incoming . The initial version, released in December 1990, introduced a that allowed users to sort, forward, and process messages based on headers, , and other criteria without needing advanced programming skills. The tool's design emphasized flexibility and ease of use, permitting non-programmers to define processing rules—known as recipes—through simple conditional statements and actions. This approach made procmail particularly appealing for individual users managing personal accounts on shared Unix systems, where sorting became increasingly burdensome amid rising email volumes in the early . As a local delivery agent (MDA), it integrated seamlessly with existing MTAs to intercept and route locally. Early adoption occurred primarily within and open-source communities, where Unix was prevalent and email usage surged due to expanding connectivity. Distributed via groups like comp.sources.misc starting around 1991, procmail quickly gained traction among system administrators and researchers seeking to automate filtering, management, and message archiving. Its open-source nature under a permissive license facilitated widespread experimentation and integration into custom workflows during the decade.

Evolution and Maintenance

Procmail was initially created in 1990 by Stephen R. van den Berg as a filtering . In the fall of 1998, van den Berg handed over maintainership to Philip Guenther, who led development through version 3.22. Development progressed through multiple versions, culminating in the release of version 3.22 on September 10, 2001, which served as the last official stable release under maintainer Philip Guenther and addressed regression bugs from prior releases, such as compilation issues with K&R compilers and delivery problems. After 2001, procmail entered a period of dormancy lasting until around 2010, characterized by sporadic bug reports submitted to maintainers but no further upstream development or new official releases. Community involvement has since sustained the project through forks and patches. A notable example is the BuGlessRB fork, which produced version 3.24 in March 2022 to resolve minor compatibility issues, including fixes for modern compilers and environment variables. As of 2025, procmail remains included in modern distributions, such as Debian's version 3.24+really3.22-5 (a patched variant of 3.22) and via the AUR, though packaging notes and documentation warn of its unmaintained upstream status and recommend alternatives for new deployments. Historical records, including the procmail.HISTORY snapshot file, provide detailed logs of bug fixes and changes through version 3.22.

Features

Core Functionality

Procmail operates as a local mail delivery agent (MDA) that processes incoming email messages, typically invoked by mail transfer agents (MTAs) such as Sendmail or Postfix when mail arrives in the spool. It receives the message via standard input and examines user-defined rules in a configuration file, usually ~/.procmailrc, to determine the appropriate action. The primary functions of procmail include filtering incoming mail based on header content, subject lines, or body keywords; sorting messages into specific folders; forwarding them to other addresses; or discarding unwanted mail. These operations enable automated organization of email without manual intervention, enhancing efficiency for users handling high volumes of correspondence. For instance, rules can direct newsletters to a dedicated folder or route spam to a null device. To ensure reliable delivery, procmail employs lockfiles that prevent race conditions when multiple processes attempt to write to the same shared simultaneously. These locks, such as /var/spool/mail/$LOGNAME.lock for the system mailbox, are created atomically and held until the delivery completes, avoiding in multi-user environments. If no matching rules are found in the configuration file or if processing reaches the end without an action, procmail defaults to delivering the message to the user's standard , typically $HOME/[Mail](/page/Mail) or /var/spool/[mail](/page/Mail)/$LOGNAME. For troubleshooting, procmail supports verbose logging through the VERBOSE variable, which outputs detailed diagnostic information to a log file, aiding in the identification of rule mismatches or delivery issues.

Advanced Capabilities

Procmail's scoring system enables nuanced filtering by assigning weights to conditions, allowing messages to accumulate points based on multiple criteria before determining actions. Each in a can include a weight w and exponent x in w^x [condition](/page/Condition), where the score contribution grows or diminishes depending on the number of matches; for instance, a like +1^1 ^From:.*friend adds 1 point per matching line in the header, while -5^0 spam-indicator deducts 5 points for any occurrence of a spam keyword without further scaling. The total score for a is the sum of all contributions, and the only matches if the final score exceeds zero, as stored in the $= ; this approach supports complex prioritization, such as boosting scores for trusted senders (+2000 for specific "From:" headers) while penalizing large attachments or suspicious subjects. Piping actions extend procmail's capabilities by routing messages to external programs or scripts for advanced processing, initiated by an line starting with |. For example, mail matching certain patterns can be piped to a scanner like | /usr/local/bin/clamav-scan, where the f treats the pipe as a to modify the message before further delivery, and the w waits for the program's exit code to influence subsequent . This mechanism also facilitates auto-replies by piping to scripts that generate responses, such as forwarding modified to a reply generator, enabling integrations like transformation or external analysis without altering procmail's core delivery role. Procmail supports mailing list management through conditional forwarding recipes that distribute messages based on header patterns, effectively creating simple servers. Recipes can use conditions like * ^TO_listname to match "To:" or "Cc:" headers, followed by a forwarding action ! list@domain, which sends the message to designated recipients while preserving the original ; for digests, piping to formail splits multi-message inputs for redistribution. This conditional logic allows server-like behavior, such as subscribing users by forwarding only to those matching subscriber stored in files, without requiring dedicated list software. For handling MIME attachments and body content, procmail provides flags like B to search or feed only the message to conditions and actions, bypassing headers for targeted analysis. Although procmail does not natively decode structures, it enables comprehensive filtering by the body to external tools, such as | mimencode -u to unquote encoded text or ripmime for attachment , allowing rules to detect and process elements like content or binary parts based on "Content-Type:" headers. This integration supports body-based scoring or actions, such as analyzing text for keywords while ignoring attachments, to refine filtering beyond header-only matches.

Configuration and Operation

Setup and Invocation

Procmail operates on Unix-like operating systems, such as Linux distributions and BSD variants, where it functions as a mail delivery agent (MDA). As of 2025, it remains available through standard package managers, including apt for Debian and Ubuntu-based systems and dnf for Fedora and related distributions. Installation is typically performed via the distribution's package manager for simplicity and integration. On Debian-based systems, the command sudo apt install procmail retrieves and installs the binary along with necessary dependencies. Similarly, on Fedora, sudo dnf install procmail accomplishes this. For environments without pre-built packages, procmail can be compiled from source by downloading the tarball from the official repository, applying any required patches for compatibility, and executing make followed by make install as root; this process requires a C compiler like gcc and optional libraries such as libnsl for network support. After installation, integration with a mail transfer agent (MTA) like Postfix or Sendmail is essential to route incoming mail through procmail. For Postfix, edit /etc/postfix/main.cf to set mailbox_command = /usr/bin/procmail -a "$EXTENSION" and reload the service with postfix reload; this designates procmail as the local MDA for user mailboxes. With Sendmail, configure delivery by adding entries to /etc/aliases (e.g., username: "|/usr/bin/procmail") and running newaliases to update the alias database, or use per-user .forward files in home directories pointing to procmail. These setups ensure mail is processed before final delivery to spool or Maildir formats. Procmail is invoked either automatically by the during mail delivery or manually from the command line for testing. The basic syntax is procmail [options] [rcfile], where options include -d recipient to deliver mail explicitly to a specified (requiring privileges) and -m to run in mail filter mode without delivery, useful for dry runs. Environment variables influence behavior, such as MAILDIR set to an absolute path like $HOME/[Mail](/page/Mail) for delivery or ORGMAIL pointing to the system like /var/spool/mail/$LOGNAME. The configuration file .procmailrc is placed in the 's ($HOME/.procmailrc), must be owned by the or , and secured with permissions 0600 (readable and writable only by the owner) to prevent unauthorized ; a global /etc/procmailrc can be used system-wide but also requires execution. Recipes within .procmailrc define filtering logic, but setup focuses on ensuring proper paths.

Recipe Structure

Procmail recipes define rules for processing incoming mail messages and follow a structured format consisting of a colon-prefixed header line, optional lines, and a single action line. The header line begins with :0 followed by optional flags and an optional local lockfile specification in the form :0 [flags] [ : [locallockfile] ]. lines, if present, start with an (*) and specify matching criteria against the message headers or body, while the action line dictates what to do if conditions are met, such as forwarding, piping to a , or saving to a file. If no conditions are specified, the recipe matches every message unconditionally. Flags modify the behavior of a and are single-letter options placed after the :0. Common flags include c for , which allows the message to continue to subsequent recipes after processing; w to wait for the exit code of an external invoked in the action; and A to make the action dependent on whether a previous recipe matched. The full set of flags encompasses H for header-only matching, B for body matching, A and a for action dependencies, E and e for handling, D for case-sensitive matching, f for treating the action as a , c for , w and W for waiting on programs, i for ignoring write errors, and r for raw mode. These flags control aspects like parsing scope, continuation, and handling without altering the core syntax. Conditions evaluate whether a recipe applies to a message and use extended regular expressions (egrep syntax) for pattern matching on headers or body content, depending on flags like H or B. Multiple conditions within a recipe are logically ANDed, meaning all must match for the recipe to trigger; to achieve OR logic, a single condition can use regex alternation (|) or separate recipes can be employed. Condition types include standard regex patterns for header or body searches, size limits with < (less than) or > (greater than) operators, ? for checking the exit code of an external program (non-zero indicates match), $ for shell command substitution, and ! to invert the result of a condition. By default, conditions apply to headers unless B is specified, and in scoring mode—enabled by appending numerical scores to condition lines (e.g., * condition # 100)—matches adjust a cumulative score stored in the $= variable rather than performing boolean tests. Actions specify the outcome when conditions match and can include forwarding with ! followed by an , piping to a program with |, appending to a file with > or explicit file path, or nesting a block of sub-recipes with { and }. Variables can be expanded in actions using $ notation for dynamic behavior. Recipes are evaluated sequentially from top to bottom in the configuration file, with processing halting after a delivering action (e.g., saving to a file or forwarding) unless the c flag enables fall-through to subsequent recipes. Non-delivering actions, such as for or nesting blocks, allow continuation to the next recipe regardless. This flow ensures deterministic handling, with unmatched messages proceeding to the default if no final recipe applies.

Practical Examples

Simple Filtering Rules

Simple filtering rules in procmail allow users to perform basic sorting and processing using straightforward recipes, which consist of a colon line, optional conditions, and an . These rules are ideal for and focus on single-condition matches to handle common tasks without complex logic. One common task is filing emails from a specific sender into a dedicated folder. For instance, to route all mail from "[email protected]" to a folder named "boss-mail", the following can be used:
:0
* ^From.*boss@company\.com
boss-mail
This condition searches the message header for the pattern and appends matching emails to the specified . Forwarding based on subject lines is another basic application. To forward emails with subjects containing "newsletter" to an alternative address while keeping a copy in the inbox, employ this :
:0 c
* ^Subject:.*newsletter
! [email protected]
The "c" flag ensures the message continues to the next recipe or default delivery after forwarding. Discarding obvious spam by checking for keywords in the body provides a simple way to reduce clutter. For example, to delete emails containing "viagra" in the body, use:
:0 B
* viagra
/dev/null
The "B" flag directs the condition to scan the message body, and directing output to "/dev/null" effectively discards the mail. To test these rules safely in a non-production , invoke procmail with the "-m" , which processes as a without delivering it to the system mailbox. This allows verification using sample emails piped into procmail, such as procmail -m .procmailrc < testmail, helping to avoid unintended actions on live .

Complex Processing Scenarios

Procmail enables sophisticated processing through integrated recipes that combine conditional scoring, external program invocation, and header manipulation to handle multifaceted scenarios such as spam detection and automated responses. These setups often involve multiple interdependent rules, lockfiles for concurrency control, and piping to utilities like formail or sendmail, allowing users to implement production-grade without external dependencies.

Scoring-Based Spam Filter

Procmail's scoring mechanism assigns numerical values to conditions, accumulating a total score that triggers actions when thresholds are met, facilitating nuanced spam detection beyond binary matches. For instance, a recipe might deduct points for trusted indicators like known senders while adding points for suspicious features such as attachments, culminating in forwarding high-scoring messages to a junk folder when score >=0. This approach leverages header and analysis to weigh evidence probabilistically. A representative scoring recipe initializes a base score and adjusts it based on specific patterns:
:0
* -5^0
* -2 ^0 ^From:.*trusted@domain\.com
* 10 ^0 ^Content-Type: (multipart/mixed|application/(octet-stream|pdf))
* 5 ^0 ^Subject:.*(viagra|lottery|urgent)
* 0 ^0
{
  LOG = "Spam score: $SCORE - Filing as junk"
  :0:
  junk
}
Here, the initial score of -5 is adjusted, such as -2 for a trusted sender in the From header, +10 for common attachment types indicating potential , and +5 for keywords in the subject. If the total score reaches or surpasses zero, the message is delivered to the "" folder, with for . This method integrates seamlessly with other , allowing low-scoring mail to proceed to delivery.

Auto-Reply Vacation Script

For automated out-of-office responses, procmail recipes can pipe messages to external programs while enforcing conditions to avoid loops and ensure atomicity via lockfiles, mimicking the vacation(1) utility. A typical setup checks for direct addressing, excludes daemons and prior replies, and uses a to limit responses per sender. The following recipe, adapted from standard examples, uses a lockfile to serialize access and pipes to formail for reply generation:
:0 Whc: vacation.lock
* !^FROM_DAEMON
* !^X-Loop: $LOGNAME@domain\.com
* $^To:.*\<$LOGNAME\>
| (formail -rD 8192 [vacation](/page/Vacation).cache \
  -A"X-Loop: $LOGNAME@domain\.com" ; \
  cat [vacation](/page/Vacation).msg ) | $SENDMAIL -oi -t
Conditions exclude daemon-generated mail (e.g., bounces) and self-replies via the X-Loop header, while verifying the To targets the user. The lockfile ".lock" prevents concurrent executions from duplicating replies. Formail checks a 8192-byte of recent senders; if new, it generates a reply header from the original and pipes it along with the body from .msg to for delivery, appending the X-Loop header to halt propagation. This ensures responses are sent only for non-list mail, maintaining in threaded discussions.

Mailing List Handling

Procmail supports lightweight processing by extracting recipient lists from files and forwarding messages with modified headers to prevent loops or add , often piping through formail for header insertion. This is useful for ad-hoc distribution without full list software, where incoming mail to a list address is redistributed to subscribers. An example for a list named "team" reads subscribers from a file and forwards with a custom Precedence header:
:0
* ^To: team@domain\.com
{
  :0c
  | formail -A "Precedence: bulk" \
           -A "X-Mailing-List: team@domain\.com" \
    | $SENDMAIL -oi `cat /path/to/subscribers.txt`
}
The condition matches the list address in the To header. Formail adds bulk-precedence and list-identifying headers to aid downstream filtering. Sendmail then distributes the modified message to addresses in subscribers.txt (one per line, e.g., [email protected]). The 'c' flag copies the original to local delivery if needed, while the external recipient expansion handles dynamic lists without hardcoding. Lockfiles can be added for file access safety in high-volume setups.

Debugging Tips for Complex Setups

Troubleshooting multilayered procmail configurations relies on enhanced and message inspection to trace execution and variable states. Enabling reveals condition evaluations and pipeline flows, while targeted logs pinpoint failures in scoring or forwarding. To activate verbose output, set VERBOSE=yes at the top of .procmailrc, which logs detailed steps like matching conditions and score computations to the specified LOGFILE (e.g., LOGFILE=HOME/procmail.log). For finer control, use LOG= statements within [recipes](/page/Recipe), such as LOG="Score hit: SCORE for MATCH", to capture variables like SCORE or $MATCH without full verbosity. Unset LOGFILE to direct output to stderr for immediate console review during testing. Log analysis involves reviewing entries for patterns, such as unmatched or lockfile deadlocks, often using for keywords like "executing" or "condition". Save suspect messages to temporary files with :0c /tmp/debug.msg for manual dissection with tools like formail -X to extract headers. Pipeline debugging employs , e.g., | formail ... | /tmp/pipe.out | , to capture intermediate content. These techniques, combined with abstract (LOGABSTRACT=all), facilitate iterative refinement of complex rules without disrupting live .

Criticisms and Limitations

Security Concerns

Procmail has faced several vulnerabilities over its lifetime, primarily due to its age and limited . The project has seen minimal since its last stable release (version 3.24) in March 2022, with distributions applying sporadic patches thereafter, increasing the risk of unaddressed flaws in deployed versions. A significant , CVE-2017-16844, involves a heap-based in the loadbuf of the formail utility within procmail version 3.22. This flaw allows remote attackers to cause a denial of service or potentially execute arbitrary by processing a specially crafted message. Similarly, CVE-2014-3618 is another heap-based in the same formisc.c file of formail, enabling remote attackers to crash the application or execute arbitrary via malformed headers. These issues have been addressed in distribution-provided versions through backported patches. Historically, procmail has been susceptible to local exploits related to its handling. CVE-1999-0475 describes a in the processing of .procmailrc files, allowing a local attacker to read arbitrary files accessible to the procmail process by exploiting the timing between permission checks and file access. To mitigate such risks, procmail implements strict permission checks on the user's and .procmailrc file, rejecting execution if the files are group-writable or exhibit other insecure permissions, a measure designed for added paranoia. Another concern arises from procmail's support for piping email content to external programs in recipes, which can introduce shell injection risks if user-controlled inputs from email headers or bodies are not properly sanitized before being passed to shell commands. As of 2025, users are advised to employ only distribution-provided versions of procmail that include backported patches for known vulnerabilities, such as those from or , and to restrict invocation privileges by avoiding configurations where possible to limit potential impact. As of 2025, distributions like continue to provide procmail packages (e.g., version 3.24+really3.22-5 in August 2025) with backported security patches, though upstream development remains dormant.

Usability Issues

Procmail's configuration syntax, rooted in its design from the early , relies heavily on single-letter flags and regular expression-based conditions, which pose significant challenges for users unfamiliar with Unix conventions. Recipes begin with a colon-zero construct followed by optional flags such as c for copying mail, f for forcing file creation, h for operations, H for header and searches, w to wait for program completion, and many others, each modifying behavior in subtle ways that require consulting for recall and application. Conditions prefixed with an employ egrep-compatible regular expressions to match headers or body content, often demanding precise pattern crafting that can be error-prone and difficult to debug without expertise in regex syntax. This terse, flag-driven approach, while powerful for advanced scripting, overwhelms non-experts, as composing even basic recipes from scratch demands deep familiarity with shell-like substitutions and scoring mechanisms to avoid unintended mail loss or loops. The absence of native support for modern email protocols exacerbates procmail's usability limitations, particularly in environments relying on IMAP or interfaces. Procmail functions primarily as a local mail delivery agent, writing to files in or formats that an IMAP server must subsequently index, rather than interacting directly with IMAP servers for delivery or folder management. This indirect requires additional configuration layers, such as coordinating with tools like Dovecot or IMAP, leading to maintenance burdens like ensuring lockfile compatibility and handling concurrent access issues. Similarly, procmail lacks built-in mechanisms for seamless , forcing users to rely on external scripts or MTAs for bridging to services like or Web Access, which often results in fragmented workflows and increased setup complexity. Debugging procmail configurations presents further hurdles due to its reliance on cryptic, verbose without user-friendly tools. While the VERBOSE variable enables extended diagnostics in the LOGFILE, outputs consist of timestamped entries detailing matches, spawns, and errors in a raw, unformatted style that mixes execution traces with regex evaluations, making it arduous to isolate issues like failed conditions or lock contention. For instance, log entries distinguish direct command execution from -invoked ones via subtle formatting differences, but interpreting these requires manual cross-referencing with lines, often leading to prolonged trial-and-error cycles. Procmail provides no built-in simulator or dry-run mode to test against sample messages without risking actual delivery, compelling users to deploy temporary setups or external tools like formail for message reconstruction, which adds overhead and potential for oversight. Procmail's limited development since its 2022 release (version 3.24) has left it incompatible with contemporary email standards, notably complicating spam handling through the lack of native DKIM support. Procmail predates DomainKeys Identified Mail (DKIM), introduced in 2007, and cannot natively verify or generate signatures, requiring users to pipe messages through external utilities like OpenDKIM for validation, which disrupts recipe flow and increases vulnerability to forged headers. This stasis extends to other post-2007 protocols, forcing workarounds that burden administrators with custom integrations and heighten the risk of misconfigured spam filters in modern ecosystems dominated by authenticated email.

Alternatives

Modern Mail Filters

Sieve is a standardized language for server-side , defined by the (IETF) in 5228, designed to process messages at the time of final delivery on either clients or servers. This enables actions such as forwarding, filing into folders, discarding, or rejecting emails based on conditions like headers, size, or content, promoting interoperability across different mail systems. It is implemented in popular servers including Dovecot, where the Pigeonhole plugin provides comprehensive support for inbound message filtering during (LMTP) delivery. IMAP also integrates natively, allowing administrators to manage filters efficiently in shared or virtual environments. Maildrop serves as a for traditional local agents, featuring a structured that processes instructions from user-specific files to route or forward messages to or formats. Integrated within , it emphasizes reliability by validating syntax prior to processing and handling large messages through temporary files to avoid memory issues. Its syntax is notably simpler than legacy tools, focusing on essential logic without complex regular expressions unless explicitly needed. Other contemporary options include fdm, a lightweight program that fetches mail from POP3 or IMAP servers and applies filters before delivery to local or remote destinations, offering flexibility in environments. For basic requirements, modern mail transfer agents like Postfix provide built-in content inspection via its local delivery agent, enabling header and body checks before queuing without external dependencies. Similarly, incorporates native filtering interfaces directly into its delivery process, supporting conditional actions and integration with external scanners during local delivery. As of 2025, 's has driven its preference in enterprise settings, where portability across systems like Dovecot and facilitates consistent filtering policies amid diverse infrastructures. This shift underscores a broader emphasis on , maintainable solutions over proprietary or aging scripts.

with Procmail

offers a more readable, script-like syntax compared to procmail's regex-heavy files, making it easier for users to write and maintain filtering rules without deep knowledge. However, Sieve requires server-side support through implementations like Pigeonhole in Dovecot or similar plugins in other mail servers, limiting its use to environments where such integration is available. Unlike procmail, which includes advanced features like scoring for probabilistic matching, Sieve lacks native scoring mechanisms but benefits from IETF , ensuring broader interoperability and future-proofing across mail systems. Maildrop provides advantages over procmail through a similar recipe-style that supports most of procmail's core functionality while avoiding some of its syntactic limitations, resulting in cleaner and more straightforward scripts. It features safer defaults, such as non-setuid execution to mitigate risks inherent in procmail's design, and remains actively maintained as part of server suite, with updates addressing modern security standards. Migration to maildrop is facilitated by examples that map procmail recipes directly, often reducing size and complexity without losing essential filtering capabilities. Alternatives like the Dovecot Local Delivery Agent (LDA) offer superior through active development and integration with modern mechanisms, avoiding historical vulnerabilities in procmail such as overflows that have been patched in recent releases. In trade-offs, these tools provide less flexibility for custom to external programs compared to procmail, as Sieve-based implementations prioritize sandboxed execution to prevent abuse, requiring workarounds like dedicated extensions for advanced processing. For migration, tools like the procmail2sieve script automate the conversion of .procmailrc files to equivalents, handling basic conditions and actions such as header matching and forwarding. In 2025 contexts, common pitfalls include incomplete handling of procmail's forwarding loops or manipulations, which may require manual rewrites, and ensuring compatibility with updated MTAs like Postfix 3.8+ that enforce stricter LMTP protocols for delivery. Additionally, testing converted scripts in environments is essential to catch discrepancies in multipart message handling, as 's standardized parsing can alter outcomes from procmail's raw line-based approach.

References

  1. [1]
    procmail(1): autonomous mail processor - Linux man page - Die.net
    procmail will be able to perform as a functionally enhanced, backwards compatible mail delivery agent. Procmail can also be used as a general purpose mail ...
  2. [2]
    19.4. Mail Delivery Agents | Red Hat Enterprise Linux | 6
    Procmail delivers and filters email as it is placed in the mail spool file of the localhost. It is powerful, gentle on system resources, and widely used.
  3. [3]
    procmail history file (snapshot)
    This file contains a summary of changes made in various versions of procmail up to and including the latest snapshot. It is derived from the HISTORY file ...
  4. [4]
    BuGlessRB/procmail: The mail sorting program - GitHub
    The procmail mail processing program. (v3.24 2022/03/02) Can be used to create mail-servers, mailing lists, sort your incoming mail into separate folders/files.
  5. [5]
    Procmail - Managing IMAP [Book] - O'Reilly Media
    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 ...
  6. [6]
    Procmail Homepage
    Procmail was originally designed and developed by Stephen R. van den Berg <srb at cuci.nl>. In the fall of 1998, recognizing that he didn't have the time to ...News Flash: Procmail Version... · Source Code · Mirrors
  7. [7]
    Procmail FAQ
    The HISTORY file in the distribution package contains a list of fixed bugs in earlier versions (although it's not very detailed). Not all delivering recipes are ...
  8. [8]
    Procmail Mini-Tutorial: Automated Mail Handling - Linux Gazette
    procmail is the mail processing utility language written by Stephen van den Berg of Germany. This article provides a bit of background for the intermediate ...Missing: initial | Show results with:initial
  9. [9]
    v20i050: procmail - mail processing program v2.02, Part02/03
    v20i050: procmail - mail processing program v2.02, Part02/03. Stephen R. van den Berg berg at messua.informatik.rwth-aachen.de
  10. [10]
    Reports of procmail's death are not terribly exaggerated - LWN.net
    Nov 24, 2010 · The original author actually popped in the bug report and said procmail development was active again, and since May 2020 too. Changes made ...Missing: history | Show results with:history
  11. [11]
    procmail considered harmful - anarcat
    Mar 2, 2022 · Procmail is unmaintained​​ The "Final release", according to Wikipedia, dates back to September 10, 2001 (3.22). That release was shipped in ...
  12. [12]
    procmail - Debian Package Tracker
    [2025-08-21] procmail 3.24+really3. · [2025-08-14] Accepted procmail 3.24+really3. · [2024-08-01] procmail 3.24+really3. · [2024-07-27] Accepted procmail 3.24+ ...Missing: releases | Show results with:releases
  13. [13]
    Mail server - ArchWiki
    Oct 21, 2025 · Procmail, –, –, Partially, see module [1], No, –, –, –, Only reads mail through standard input (stdin), upstream is unmaintained. Maildrop, –, – ...
  14. [14]
    Processing Email With Procmail - Interserver Tips
    Apr 26, 2019 · Procmail is a Mail Delivery Agent (MDA), it can be used along with a Mail Transfer Agent (MTA) such as mutt or sendmail to filter messages.
  15. [15]
    Introduction to Procmail - porkmail.org
    Mail Delivery Agent (MDA) (Sendmail), Filter, Procmail; deliver(8): This program receives mail from the MTA and from local users and takes care of storing it ...
  16. [16]
    procmailsc(5) - Linux man page - Die.net
    When weighted scoring is used in a recipe, then the final score for that recipe must be positive for it to match. A certain condition can contribute to the ...Missing: system | Show results with:system
  17. [17]
    procmailrc(5): procmail rcfile - Linux man page - Die.net
    The procmailrc file contains environment variable assignments and recipes, which are regular expressions to determine where mail goes. Recipes can be ...Missing: MIME | Show results with:MIME
  18. [18]
    procmailex(5): procmail rcfile examples - Linux man page
    ### Summary of Advanced Capabilities from procmailex(5)
  19. [19]
    Procmail Download for Linux (deb pkg rpm tgz txz xbps)
    Download procmail linux packages for ALT Linux, AlmaLinux, Amazon Linux, CentOS, Debian, Fedora, FreeBSD, Mageia, NetBSD, OpenMandriva, Oracle Linux, ...
  20. [20]
    Downloading and installing Procmail - Linux Email [Book] - O'Reilly
    Downloading and installing Procmail. As the software is now reasonably mature, Procmail is usually available for installation on most Linux distributions and ...<|control11|><|separator|>
  21. [21]
    Procmail-3.24 - Linux From Scratch!
    Procmail-3.24. Introduction to Procmail. The Procmail package contains an autonomous mail processor. This is useful for filtering and sorting incoming mail.Missing: community forks
  22. [22]
    how to use procmail as a MDA for postfix? (mailbox_command)
    Aug 20, 2015 · I am trying to setup procmail as a mail delivery agent (MDA) for postfix. I understand that I should use the mailbox_command option in postfix for this.Mail filtering with procmail in a postfix/dovecot system with virtual usersUnderstanding /etc/aliases and what it doesMore results from unix.stackexchange.com
  23. [23]
    procmailrc(5) — procmail — Debian testing
    Aug 14, 2025 · The rcfile can contain a mixture of environment variable assignments (some of which have special meanings to procmail), and recipes.Missing: maintenance | Show results with:maintenance
  24. [24]
    19.4.2. Procmail Recipes | Red Hat Enterprise Linux | 6
    Procmail recipes use flags, conditions (often with regular expressions), and an action to match messages. The first two characters are a colon and zero.Missing: scoring MIME
  25. [25]
  26. [26]
    Debugging Procmail Recipes: Some Tips - porkmail.org
    With VERBOSE logging, you get to see when a shell is spawned and when it's not. This is because Procmail formats the "executing ..." log entry differently ...Missing: analysis | Show results with:analysis
  27. [27]
    Procmail Tips
    Procmail is a mail processing utility, which can help you filter your mail, sort incoming mail according to sender, Subject line, length of message, keywords ...
  28. [28]
    CVE-2017-16844 Detail - NVD
    Nov 16, 2017 · Heap-based buffer overflow in the loadbuf function in formisc.c in formail in procmail 3.22 allows remote attackers to cause a denial of service.
  29. [29]
  30. [30]
    CVE-1999-0475 Detail - NVD
    Apr 5, 1999 · A race condition in how procmail handles .procmailrc files allows a local user to read arbitrary files available to the user who is running procmail.
  31. [31]
    Procmail suspicious rcfile message (/home/user/.procmailrc) solution
    Apr 20, 2006 · It is related to file permission. Use chmod command (change file access permissions) to fix problem (assuming that your user name is vivek):.
  32. [32]
    What, if any, injection vulnerabilities are there in bash and how can I ...
    Jan 3, 2011 · The shell script in itself is pretty safe. The most vulnerable part of a mail is the header, and you don't allow the mail sender to change ...Missing: external | Show results with:external
  33. [33]
    CVE-2017-16844 - Red Hat Customer Portal
    Nov 28, 2017 · A heap-based buffer overflow flaw was found in procmail's formail utility. A remote attacker could send a specially crafted email that, when processed by ...
  34. [34]
    procmailrc(5) — procmail - bookworm - Debian Manpages
    Mar 1, 2022 · You can tell procmail to treat a delivering recipe as if it were a non-delivering recipe by specifying the `c' flag on such a recipe. This will ...
  35. [35]
    Using procmail with Dovecot
    But Procmail itself could not update the Dovecot index files. This decreases the performance a bit, because the Dovecot IMAP or POP3 server has to add new mails ...
  36. [36]
    procmail and delivering to an IMAP server? - Stack Overflow
    Aug 3, 2011 · Any ideas? (I'm also interested in any other mail filter tools that work like procmail but support IMAP. The only other filter tool I know is ...Procmail copies message instead of moving itHow to delete IMAP mail with fetchmail / procmailMore results from stackoverflow.comMissing: lack features
  37. [37]
    RFC 5228: Sieve: An Email Filtering Language
    This document describes a language for filtering email messages at time of final delivery. It is designed to be implementable on either a mail client or mail ...
  38. [38]
    Sieve - Dovecot CE
    Jan 27, 2025 · Sieve support for Dovecot is provided by Pigeonhole, which allows users to filter incoming messages by writing scripts specified in the Sieve language.
  39. [39]
    What is Cyrus IMAP? — Cyrus IMAP 3.12.1 documentation
    ### Summary of Sieve Support in Cyrus IMAP
  40. [40]
    maildrop - mail delivery agent with filtering abilities
    maildrop is the mail filter/mail delivery agent that's used by the Courier Mail Server. You do not need to download maildrop from here if you already have ...Missing: suite | Show results with:suite
  41. [41]
    Postfix Built-in Content Inspection
    Postfix supports a built-in filter mechanism that examines message header and message body content, one line at a time, before it is stored in the Postfix queue ...
  42. [42]
    Switching from procmail to maildrop - dnns.no
    Nov 5, 2019 · I'll show a few examples of how things are done in procmail and maildrop, and then I'll post a sample of my new config.
  43. [43]
  44. [44]
    Migrating from procmail to sieve - Enrico Zini
    Mar 3, 2022 · Anarcat's "procmail considered harmful" post convinced me to get my act together and finally migrate my venerable procmail based setup to sieve.Missing: comparison ease
  45. [45]
    Migrating from Procmail to Sieve - Hacker News
    Mar 5, 2022 · In principal its exceedingly simple as procmail doesn't parse structured headers or entity bodies; the expressions are applied to the raw lines.Missing: comparison ease