Is root@[127.1]
a syntactically valid e-mail address?
Why? Why not?
You need to check RFC 5322, section 3.4.1.
This specification is a revision of Request For Comments (RFC) 2822, which itself superseded Request For Comments (RFC) 822, "Standard for the Format of ARPA Internet Text Messages", updating it to reflect current practice and incorporating incremental changes that were specified in other RFCs.
I run your email address though http://isemail.info/ that gave the following info:
The general result is: The address is only valid according to the broad definition of RFC 5322. It is otherwise invalid.
The specific diagnosis is: The domain literal is not a valid RFC 5321 address literal
Here is the relevant passage from the email RFCs:
domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS]
(RFC 5322 section 3.4.1)
It depends on whether you mean addresses in the header (RFC 5322) or envelope addresses (RFC 5321), and in the latter case, whether you include <>, everything between <> (i.e. the source route), or just Mailbox.
It's valid according to RFC 5322, but RFC 5322 allows loads of fun things like comments! and unicorns! and cake! and ponies!. It's just about possible to parse them using Perl's "regular" expressions: Mail::RFC822::Address.
It's syntactically invalid according to RFC 5321 Section 4.1.3 since the grammar only allows address literals of the form 1.2.3.4 or with a prefix of the form "standard-tag:" (e.g. [IPv6:::1]
). I've assumed you meant "Mailbox", i.e. everything between <> but not including the source route.
I'd use the latter definition, since an e-mail address isn't much good if my SMTP server won't accept it. (Yes, this is a bit of a horrible definition, but I don't think the internet will move away from SMTP any time soon.)
(Additionally, there's RFC 5336 a.k.a. "UTF8SMTP". I'm not aware of anyone who uses this.)
No, RFC2822 allows IP addresses to be used as domain, but you must use a valid IP address.
Your example should be root@[127.0.0.1]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With