This is included here for historical purposes only. This is known to contain miscellaneous warts, errors, typos, and broken links. For hopefully more accurate information, consult the most recent version of the Procmail Mini-FAQ
[March 1999: I've added some annotations, like this one, as a bit of commentary.]This is a draft FAQ for Procmail, the mail processing utility.
This document is a minimalist attempt at answering the most often asked questions and straightening out the most frequent misconceptions about Procmail. This is no substitute for the manuals, and indeed mostly contains pointers to the manuals and other similar resources, as well as a small collection of links to more information.
Please take a minute to skim through at least the Contents section below, so you know which issues are discussed here.
The author's contact information is
at the bottom of this page
Procmail is also a complete drop-in replacement for your MDA. (If this doesn't mean anything to you, you don't want to know.)
Procmail runs under Unix. See Infinite Ink's Mail Filtering and Robots page for information about related utilities for other platforms (there aren't that many).
The recommended version of Procmail to install is 3.11pre4 . You can download it from the main Procmail site or get it from a comp.sources.unix mirror.
[The documentation stated new versions would get posted to comp.sources.misc long after Stephen had stopped doing this. Of course, I even got the newsgroup wrong.]The installation procedure is fairly straightforward but probably not the first thing you should attempt after you get a Unix account.
You can't just snatch somebody's copy, because the installation procedure needs to determine where your mail spool is, what kinds of file locking should be employed, etc.
The distribution comes with a simple FAQ (text only, no HTML) which covers many issues faced when first getting acquainted with Procmail, ranging from where the manual pages go to rather technical issues.
This FAQ does not try to delve into any of the "deep" issues, although some of them are rather frequently brought up on the Procmail mailing list. You might want to look at the Best of Procmail archive for solutions before you mail the list about your problem.
A: Could be. Ask around. Yes, one installation per site should suffice.
How do I use wildcards in Procmail?
Briefly, the regular expression to match anything that begins with
"pr" and ends with "mail" is
^pr.*mail$ but for practical
purposes, e.g. in a Subject: line, you might want to try the following
This says: Anything that begins with "Subject: pr" and contains the string "mail" somewhere after that is to be saved in the folder:0: * ^Subject: pr.*mail procmail-mail
The neat stuff starts when you want to include "procmail" but exclude "pro-mail" and "ProMail" while still looking for anything else that begins with "pro" and also contains "mail", but this tutorial ends here.
Any beginners' book about Unix will contain a more detailed tutorial
on regular expressions, most likely in conjunction with examples using
sed programs. For reference,
the manual page for
egrep (an extended
contains a concise listing of regular expression operators.
A: Yes. Don't bother with Procmail if you want something simple and stupid.
Q: Why doesn't this work?
:0: * ^TO:.*|*reguler ixpressiun full of synutsax errors as weel as typoes**.* ! mailto:[email protected] # this isnt correct is it? Help!
[I'm sorry, but at the time, I thought this was hilarious. I guess I still doA: Various syntax errors notwithstanding (read the manual), you shouldn't use a wildcard after the ^TO macro. Try this:
:0 # no need to lock /dev/null ... * ^TOregular expression without syntax errors or typos /dev/null
Help, I get this error message ...
The light bulb contains the seeds of its own revolution.
[This is the punch line from the old joke "How many Marxists does it take to change a light bulb?" Another case where I just couldn't help myself, I'm afraid. As a matter of fact, it's still in the FAQ, for hysterical reasons, although I don't expect many people will appreciate it. Anyway, it's supposed to mean "You can and should learn to help yourself."]Before you panic, try adding
.procmailrcand examine the information about Procmail's actions that are written to the log. This tells you, in excruciating detail, about every decision Procmail makes while processing your
The error messages and some plausible explanations are listed on the
Procmail manual page. If you haven't before, now is the time to read
the manual pages. Note that there are several;
discusses the syntax of the
rc files while
procmailex contains some nifty examples.
Where can I learn more?
$Id: mini-faq.prep,v 1.1 1996/12/11 15:41:51 reriksso Exp $
Please mail me with any feedback or comments to this FAQ!