ietf-smtp
[Top] [All Lists]

domain name definition in RFC2821

2006-04-21 22:15:09
There appears to be some disconnect between ABNF syntax and a prose. I.e. it 
appears that ABNF requires at least 2 sub-domain parts, while prose discusses 
"one or more dot-separated components". Which one is "more correct" and any 
scenario when a single-component domain name can be valid / useful in modern 
SMTP?

Thanks,
Yuri Inglikov

RFC2821:

      Domain = (sub-domain 1*("." sub-domain)) / address-literal
      sub-domain = Let-dig [Ldh-str]

It appears that BNF syntax in RFC2821 requires at least 2 sub-domain parts. On 
the other hand the prose in the same RFC2821 discusses "one or more" 
dot-separated parts:

2.3.5 Domain

   A domain (or domain name) consists of one or more dot-separated
   components.  These components ("labels" in DNS terminology [22]) are
   restricted for SMTP purposes to consist of a sequence of letters,
   digits, and hyphens drawn from the ASCII character set [1].  Domain
   names are used as names of hosts and of other entities in the domain
   name hierarchy.  For example, a domain may refer to an alias (label
   of a CNAME RR) or the label of Mail eXchanger records to be used to
   deliver mail instead of representing a host name.  See [22] and
   section 5 of this specification.

All other RFC's I checked appear to allow single-component domain names.
<Prev in Thread] Current Thread [Next in Thread>