procmail
[Top] [All Lists]

Re: grep whitelists and checking return code

2004-07-14 08:30:43
----- Original Message ----- 
From: "Paul Chvostek"
Sorry, no can do.

$ printf 'test(_at_)example(_dot_)com\ntesting\n' > .wltest
$ echo 'testing' | egrep -qisf .wltest
$ echo $?
0
$ echo 'test' | egrep -qisf .wltest
$ echo $?
1
$ echo 'test(_at_)example(_dot_)com' | egrep -qisf .wltest
$ echo $?
0
$

That's the same behavior I get with GNU's grep on RH's FC1 distro.  I
falsely assummed it would match "test" in the .wltest file as if I would be
doing:

[root(_at_)secure root]# cat .wltest |grep test
test(_at_)example(_dot_)com
testing
[root(_at_)secure root]# echo $?
0
[root(_at_)secure root]# cat .wltest |grep tests
[root(_at_)secure root]# echo $?
1

So using a pattern file (with the -f switch) the line must match exactly.

Does someone have a whitelist/denylist rule that can use domain wide
whitelisting as well as specific user whitelisting?  I think I somehow need
to extract the sender's domain, do a grep test for domain-wide pass, then
grep for the sender's full email address.  I'm not a procmail expert on
this.  Any advice is appreciated!

Thanks,
-eric wood



____________________________________________________________
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