Tuesday, July 15, 2003

Scripting

I've been trying to discover valid syntax for e-mail address information. A few different formats are used within our scripts and I wanted to find what is valid by the RFC. The most relevant RFC I've found is RFC 1036, which describes how usenet messages are communicated. This document describes standard formats that I've seen in a number of instances, minus one that seems to be in wide use today.

I've decided to note this information for future reference.

Standard for Interchange of USENET Messages
http://www.ietf.org/rfc/rfc1036.txt

Sample
User: John Doe
E-mail Address: jdoe@aaas.org
Valid E-mail Syntax Forms:

(John Doe)
John Doe
"John Doe"

Notes
According to the RFC, cases one and two do not need the angle brackets. Unfortunately, a lot of mail servers return errors if these are not used. The safest choice is to use the angle brackets in all cases.

Case four is not part of the RFC but seems to be a supported standard.