Walter Dnes wrote,
| My experimental split-level filter ... goes like so ...
| Part 2) Check whether an email is from mailing list. Then
| execute "islist" INCLUDERC file. As shown below, list messages
| that survive "islist", should go to $DEFAULT.
| However, on occasions when the mail server is full, mailing
| list messages aren't delivered to $DEFAULT. Rather than
| failing as expected, processing falls through to the next
| recipe!!!
That's right. If you deliver explicity to $DEFAULT, procmail treats it like
any other save-to-folder recipe, and if the write fails, it continues reading
recipes. If that isn't what you want, tell procmail otherwise.
| Now for my question. If I had set the "deliver" destination
| as $ORGMAIL rather than $DEFAULT, would it have made any difference?
Nope. If you write a recipe for it, procmail just expands the variable and
doesn't give a heck if it happens to be the same destination as $DEFAULT or
$ORGMAIL. $DEFAULT is special to procmail only when it uses it on its own
after falling off the end of the rcfile; $ORGMAIL is special only at startup
(without -m) and when procmail falls off the end of the rcfile and finds that
it cannot save the message to $DEFAULT.
| MYLISTS="(procmail@|risks@)"
You could put one at-sign outside the parentheses instead of two inside them.
Not a big difference, though.
| # Run a bunch of tests/processing applicable
| # to both lists and private email
|
| :0
| *$!^(To|Cc|Bcc):.*$MYLISTS
| {
| INCLUDERC=islist
Huh? You run islist if there ISN'T a match to one of the list addresses?
(And are you sure you don't want to make use of procmail's ^TO or ^TO_
tokens, which are better for matching listed addresses.) [Folks, don't try
to convine Walter that it's better to identify mail that came THROUGH a list
than TO one; I've already discussed that with him and he immovably holds
otherwise.]
| ###### Valid list messages that survive testing
| ###### by the "islist" include file should be
| ###### delivered here. It looks like they
| ###### fall through to the next recipe when mail
| ###### server is full.
| :0
| $DEFAULT
First, if $DEFAULT is a plain folder, you should put a local lockfile onto
that recipe (don't rely solely on kernel locking). [If it is a directory,
please inform us so that we don't tell you to use a local lockfile.]
Now, if the save to $DEFAULT fails, you don't want procmail to drop down
further. What you need, then, is an `e' recipe at this point:
:0e:
$ORGMAIL # or however you want to handle mail that can't fit into $DEFAULT
| }
| INCLUDERC=isnotlist
| ###### The "isnotlist" include file checks for
| ###### email not addressed to me or from
| ###### Interlog. The first recipe in there
| ###### will reject all of my lists. That's why
| ###### I go to the trouble of separate processing.
| :0
| $DEFAULT
In that case, here's another approach:
MYLISTS="whatever"
:0
* $ ^TO_($MYLISTS)
{ INCLUDERC=islist }
:0E # list mail that fell off the end of islist will skip isnotlist
{ INCLUDERC=isnotlist }
:0: if the appropriate INCLUDERC didn't deliver
$DEFAULT
If that is the tag end of your .procmailrc the attempt to deliver to
$DEFAULT is implicit, so you don't even need to code it.