The procmail and formail mail processing package can be used to create mail-servers, mailing lists, sort your incoming mail into separate folders/files , preprocess your mail, start any programs upon mail arrival (e.g.
an advanced package for setting up custom mail processing rules ( page link)
a unix mail processing utility that can automatically filter, sort, process, and reply to email messages
Autonomous mail processor, see the section called "Mail user-agents".
Autonomous mail processor, see Section 10.2.2.3.
Procmail is a mail delivery agent (MDA) or mail filter, a program to process incoming emails on a computer, widely used on Unix systems. It is typically invoked from an MTA like Sendmail; this makes the mail processing event-driven. The companion-tool formail allows procmail to be used in batch-processing on mail that already is in your mailbox.