I'm trying to check the received headers for a certain combination.
Spammers now send messages claiming to be "From:" me. I want to make sure the
message came from my server. A valid received header reads:
Received: from slartibartfast.homebody.net (unknown [192.168.1.3])
by email1.homebody.net (Postfix) with ESMTP id 6EDB9740DF
for <lhoffner(_at_)directedmotion(_dot_)com>; Mon, 21 Jun 2004 06:14:25
-0500 (CDT)
I'm extracting the header with this recipe:
:0
^From:.*\<(lhoffner(_at_)directedmotion(_dot_)com)
{
REC=`formail -zx "Received:"`
:0
* ? $REC = 'from slartibartfast.homebody.net (unknown [192.168.1.3]) by
email1.homebody.net (Postfix)*'
{
:0 :
$MAILDIR
}
}
Here, I want $REC to match this particular beginning of a string for
Received:, plus anything after.
But my logs report:
/bin/sh: line 1: test: too many arguments
Have I written bad syntax?
Thanks!
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail