Procmail is a mail delivery agent (MDA) and mail filtering program for Unix-like systems. It can be used on both mail clients and mail servers to filter, sort, and process incoming email based on user-defined rules. Procmail was widely used in the 1990s and 2000s but has largely been superseded by Sieve filtering and Dovecot LDA in modern deployments.
- Latest Release: 3.24+really3.22 (2025, Debian package)
- Original Development: Stephen R. van der Berg
- Status: Minimal maintenance, packaged in major distributions
- Debian Package: Still maintained in Debian repositories (2025)
- Mail Filtering: Powerful pattern-based filtering rules
- Mail Sorting: Automatic sorting into folders
- Recipe System: Flexible rule-based processing
- Lightweight: Minimal system resource usage
- Integration: Works with most MTAs (Postfix, Sendmail, Exim)
- Scripting: Can execute external programs
- Legacy Systems: Maintaining existing Procmail setups
- Server-Side Filtering: Filter mail before client access
- Mail Sorting: Automatic folder organization
- Custom Processing: Execute scripts on incoming mail
- Language: C
- Architecture: Standalone MDA with configuration files
- OS Support: Unix, Linux, BSD, macOS
- Dependencies: Standard Unix libraries
- GPL-2.0 (GNU General Public License v2.0)
- ⚠️ Minimal Maintenance - Packaged but not actively developed
- ⚠️ Legacy Technology - Largely replaced by Sieve/Dovecot
- ✅ Still Available - Included in major distributions
- ⚠️ Learning Curve - Complex recipe syntax
Procmail uses a configuration file (.procmailrc) with recipe-based rules:
# Example .procmailrc
MAILDIR=$HOME/Maildir
DEFAULT=$MAILDIR/
LOGFILE=$HOME/.procmaillog
# Rule: Move spam to Spam folder
:0:
* ^X-Spam-Flag: YES
Spam/
# Rule: Sort mailing list messages
:0:
* ^List-Id:.*linux-server-admin\.com
MailingLists/linux-admin/
For new deployments, consider:
- Dovecot LDA + Sieve: Modern, actively maintained
- Maildrop: Alternative MDA with filtering
- Rspamd: Server-side filtering with web UI
- SpamAssassin + Procmail: Hybrid approach
Procmail was developed in the early 1990s and became the standard MDA for Linux systems. It was the default MDA for many distributions including Debian and Ubuntu. While still available, most modern systems now use Dovecot’s LDA with Sieve filtering.
- 1990s: Development and widespread adoption
- 2000s: Standard MDA for Linux distributions
- 2010s: Gradual replacement by Sieve/Dovecot
- 2025: Still packaged in Debian, minimal maintenance
¶ History and References
- Documentation:
man procmail, man procmailrc
- Debian Package: https://tracker.debian.org/procmail
- ArchWiki: https://wiki.archlinux.org/title/Procmail
Common issues and solutions:
- Complex syntax: Start with simple recipes, test thoroughly
- Permission issues: Ensure proper mailbox file permissions
- Not delivering: Check MTA configuration, verify
.procmailrc syntax
👉 See Procmail Configuration for detailed configuration guidance.
Any questions?
Feel free to contact us. Find all contact information on our contact page.