finding the mail server of a domain

Gillou nospam at bigfoot.com
Wed Oct 2 07:21:15 EDT 2002


Many thanks Gerhard,

You're right, I tested on some SMTP servers that don't reply to "VRFY"
commands as expected. At least, I can check if the mail domain is valid.

Cheers

--Gilles

mailto:gilles at pilotsystems.net
"Gerhard Häring" <gerhard.haering at gmx.de> a écrit dans le message de news:
slrnapjve6.2mm.gerhard.haering at lilith.my-fqdn.de...
> Gillou wrote in comp.lang.python:
> > Hi pythonistas,
> >
> > I'm looking for a pythonic way to find the hostname/IP of the mail
server
> > for a given domain. (that's not for spamming :) but to check the members
> > database of a customer).
> >
> > Any hint ?
>
> Using http://pydns.sourceforge.net/
>
> >>> import DNS
> >>> DNS.ParseResolvConf()
> >>> print DNS.mxlookup("nerim.net")
> [(10, 'brinstar.nerim.net'), (20, 'metroid.nerim.net'), (30,
> 'aline.noc.nerim.net')]
>
> If you want to use this to check for valid email adresses, forget it.
> Any properly configured SMTP server won't return useful data (because
> of spammers).
>
> -- Gerhard





More information about the Python-list mailing list