procmail
[Top] [All Lists]

Re: Problem with missing "Message-ID:"

2005-04-28 09:10:56
On Thu, Apr 28, 2005 at 10:44:38AM -0500, David W. Tamkin wrote:

:0hwf
* ^Message-Id: *\/[^ ]+
* ! MATCH ?? ^<.*>$
| formail -i "Message-Id: <$MATCH>"

This is good but suffers from a deficiency: if there is a < but
not a >, or vice versa, it will double-up the char that's there
already.  The solution I just sent in won't do that.

  :0 h fw
  * ^Message-Id:.*\/[^       ]+
  * ! MATCH ?? ^^<.*>^^
  *   MATCH ?? ()\/[^><]+
  | formail -i "Message-ID: <$MATCH>"

Now, what exactly to do if there are two or more Message-Id:
headers depends on how you want to handle the situation,
particularly if one of them already has angle brackets and one
doesn't.

True.

-- 
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