On Tue, Mar 18, 2003 at 01:58:00PM -0500, David Turley wrote:
On Tue, 18 Mar 2003 19:37:56 +0100 Dallman Ross <dman(_at_)nomotek(_dot_)com>
wrote:
# for the whitelist
* ? ($FORMAIL -x From: -x Sender: -x Resent-From: | $FGREP -iqf
$FRIENDS)
You really should think about employing either the -x or at least the
-w option to fgrep.
Suppose you have me, dman(_at_)nomotek(_dot_)com, in your whitelist. Now
suppose
that the mythical feldman(_at_)nomotek(_dot_)com writes you for the first
time.
You wouldn't want him to be whitelisted, would you?
Doesn't seem to work that way for me. I have lots of specific aol
addresses in my whitelist, but other aol addresses don't get passed
automatically. The whitelist check is the irst thing I do, after
virii checks, and otehr aol mail goes thru the rest of the filters.
It absolutely would work that way. I knew it would, but I just tested
it anyway. It did what I said.
Here is my (your) recipe, from my test harness:
FRIENDS=.friends
:0
* ? (formail -x From: -x Sender: -x Resent-From: | fgrep -iqf $FRIENDS)
{ LOG = "$NL The action succeeded. $NL $NL" }
I took the email you replied to, which had my given name and email address
in the From: field, and ran that through. Naturally, it succeeded.
Then I edited "dman@" in the From: header to "feldman@" and ran the
message through again. It still succeeded. Then I added the `w'
flag to fgrep in the recipe above. It would then only work with
"dman@", not "feldman@", "goldman@", or "anything-elsedman@".
It would still pass with "string-dman@", i.e., with the hyphen;
or with a dot or other non-alphanumeric. The -x flag is best,
but then you will have to strip out < and > from your formail
results to have a sure match.
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail