procmail
[Top] [All Lists]

Re: address/domain matching question

2003-04-04 16:24:40
On Fri, Apr 04, 2003 at 08:51:30PM +0100, Alan Clifford wrote:
On Fri, 4 Apr 2003, Dallman Ross wrote:

DR>
DR> Just put whatever strings you want to match in the file, one per
DR> line; then use the -x flag to fgrep.  You will want the -z flag for
DR> formail, also.  I don't think you need the parentheses.
DR>
DR>  * ? formail -x From: -x Sender: -x Resent-From: -z | fgrep -iqxf $FRIENDS
DR>
DR>

You've introduced the x flag to fgrep.  Surely that means if you have
blobby(_at_)example(_dot_)com in the friends file and the text you are 
testing is
<blobby(_at_)example(_dot_)co> then there is not an exact match?

Surely.  What part of "put whatever strings you w ant to match in the
file" don't you undersand, Alan?


To test, we don't need a procmail recipe, just the friends file

@example.com
good(_at_)msn(_dot_)com


and

echo "anyone(_at_)example(_dot_)com" | fgrep -if list.friends

Okay:

 1:08am [~/Mail] 640[1]> echo "one(_at_)example(_dot_)com" | fgrep -if 
list.friends
one(_at_)example(_dot_)com

That's the problem without the x flag to fgrep.

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail