[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] double-quotes in local part



On Tue, 8 May 2012, Martin Lambers wrote:

To: "localpart."@domain

Is that really valid? Can you point to to some standard that allows this?

It looks odd, but I think RFC5322 (and RFC2822) allows this. Moreover, if I understand correctly, it not just allows, but specifies that it has to be double-quoted (because it ends with a dot).

Chapter 3.4 says that an address can be an addr-spec:

  address = mailbox / group
  mailbox = name-addr / addr-spec

Chapter 3.4.1 defines addr-spec as:

  addr-spec = local-part "@" domain
  local-part = dot-atom / quoted-string / obs-local-part
  dot-atom = [CFWS] dot-atom-text [CFWS]
  dot-atom-text = 1*atext *("." 1*atext)
  quoted-string = [CFWS]
                  DQUOTE *([FWS] qcontent) [FWS] DQUOTE
                  [CFWS]

In our case local-part is not a dot-atom, but a quoted-string.

RFC5321 (and RFC2821) says similarly:

  Mailbox = Local-part "@" ( Domain / address-literal )
  Local-part = Dot-string / Quoted-string
  Dot-string = Atom *("." Atom)
  Quoted-string  = DQUOTE *QcontentSMTP DQUOTE

Istvan