procmail
[Top] [All Lists]

Re: Filtering Multiple Mailing Lists

1997-07-12 15:39:00
On Sat, 12 Jul 1997 21:29:21 -0500, Ben Escoto <benscott(_at_)mcs(_dot_)net>
wrote:
by other recipies.  It appears that your syntax
($FOLDER${FOLDE... etc) keeps procmail from forking.

I don't know what you've tried. This block where this is happening is
a non-delivering recipe so Procmail continues processing. 

By the way, this vaguely hints at a possible solution for the dreaded
"Cc: ian and dennis" syndrome,^)

     It is not necessary to have separate rc files (perhaps I
understood your suggestion wrong?); all the recipies can just be put
in .procmailrc or whatever.

Absolutely.

     The same can be used if you ever want to mark more than one
message unseen, e.g.:
:0
* ^TOprocmail(_at_)Informatik
{
  FOLDER="$FOLDER${FOLDER:+ }lists/procmail/. list/."
  UNSEEN="$UNSEEN${UNSEEN:+}+lists/procmail"
}

I don't think the ${VARIABLE:+ } trickery is really necessary here.
What it does is it will insert a space only if the variable already
has a value, but I don't think an extra leading space will do any harm
here. So you can just say "$FOLDER lists/procmail/. list/." etcetera.
(I guess I wrote it that way out of old habit.) The ${UNSEEN:+}
expression will never evaluate to anything at all, but I assume you
only copied it incorrectly. (If you want to distinguish between the
variable $UNSEEN followed by the string "lists" and the variable
$UNSEENlists, you can use braces, like ${UNSEEN}lists.)

Although, of course, I am not suggesting that is the best or even an
adequate way to test for messages from this list. 

For what it's worth, I filter all mailing lists on the From_ line
myself. It's been working fine and avoids some problems I've seen with
other people's recipes (but it's not perfect, of course -- some
mailing lists keep changing their From_ line a lot, and one was even
not setting the From_ line to anything in particular but would just
pass on the original senders' From_ lines. It was changed because
other people were using From_ filtering too.)

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>