Pull merge.
[yaffs-website] / vendor / egulias / email-validator / documentation / RFC5321BNF.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3
4 <head>
5 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
6 <title>The BNF from RFC 5321 defining parts of a valid SMTP address</title>
7 </head>
8
9 <body>
10 <pre style="font-size:11px;">
11    Mailbox        = Local-part "@" ( Domain / address-literal )
12
13    Local-part     = Dot-string / Quoted-string
14                   ; MAY be case-sensitive
15
16
17    Dot-string     = Atom *("."  Atom)
18
19    Atom           = 1*atext
20
21    Quoted-string  = DQUOTE *QcontentSMTP DQUOTE
22
23    QcontentSMTP   = qtextSMTP / quoted-pairSMTP
24
25    quoted-pairSMTP  = %d92 %d32-126
26                     ; i.e., backslash followed by any ASCII
27                     ; graphic (including itself) or SPace
28
29    qtextSMTP      = %d32-33 / %d35-91 / %d93-126
30                   ; i.e., within a quoted string, any
31                   ; ASCII graphic or space is permitted
32                   ; without blackslash-quoting except
33                   ; double-quote and the backslash itself.
34
35    Domain         = sub-domain *("." sub-domain)
36
37    sub-domain     = Let-dig [Ldh-str]
38
39    Let-dig        = ALPHA / DIGIT
40
41    Ldh-str        = *( ALPHA / DIGIT / "-" ) Let-dig
42
43    address-literal  = "[" ( IPv4-address-literal /
44                     IPv6-address-literal /
45                     General-address-literal ) "]"
46                     ; See Section 4.1.3
47
48    IPv4-address-literal  = Snum 3("."  Snum)
49
50    IPv6-address-literal  = "IPv6:" IPv6-addr
51
52    General-address-literal  = Standardized-tag ":" 1*dcontent
53
54    Standardized-tag  = Ldh-str
55                      ; Standardized-tag MUST be specified in a
56                      ; Standards-Track RFC and registered with IANA
57
58    dcontent       = %d33-90 / ; Printable US-ASCII
59                   %d94-126 ; excl. "[", "\", "]"
60
61    Snum           = 1*3DIGIT
62                   ; representing a decimal integer
63                   ; value in the range 0 through 255
64
65    IPv6-addr      = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp
66
67    IPv6-hex       = 1*4HEXDIG
68
69    IPv6-full      = IPv6-hex 7(":" IPv6-hex)
70
71    IPv6-comp      = [IPv6-hex *5(":" IPv6-hex)] "::"
72                   [IPv6-hex *5(":" IPv6-hex)]
73                   ; The "::" represents at least 2 16-bit groups of
74                   ; zeros.  No more than 6 groups in addition to the
75                   ; "::" may be present.
76
77    IPv6v4-full    = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal
78
79    IPv6v4-comp    = [IPv6-hex *3(":" IPv6-hex)] "::"
80                   [IPv6-hex *3(":" IPv6-hex) ":"]
81                   IPv4-address-literal
82                   ; The "::" represents at least 2 16-bit groups of
83                   ; zeros.  No more than 4 groups in addition to the
84                   ; "::" and IPv4-address-literal may be present.
85
86 </pre>
87 </body>
88
89 </html>