The future is coming ready-or-not

DNS resolution in python?

leave a comment »

I have to send a lot of mails to customers out over the next few weeks telling them about changes to our shared hosting platform. Obviously, I’m writing a script to handle the heavy working for me. Previously, I’ve been using a smarthost but it means I don’t get a lot of the errors. I thought I’d change to resolving the MX record for each domain myself and then e-mailing the customers SMTP mailserver directly. First thing I’ve run into is that Python doesn’t seem to have a DNS resolver built in as a standard module. I found the ADNS module but it doesn’t have very good documentation – shouldn’t moan but I wish module writers would do decent documentation!  At the moment it’s not clear how you’re supposed to handle failures or how you get exceptions.


Written by Steve George

October 31, 2005 at 18:36

Posted in Python, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: