add IPv6 support to mx check

- add support for looking up IPv6 addresses (socket.getaddrinfo)
- add support for International Domain Names in case the DNS reponse contains one, to_unicode() decodes them to a utf8 string
- add logging for potential configuration errors:
    - DNS configuration errors (i.e. no MX records)
    - server name resolution errors (i.e. resolv.conf doesn't contain a working name server)
    - invalid values in MX records
- when looking up an ip address, don't stop on the first failure check all addresses
- update mock results for tests, return a real MX record for mock dns queries
This commit is contained in:
Andrew Fyfe
2018-01-04 21:52:02 +00:00
parent 2c4fefca02
commit 042d0a8501
8 changed files with 210 additions and 61 deletions
+1
View File
@@ -237,6 +237,7 @@ CKEDITOR_CONFIGS = {
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'syslog': {
'format': '%(name)s: %(levelname)s %(message)s'