procmail
[Top] [All Lists]

Re: Message-ID syntax

1999-10-18 02:16:15
* Rejo Zenger (subs(_at_)sisterray(_dot_)xs4all(_dot_)nl) [991017 06:16]:
Finally, I'll note that rfc822 actually allows comments in Message-Id:
headers (indeed, comments are one of the lexical tokens listed in section
4.1.4).  While it is impossible to match arbitrarly nested parens with
a regular expression, it is simple to match one level of parens, and
given that there's a Banyan Vines MTA that includes a comment in the
local part of the Message-Id: header, I would recommend changing the
'ws' definition to the following:
    ws="[   ]*(\([^()]*\)[  ]*)?"

(Yes, that _could_ be
    ws="[   ]*(\([^()]*\)[  ]*)*"
but I have yet to see a Message-Id: header with two comments in a row,
and I don't feel like that much slack to a loser MTA/MUA writers.)

But strictly taken (the way the RFC tells it us) it is possible to have
two comments in a row. Correct? If so, i prefer the latter one.

Actually, it allows an arbitrary number of comments..  The reason two
was noted is that it is complete impossible to match an arbitrary number
of matched parens with a regexp.  If you allow for two, you'll catch
almost every instance (in fact, one would probably catch almost all
instances, I don't recall every seeing a comment in the Message-ID..)

HTH,

jon

-- 
Jonathan J. Miner-------------------Division of Information Technology|
miner(_at_)doit(_dot_)wisc(_dot_)edu                  University Of Wisconsin - 
Madison|
608/262.9655                                Room 3149 Computer Science|
----------------------------------------------------------------------'

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