procmail
[Top] [All Lists]

Re: Message-ID syntax

1999-10-18 02:16:17
Rejo Zenger <subs(_at_)sisterray(_dot_)xs4all(_dot_)nl> writes:
++ 16/10/99 08:59 -0500 - Philip Guenther:
...
Wow... i have never noted that before! So, to say it in less 'expensive'
words, another way to say this is that one is allowed to spaces to
increase readabilty? And even another way would be:

      Message-ID: < local_part @ domain_part >

...is a RFC valid Message-ID?

Yep.


Additionally, but not very important, should this trailing 'D' be
capitalized or not? In the RFC i only see it with a capitalized 'D' at
the end, you almost always write it with a small 'd'.

As headers field names are case-insensitive, it doesn't matter.
I consider the canonical form to only capitalize the first letter and
any letter after a hyphen, but that's just my opinion.


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

Well, this brings up the question of "why are you doing this?"  What is
"correct" here depends on your answer.


Also, the RFC allows comments in both the local and the domain parts? If
not i'll change the regexp a little so it'll will only match comments in
the local part.

They're a lexical token which is ignored as it's recognized.  As such,
they are stripped for the recognition of the higher level structures.
So, they're allowed between *any* two tokens in the field value.
The following is legal by the rfc:

        Message-Id: (ksdjfhs(kdsfhsdk))<(skjdfh)"\(foo"().
                (dfjksdhf)(dkjf(djfh))bar(dkjhfsdkjfkj)@(kjfhsdkjf)host
                (sdkjfhsdkjf)>(ksjdfhskjfhksdjfhskdjhf)

It is semantically equal to
        Message-Id: <"\(foo"(_dot_)bar(_at_)host>


Philip Guenther

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