|
||||
|
Made a change today to my python firewall reporting application due to the problems Verizon has experienced in the evening with DNS. Their problems caused smtplib and ftputil to fail because domain names were not being resolved even after repeated retries. After tracing the transactions I discovered that there were repeated attempts to do IPv6 DNS queries (class AAAA). There were only a few attempts to do classic IPv4, class A, DNS queries. Those IPv6 queries were wasted time, effort and retries. In order to generate only IPv4 queries, the application now does something similar to the following snippet. I simply pass a string of the resolved ip address into smtplib and ftputil. from socket import gethostbyname addr = gethostbyname('snafu.verizon.net') smtp_srv = smtplib.SMTP( host=addr, port=25) The documentation for socket states that the use of gethostbyname() is not compatible with IPv6 going forward. In this case I am grateful for a way to step around the IPv6 future until my ISP is ready for it. |
||||
|
|
