3 ms·
> ...@(valid)example.org(honest) Are those parens really permitted in the host name? I'm looking at RFC 3696. > 3. Restrictions on email addresses > .... T
by tedmiston 10y ago
> ...@(valid)example.org(honest)
Are those parens really permitted in the host name? I'm looking at RFC 3696.
> 3. Restrictions on email addresses
> .... The syntax of the domain part corresponds to that in the previous section.
and
> 2. Restrictions on domain (DNS) names
> Any characters, or combination of bits (as octets), are permitted in DNS names. However, there is a preferred form that is required by most applications. This preferred form has been the only one permitted in the names of top-level domains, or TLDs. .... The LDH rule, as updated, provides that the labels (words or strings separated by periods) that make up a domain name must consist of only the ASCII [ASCII] alphabetic and numeric characters, plus the hyphen. No other symbols or punctuation characters are permitted, nor is blank space.
https://tools.ietf.org/html/rfc3696#section-2 https://tools.ietf.org/html/rfc3696#section-2
- wtbob 10y ago> > ...@(valid)example.org(honest) > Are those parens really permitted in the host name? I'm looking at RFC 3696. RFC5322 states that an addr-spec consists of a local-part, followed by @, followed by a domain. It states that a domain may be a domain-literal; a domain-literal may begin and end with commented folding whitespace (CFWS). It's all in https://tools.ietf.org/html/rfc5322#section-3.4.1 https://tools.ietf.org/html/rfc5322#section-3.4.1 It's only the dtext portion of the domain-literal which must consist of printable ASCII characters, not including [, ] or \. Yes, foo@bar!baz!quux is a valid RFC5322 email address (decimal 33, i.e. !) is allowed, per the dtext production of the spec) — and so is foo@(comment (nested comment (escaped \(comment)))bar!baz!quux(another (comment (to prove) the point)) Whether one should ever actually use such an address is, of course, another matter entirely.
- tedmiston 10y agoThank you for that; this has been eyeopening. The possibility of having a valid email address where the second-level domain component can't actually be registered as a domain, to the best of my understanding, eg "bar!.com", is interesting.
- wtbob 10y ago> The possibility of having a valid email address where the second-level domain component can't actually be registered as a domain, to the best of my understanding, eg "bar!.com", is interesting. It is! Conceivably, it could be used to implement a new kind of domain-less mail system, e.g. foo@$megamail or something.