Procmail has a very steep learning curve, but is power is quite
If you want to redirect mail to specific users on that system, then you
could end a recipe with the line "! firstname.lastname@example.org"
That isn't flaky at all. Its a bit more trouble to do this from a
I would suggest starting by reading "man procmailrc", for some information
on the configuration file, and "man procmailex" for some configuration
I think you would want to use the "To" function in a recipe's search, to
select a specific recipient domain, for a specific filter.
Have you read the postfix.txt file in the contrib directory of the Anomy
distribution. I am not familiar with postfix, and I just took a look at
this file, but I'm using it for a common reference point to give you some
In section 4, the file refers to the file /etc/procmailrc, with entries
The first line, just copies all of the mail to an mbox style file named
The ":0" begins the recipe, and the "c" says to copy the data, and not to
The "ANOMY=/usr/local/anomy/" just sets an environment variable which
tells the sanitizer where it lives (that need to be where you put it, but
/usr/local/anomy is a good location).
The ":0 fw" is a new recipe which filters the mail, and waits for the
The mail is then filtered as input to the program
"/usr/local/anomy/bin/sanitizer.pl" with the command line option selecting
"/etc/sanitizer.cfg" as its configuration.
Replacing this recipe with the following two recipes:
Would take mail directed to a specific email@example.com, and sanitize it
with the sanitizer.cfg1 ruleset, and would filter mail to a
firstname.lastname@example.org using the sanitizer.cfg2 ruleset.
NB, that THIS EXAMPLE IS -VERY- BAD!
I only mentioned it to point out how very easy it is to goof up in a
This will ONLY filter mail sent "To" a user. CC, and BCC, etc will not be
Fortunately, procmail has set up some neat predefined regular expressions
to help with this.
Replacing the "^To:" with "^TO_" or "^TO" will substitute in a rather
large regular expression to help this out. I leave it up to you to figure
out the difference between the two (hint: its in the procmailrc man page)
Does this help any?
| |\ Robert C. Litman \
| | | |
\/__| http://www.rlitman.com |
| ftp://ftp.rlitman.com |
/\ | Desk: (631) 501-2572 |
| | | Fax: (631) 514-6626 |
| |/ email@example.com /
"Wil McGilvery" <firstname.lastname@example.org>
09/18/2002 10:53 AM
Subject: [anomy-list]: Procmail for dummies
I am currently running a Postfix Server that acts as a gateway and as a
local mail host for several domains. I have been experimenting with Anomy
and SpamAssassin and I wish to be able to set different filter settings
for each domain. I also do not wish to filter outgoing mail. (I currently
use a script (not procmail) that filters all mail that arrive at the
I have been reading up on Procmail and it appears that it can only be used
to direct mail locally. I found a "To" function that that could be used to
redirect mail, but I also read that this set up is flaky at best.
What have other people done? Where can I find a "How To" For the procmail
Manager, Digital Media
Lynch Technologies Inc.