Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!CAC.WASHINGTON.EDU!MRC From: MRC@CAC.WASHINGTON.EDU (Mark Crispin) Newsgroups: comp.protocols.tcp-ip Subject: re: Mail/sendmail/RFC822 Question Message-ID: Date: 5 Jul 89 22:14:19 GMT References: <8906291656.AA03318@WLV.IMSD.CONTEL.COM> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 45 In <8906291656.AA03318@WLV.IMSD.CONTEL.COM>, mcc@wlv.imsd.contel.com writes: >This is a question concerning the use of an embedded space within a recipient >name. RFC822 states on page 11 that the following is a legal address construct > "first last"@domain >and I would assume that > "first last"%demesne@domain >is also a valid construct. The problem that I am having is that either Mail >or sendmail complains about an unbalanced quoted string when the above construct >is used and then attempts to deliver the message to > first, last%demesne@domain >which is not the intended action. Is this action a "feature" of the 4.3bsd >Mail or sendmail? You neglected to read the BNF on the final pages of RFC 822. The string first last%demesne is the local-part of an addr-spec in a mailbox. A local part is a sequence of one or more words delimited by "." (the stuff with "." being a word delimiter in this case is a compromise between an ancient and now abandoned syntax in MMDF that used period as the "%-hack" character and those folks who considered period to be an ordinary character in a mailbox). A word is either an atom or a quoted string. So, your string "first last"%demesne violates this rule; it would have to be "first last".%demesne but I seriously doubt if it would have the effect you desire. Sendmail's behavior was bizarre, but typical of Garbage In, Garbage Out compounded with the Unix-ish syntax of space as a mailbox delimiter. What you have to do, therefore, is quote the entire local part if you have any special characters, that is, "first last%demesne" or one of these alternates: \"first\ last\"%demesne "\"first last\"%demesne" if you want the %-hack parser to see explicit quotes. Note that the phrase which preceeds a broketed route-addr is simply a sequence of words, so you could have: "first last"%demesne <"first last%demesne"@domain> -- Mark -- -------