Loading ...
Sorry, an error occurred while loading the content.
 

Re: Recipient Address local part starting with - (hyphen) - illegal address?

Expand Messages
  • Wietse Venema
    ... You may be surprised by the difference between what the RFC allows and what works in the real world. For example, RFC 5321 defines a mailbox as: Mailbox
    Message 1 of 4 , Sep 26, 2012
      Harakiri:
      > Now can anyone point me to the part in the RFC that prohibits the
      > "-" at the start of the local part?

      You may be surprised by the difference between what the RFC allows
      and what works in the real world. For example, RFC 5321 defines a
      mailbox as:

      Mailbox = Local-part "@" ( Domain / address-literal )

      Local-part = Dot-string / Quoted-string
      ; MAY be case-sensitive

      Dot-string = Atom *("." Atom)

      Atom = 1*atext

      With atext defined in RFC5322 as:

      atext = ALPHA / DIGIT / ; Printable US-ASCII
      "!" / "#" / ; characters not including
      "$" / "%" / ; specials. Used for atoms.
      "&" / "'" /
      "*" / "+" /
      "-" / "/" /
      "=" / "?" /
      "^" / "_" /
      "`" / "{" /
      "|" / "}" /
      "~"

      Although the RFC allows this, no-one in their right mind would use
      a local-part that contains "!" or "@" or "'" (or most of the other
      non-alpha/non-digit characters above). Postfix adds to this the
      requirement that the local-part not start with '-' because it is a
      security hole in shell commands.

      Wietse
    Your message has been successfully submitted and would be delivered to recipients shortly.