Verify an e-mail-adress - syntax and dns

Tim Williams tim at tdw.net
Sun Sep 24 10:55:20 EDT 2006


On 24/09/06, Ingo Linkweiler <ingo.bear_NOSPAM at freenet.de> wrote:
> Has anyone a function/script to verify an e-mail-address?
>
> It should:
> a) check the syntax
> b) verify an existing mailserver or DNS/MX records
>

b) is problematical.

A domain with MX records may not really have a mail server at all.

Under RFC's,  if  no MX records exist the A record returned for the
mail-domain (the bit after the @ ) should be used as the MX record.

So to check b)  you must not rely on DNS records,  you need to
physically connect to the domain's mailserver(s).

HTH :)



More information about the Python-list mailing list