procmail
[Top] [All Lists]

Re: help for a newbie

2004-11-30 10:00:20
On Tue, Nov 30, 2004 at 05:24:41PM +0100, Ruud H.G. van Tol wrote:
Number 5:
I seldom use grep, but I think that the -w is strange.
Shouldn't that be an -F?

Suppose bart(_at_)example(_dot_)com is in your whitelist, and the 
mail is from other(_dot_)bart(_at_)example(_dot_)com

(Where've you been?  We've been discussing this for a couple of
days now.)  :-)

Originally he had no flag but -i.  He got that from Troy Piggins.
I said one would ideally want an -x, but even a -w would be far
superior to not.  I showed why.

I also said fgrep was best because it precluded unexpected and
unwanted regex behavior.

However, there can be reasons why one might want regexes in the
whitelist.  And there can be reasons why one might want -w over
-x.  For example, what if the white list contains the name as well?


    "John Doe" <johndoe(_at_)example(_dot_)com>
    "Pete Smith" <petesmith(_at_)example(_dot_)com>

etc.

Then, assuming one feeds the raw email address to grep, the -w
flag is useful here.

Yes, certainly it can have an overbroad match, as you stated.  That
was the reasoning behind my comment that -x was best.  But people
make their own algorithmic compromises all the time, and if someone
has a setup with more than raw addresses in the file, or if they
are in there in the manner of the formail -D cache file, i.e.,
not each on its own line, then one needs to find a compromise.

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail