This commit is contained in:
Son 2022-01-03 10:06:56 +01:00
parent 85fb859dcb
commit f548e74e77
1 changed files with 35 additions and 33 deletions

View File

@ -709,8 +709,11 @@ def check_custom_domain():
LOG.d("Check verified domain for DNS issues")
for custom_domain in CustomDomain.filter_by(verified=True): # type: CustomDomain
mx_domains = get_mx_domains(custom_domain.domain)
check_single_custom_domain(custom_domain)
def check_single_custom_domain(custom_domain):
mx_domains = get_mx_domains(custom_domain.domain)
if not is_mx_equivalent(mx_domains, EMAIL_SERVERS_WITH_PRIORITY):
user = custom_domain.user
LOG.w(
@ -745,7 +748,6 @@ def check_custom_domain():
else:
# reset checks
custom_domain.nb_failed_checks = 0
Session.commit()