mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-29 06:38:47 +01:00
Added option to disable IPV6 mx checks
This commit is contained in:
@@ -5,6 +5,7 @@ import ipaddress
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from modoboa.admin import lib as admin_lib
|
||||
from modoboa.parameters import tools as param_tools
|
||||
|
||||
from . import constants
|
||||
|
||||
@@ -43,7 +44,10 @@ def get_dmarc_record(domain):
|
||||
|
||||
def _get_simple_record(name):
|
||||
"""We just want to know if name is declared."""
|
||||
for rdtype in ["A", "CNAME", "AAAA"]:
|
||||
rtypes = ["A", "CNAME"]
|
||||
if param_tools.get_global_parameter("enable_IPV6_checks", app="admin"):
|
||||
rtypes.append("AAAA")
|
||||
for rdtype in rtypes:
|
||||
records = admin_lib.get_dns_records(name, rdtype)
|
||||
if records is not None:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user