From cd553608a59e09c987f9139f48a801814c206b2c Mon Sep 17 00:00:00 2001 From: Son Date: Tue, 23 Nov 2021 14:35:37 +0100 Subject: [PATCH] fix --- app/dashboard/views/domain_detail.py | 2 +- cron.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dashboard/views/domain_detail.py b/app/dashboard/views/domain_detail.py index b5443359..6f47923f 100644 --- a/app/dashboard/views/domain_detail.py +++ b/app/dashboard/views/domain_detail.py @@ -78,7 +78,7 @@ def domain_detail_dns(custom_domain_id): elif request.form.get("form-name") == "check-mx": mx_domains = get_mx_domains(custom_domain.domain) - if is_mx_equivalent(mx_domains, EMAIL_SERVERS_WITH_PRIORITY): + if not is_mx_equivalent(mx_domains, EMAIL_SERVERS_WITH_PRIORITY): flash("The MX record is not correctly set", "warning") mx_ok = False diff --git a/cron.py b/cron.py index 4e986f00..e25d95e3 100644 --- a/cron.py +++ b/cron.py @@ -695,7 +695,7 @@ def check_custom_domain(): for custom_domain in CustomDomain.filter_by(verified=True): # type: CustomDomain mx_domains = get_mx_domains(custom_domain.domain) - if is_mx_equivalent(mx_domains, EMAIL_SERVERS_WITH_PRIORITY): + if not is_mx_equivalent(mx_domains, EMAIL_SERVERS_WITH_PRIORITY): user = custom_domain.user LOG.w( "The MX record is not correctly set for %s %s %s",