Procmail
Contents
What is Procmail?
Where to find Procmail
Procmail: Instructions
Common Problems and Questions
Other Resources
If you still need help...
Procmail: Description
What is Procmail?
Procmail is a powerful UNIX mail processing program that can help you
accomplish the following tasks, among others:
-
filter your mail (for example, separate mailing list messages from other
messages)
-
sort your incoming mail according to criteria such as sender or a keyword
in the Subject: line
-
implement an auto-reply mechanism (for example, send a vacation message
to correspondents who send you e-mail while you are away from school or
work)
Procmail works with any of the commonly used UNIX mail programs by reading
a file you create in your home directory, called .procmailrc. This file
includes instructions (recipes) for processing your incoming mail. If a
message matches the conditions you specified, procmail intercepts normal
delivery according to your specifications. For example, the message may
be appended to a file, or forwarded to another recipient, or it may generate
an auto-reply. If none of the conditions are matched, procmail delivers
the message to your default inbox.
Recipes with different functionality are usually placed in separate files,
conventionally called "rc" files, which are called by an INCLUDERC command
in the .procmailrc file. This makes it easy to change conditions (turn
recipes on or off) as the need arises.
Procmail:
Contents
Where to find Procmail
Procmail
is located on the central UNIX systems at the University of Delaware. If
you run your own UNIX-like system, you can download
the latest version of the free package of procmail tools and man pages.
Procmail:
Contents
Procmail: Instructions
In order to run procmail and use
the procmail man pages, you need to set the appropriate PATH and MANPATH
variables. In the file .localenv in your home directory, after the following
comment lines,
### Begin -- personal commands following this line:
# Use NEWPATH instead of PATH in this section:
insert these four lines:
if -d /opt/procmail then
setenv NEWPATH /opt/procmail/bin:$NEWPATH
setenv MANPATH /opt/procmail/man:$MANPATH
endif
Save the edited file. You will be able to run procmail the next time you
log on.
Follow the directions in the Web document
Procmail: Instructions
for using procmail at the University of Delaware. These directions
have been adapted for local use from the procmail section of the Usenet
Filtering Mail FAQ available at Infinite
Ink's FAQ Launcher or its mirror
site .
Procmail:
Contents
Common Problems and Questions
This section contains answers to some of the questions more commonly
asked about procmail.
Q: Help! Something in my procmail files has gone into an
infinite loop - I can't stop my test message from being delivered over
and over again..
A: Rename your .procmailrc file to anything that procmail does
not recognize, for example:
% mv .procmailrc bad.procmailrc
Once you have corrected the errors in bad.procmailrc or in the
inluded rc files, rename it .procmailrc and test again.
-
Q: I have set up a .procmailrc file, a .procmail directory, and recipe
files as described in the instructions, but mail is going to my inbox instead
of where I specified. How can I find out what is wrong?
-
A: Here are some general strategies you can use:
-
Look at your procmail log file (.procmail/log) and see whether you can
determine what the problem is.
-
Check these files for typographic errors:
.procmailrc
.procmail/rc.xxxx
where rc.xxxx represents each rc file that is not working correctly.
-
If these steps do not help you clear up the problem, edit the .procmailrc
file so that verbose logging is turned on:
VERBOSE=on
Test procmail again as described in the Web document
Procmail: Instructions
and look at your log file, which will now contain more detailed information,
to see if you can determine the cause of the problem.
Once you have solved the problem, set
VERBOSE=off in your .procmailrc file.
-
Q: I am using a .forward file to forward my UNIX mail to another
account. Can I use procmail to filter my mail before it is forwarded?
-
A: No -- the .forward file takes precedence over procmail.
If you want to filter your mail and forward some or all of it, remove your
.forward file and write the appropriate procmail recipes.
-
Q: I would like to use procmail as my mail filter, and occasionally
use the UNIX vacation program to notify correspondents when I am away from
the University. Is that possible?
-
A: The vacation program uses a .forward file which takes
precedence over procmail, so you cannot use both at the same time. Use
the sample vacation program in the Web document
Procmail:
Instructions.
-
Q: Will procmail interfere with my mail notification program (biff,
xbiff, etc.) or vice versa?
-
A: No, each of these programs functions independently.
-
Q: I would like to turn procmail off temporarily without losing
my .procmailrc and recipe files. What should I do?
-
A: Rename your .procmailrc file so that procmail doesn't
recognize it (e.g., was.procmailrc) or move it to a temporary subdirectory.
Procmail:
Contents
Other Resources
For more information about procmail, consult the following resources:
-
Era Eriksson's Procmail
Mini-FAQ (Finland) which includes references to other sources of information
about procmail on the World Wide Web
-
The procmail man pages on the central UNIX systems, especially man
procmailrc and man procmailex
Procmail:
Contents
If you still need help...
Contact the University
of Delaware I.T. Help Center by phone (831-6000) or by e-mail.
Procmail: Contents
Help Center Home
Page
Technology
Home Page
University of Delaware
Home Page
Last modified: Feb. 12, 1998
This page maintained by Evelyn V.
Stevens.
Copyright © University of Delaware, 1998.