dpk@Brl-Tgr.ARPA (Doug Kingston) (05/15/84)
The MMDF parser does indeed enforce the restriction that there be at least one atom before a route-addre specification. If you don't require this, you are asking for trouble when the mail leaves your host. It may be silly, but its in the spec, Sigh. Cheers, -Doug- PS. When you get your parser done, I'd love to see it....
v.wales@UCLA-LOCUS.ARPA (Rich Wales) (05/16/84)
Joe -- I agree with you that requiring a "phrase" token before a "route-addr" makes no sense. This was almost certainly an oversight in the specifi- cation. However, the fact remains that this is the way the standard was written, and some mail systems (such as MMDF, apparently) do demand that this part of the standard be obeyed strictly. At this stage of the game, I'm afraid that no amount of protest is going to result in any changes to RFC822, however trivial they may seem (I know -- I've tried). Given this reality, I would suggest the following course of action: (1) When analyzing the headers in incoming mail, if you see an address consisting of a "route-addr" without a preceding "phrase", go ahead and accept it. Some people, I know, may protest that the only way to enforce compliance with the standard is to adamantly complain about any and all violations; I choose not to take such a stand. (2) When processing outgoing mail, if you see an address consisting of a "route-addr" without a preceding "phrase": (a) If the address is not a "source route" of the form <@A:B@C>, simply strip off the angle brackets; they are unnecessary. (b) If the address is a "source route", then you really should add something in front of the address; for lack of anything better, I would suggest copying the "local-part" of the address. That is, an address like <@UCLA-LOCUS.ARPA:wales@UCLA-CS.ARPA> would become wales <@UCLA-LOCUS.ARPA:wales@UCLA-CS.ARPA> While you're at it, by the way, I would suggest a similar approach to the question of "phrase"s with periods in them. That is, an address like Richard B. Wales <wales@UCLA-LOCUS.ARPA> violates the standard because of the period after the initial. This restriction has a little bit more to say in its favor (it seems that allowing the period would complicate the parser and/or the lexer), but enough hosts still generate such constructions -- whether out of lazi- ness, rebellion, or lack of time, I will not venture a guess -- that it is reasonable to recognize and accept them on incoming mail if possible. (The appropriate action in the case of outgoing mail is to put double quotes around the "phrase".) -- Rich <wales@UCLA-LOCUS.ARPA>