Validating EMailAdresses for syntactical correctness

Erno Kuusela erno-news at erno.iki.fi
Fri Jan 25 09:01:16 EST 2002


In article <mailman.1011896959.22291.python-list at python.org>, "Mark
McEahern" <marklists at mceahern.com> writes:

| I remember seeing an approach that explicitly
| provided different levels of strictness.  Something like this:

| Level 1:  Just make sure you have something at something

| Level 2:  Make sure you have something at something.something

"user at com." is (syntactically) valid too, i think.

| Level 3:  Make sure the tld is valid.

| Level 4:  Make sure the domain is valid (whois, ping, etc)

it can be hard to keep track of all the whois servers for all tld's.

| Level 5:  Make sure the address itself is valid (resolve the mx record and
| test the address via smtp).

transient network problems can bite you here (also applies to 4).

  -- erno




More information about the Python-list mailing list