On Thu, Jan 19, 2006 at 11:28:37AM +0100, Michelle Konzack wrote:
Hello,
why not simply greping for it?
:0:
* H ?? ^From:(_dot_)*(_at_)apid\(_dot_)net
* H ? test -z "`formail -c -xReceived: |grep "[65.17.84.226]"`"
$DEFAULT.TRAPPED
Whatever for?!
Anyway, your syntax is screwy, so I don't see how you come up
with
Tested and works. :-)
Even if we wanted to do this, which we don't, the second
condition would gbe
* H ?? ? test {blah}
I suppose maybe it works anyway because H is the default
for conditions. (You don't need those "H" bits at all.)
Also, even if we wanted to use formail|grep like that,
which, as I said, we don't, you would want some quoting
with the grep regex, or to use fgrep.
We certainly don't need to run the result of grep through
test. We can use grep flags to accomplish the same.
To get a "not", we can negate the condition, rather
than use -z with test, if we want.
Anyway, it seems to me that your second condition will always
come out true, unless there's only one Received header.
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