procmail
[Top] [All Lists]

Multiline Received header not being matched

2004-02-13 07:28:58
I'll try this again:

Due to a recent software/configuration change, my local mail server
is splitting the Received: header over several lines.  The procmail
docs say this shouldn't be a problem since procmail will match any
Header: even if it is split in this way.

Unfortunately in my case, this does not appear to be true.

Here are some example recipes that don't work.  They both result
in a "no match on ..." entry in the log file:

:0f
* ^Received: from.* \(\[[0-9]+.* by example\.com
| formail -A "X-SpamTest: Sending MTA has no rDNS"

:0f
* ^Received: from.* \(\[[0-9]+(.*$)[  ]+by example\.com
| formail -A "X-SpamTest: Sending MTA has no rDNS"

(The [] enclose a space and a tab)

Note that the first of these used to work when the Received: header
inserted by my mail server (rendered as example.com here) simply
line-wrapped it's information.  The new Received: headers look like
this:

Received: from ladyfire.com ([218.81.186.165])
        by example.com (8.11.6/8.11.6) with SMTP id i1DBUPI14946;
        Fri, 13 Feb 2004 06:30:26 -0500

This works:

:0f
* ^Received: from.* \(\[[0-9]+
| formail -A "X-SpamTest: Sending MTA has no rDNS"

but it can generate false positives when the mail has multiple
Received: headers, which is why I want to limit the match to
the one inserted by my own mail server.

Help!

Dave Stone



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