Filter is different from procmail, in that it uses english commands. For example:
from = "bugs@debian.org" then save /home/bolthole/debian-bugs to = "mailings@bolthole.com" then execute "/home/bolthole/bin/redistribute"
"filter" was originally distributed with "elm", a text-based mail reading program that runs on almost any platform. It now compiles and runs without requiring elm. v2.4 and newer will look in $HOME/.filter for "filter-rules"
Latest official release: filter2.6.3.tar.gz (Dec, 2004) (Configure typo fixed)
NOTE: v2.4 and later uses $HOME/.filter/, not $HOME/.elm/ any more!
2.6.1: fixed buffer overflow problem in save_embedded_address()
Added in 2.6: a "from" rule will match "From ",From:,Reply-To:, Sender: independantly. Previously, the last header of those four would be the only one to be checked.
Added in 2.5.1: iso-xxxx-xxx binary de-encoding for subject lines.
Added in 2.4.2: The "lines" compare now works again, I hope.
You can now ditch all email longer than 1000 lines, for example.
Added in 2.4: resend and mailinglist
Fixed since 2.2: executec and forwardc
Fixed since 2.1:
There previously was a problem compiling under RedHat.
There previously was a problem compiling under Debian.
Version 2.1+ allows filter to recognize a different type of "mailbox" path. It defaults to something like /var/mail/%u but you can tell it that email gets delivered to users home directories by specifying /home/%u/inbox or something similar.
/path/to/backupmbox,"|filter"in $HOME/.forward, instead of only sending to filter.
For some more detailed information about filter, you can download the source, and look in the "doc" directory.
You will need a compiler (like gcc) to compile filter, before installing. Dont worry, it's pretty painless. Just run "./Configure", after extracting it from the gzip'd, tar'd archive, and press 'return' a bunch of times!
What with all the irritating f.a.k!e.sub.jec%t_LI#nes these days, a hopefully useful new feature is the alphasubject virtual header field. It forces the subject line to lower case, and removes all punctuation. A very useful rule is as follows:
#Delete the really obvious stuff alphasubject ~= /pen[i1l]s/ then delete
Note that you MUST QUOTE "" the stuff after exec.if (to = "special@addr.com") then exec "/usr/lib/sendmail outside@addr.here"