Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some notes:

* Single-label domains are problematic in several ways. Traditionally they are used as local abbreviations on the assumption that TLDs can’t be mail domains – tho that’s false, because several ccTLDs have had MX records at one time or another. Still, mail software can vary in whether it might treat single-label domains as abbreviations or TLDs or both. And there’s the historical anomaly that RFC 2821’s syntax disallows single-label domains; this was a drafting mistake not an intentional change.

* Spaces around local parts are valid or not depending on which spec you are following, so question 7 is badly framed. You need to be clear whether you are parsing a mail address as in the SMTP envelope, or an address and display name as in a message header.

* Similarly, comments are not valid in SMTP so the questions about comments are also poorly framed.

* And the syntax of domain literals / address literals is specified by SMTP, so question 16 and 18 are based on not reading enough of the RFCs.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: