O’Reilly: Order from Chaos with Procmail

“Twenty years ago, people used the number of phone calls they
made in a day as a metric of how connected they were. Nowadays,
people use the amount of email they receive each day. The truth
about email, however, is that not all of it deserves equal time.
Much of it might be email you don’t want to see at all, but have
agreed to receive in order to register on some company’s Web site.
Or maybe you receive it because, unbeknownst to you, someone sold
your name and address. And a good bit of your email probably comes
from legitimate discussion or workgroup-mailing lists that don’t
demand immediate attention.”

“The amount of attention you give to any email message is
probably inversely proportional to the number of recipients. For
example, you’d pay the least attention to messages from brainless
spammers and nebulous corporate administrativia (most of which
you’d probably delete), and devote most of your attention to email
sent to you alone, with various discussion and workgroups lists
falling somewhere in between.”

“Procmail brings order to the chaos of your inbox, and it does
much more. Procmail, and the cluster of utilities associated
with it, can take one or more actions on individual email messages
based on the content of the headers or the body, or the size of the
message. Once a specified condition is met, Procmail can file the
email in a local mailbox (which could be /dev/null, effectively
deleting it), forward it to another address, or pipe it as input to
another command. Procmail can help manage your email in infinite


Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis