Introduction to Procmail

The Procmail package contains an autonomous mail processor. This is useful for filtering and sorting incoming mail.

Package information

Installation of Procmail

Install Procmail by running the following commands:

make BASENAME=/usr install &&
make install-suid

Command explanations

BASENAME=/usr: The equivalent of ./configure --prefix=/usr on other package installations.

make install-suid: Modifies permissions of the installed files.

Configuring Procmail

Config files

/etc/procmailrc, ~/.procmailrc

Configuration Information

Recipes have to be written and placed in your ~/.procmailrc for execution. The procmailex man page is the starting place to learn how to write recipes.


The Procmail package contains procmail, formail, lockfile and mailstat.



procmail is an autonomous mail processor. It performs all the functions of a MDA (Mail Delivery Agent).


formail is a filter that can be used to format mail into mailbox format.


lockfile is a utility that can lock a file for single use interactively or in a script.


mailstat prints a summary report of mail that has been filtered by procmail since the last time mailstat was ran.