[Wylug-discuss] Procmail filters

jlyht at wylie.me.uk jlyht at wylie.me.uk
Wed May 4 20:30:34 BST 2005


On Wed, 4 May 2005 19:36:40 +0100, Anne Wilson <cannewilson at tiscali.co.uk> said:

> I'm having some problems with procmail filters.  I have a number of
> filters that work exactly as expected, but a few don't.  I've tried
> RTFM, but in the first place, the documentation available gives
> different versions of syntax, though none of them seem to make any
> difference to my problem filters.

Some hints that may help:

1) all dots in e-mail addresses should be quoted with a "\", else
they will be interpreted as single character wildcards.

2) try adding the following two lines to your .procmailrc - you
will get some debugging info on the patterns that match
LOGFILE=<logfile>
VERBOSE=on

3) mail messages may contain both a line starting with "From "
(containing the envelope from address) as well as one starting with
"From: ".  All my such procmail rules start with "* ^From: "

4) I'd tighten up the rules a bit more to avoid positives - all my
rules contain an "@", and many contain a "$" at the end.

> :0:
> * ^From: .*(sasktel.net|sasknet)
                     ^
should be quoted

> :0:
> * ^From: .*\Josenildo
             ^
I can see no reason to quote the J

-- 
Alan J. Wylie                                          http://www.wylie.me.uk/
"Perfection [in design] is achieved not when there is nothing left to add,
but rather when there is nothing left to take away."
  -- Antoine de Saint-Exupery




More information about the Wylug-discuss mailing list