SourceForge Logo

Sortmail -- Download and process email

This web page describes the email sorting program sortmail.

Originally written in 1990, sortmail predates procmail and has, IMHO, a simpler and more compact configuration file. The sortmail config file is very similar to the rn KILLfile. Sortmail was originally published via the comp.sources usenet hierarchy, but then faded into obscurity.

This version of sortmail, 2.0, has many many new features and can be used as both a replacement for fetchmail, and for procmail in many cases.

In typical usage, sortmail is used to post-process email which was delivered to your system via the conventional route. Simply add a .forward file to your home directory which redirects all incoming email to sortmail, and write a .sortmailrc file full of rn-style entries to control the disposition of the email.

In addition, sortmail can be used to retrieve email from a POP server and then process it.

Visit the sortmail project page for downloads and other stuff.

View the man page for more details.


Sample config file:

set default=+other /MAILER-DAEMON/f:+bounces /falk/t:m /bldg8/t:m /joe/f:m /scubaclub/t:+scuba /scuba/s:+scuba /spammer/f:j /testing/t:m falk@lab /jym@apple/f:| /home/falk/bin/fixjim /^Precedence: junk/h:+other (/bill/f && /dive/s):+scuba []r:j

See the documentation for a more detailed explanation.