procmail
[Top] [All Lists]

Re: matching Received

2006-01-09 08:56:07
On 06 Jan 2006, at 14:44 , Mr Duck wrote:
   Suppose that an email comes in that has three Received header
lines; the second is the one that we want (that shows that the
message was received by our trusted IP).  The recipe matches on
the From, so it goes to match on the Received. Well, since the
regexp match process is linear, my understanding is that it will
find the first Received line, and the ! matches because it doesn't
find the happy IP that it was looking for.  So, according to the
rules of the recipe, a valid match was found and so the message
is dumped into the .TRAP file to which I pointed it.

So reverse your logic

If a message has a from of your domain AND one of the received lines  
contains your firewall, then the message is good:

:0fw
* H ?? ^From:(_dot_)*(_at_)apid\(_dot_)net
* H ?? ^Received:.*65\.17\.84\.226
|formail -I"X-mydomain-FWCheck: PASS"

# If the previous recipe was not executed, then do this:
:E:
# Bad message
bad.messages


-- 
sometimes ascii is the best use of bandwidth... Tonya Engst



____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>