mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
On domain check fail, update database
This commit is contained in:
parent
405c5f8a69
commit
c7530947d3
@ -37,6 +37,8 @@ def domain_detail_dns(custom_domain_id):
|
|||||||
|
|
||||||
if sorted(mx_domains) != sorted(EMAIL_SERVERS_WITH_PRIORITY):
|
if sorted(mx_domains) != sorted(EMAIL_SERVERS_WITH_PRIORITY):
|
||||||
flash("The MX record is not correctly set", "warning")
|
flash("The MX record is not correctly set", "warning")
|
||||||
|
custom_domain.verified = False
|
||||||
|
db.session.commit()
|
||||||
mx_ok = False
|
mx_ok = False
|
||||||
# build mx_errors to show to user
|
# build mx_errors to show to user
|
||||||
mx_errors = [
|
mx_errors = [
|
||||||
@ -66,6 +68,8 @@ def domain_detail_dns(custom_domain_id):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
custom_domain.spf_verified = False
|
||||||
|
db.session.commit()
|
||||||
flash(
|
flash(
|
||||||
f"SPF: {EMAIL_DOMAIN} is not included in your SPF record.",
|
f"SPF: {EMAIL_DOMAIN} is not included in your SPF record.",
|
||||||
"warning",
|
"warning",
|
||||||
@ -86,6 +90,8 @@ def domain_detail_dns(custom_domain_id):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
custom_domain.dkim_verified = False
|
||||||
|
db.session.commit()
|
||||||
flash("DKIM: the CNAME record is not correctly set", "warning")
|
flash("DKIM: the CNAME record is not correctly set", "warning")
|
||||||
dkim_ok = False
|
dkim_ok = False
|
||||||
dkim_errors = [dkim_record or "[Empty]"]
|
dkim_errors = [dkim_record or "[Empty]"]
|
||||||
@ -102,6 +108,8 @@ def domain_detail_dns(custom_domain_id):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
custom_domain.dmarc_verified = False
|
||||||
|
db.session.commit()
|
||||||
flash(
|
flash(
|
||||||
f"DMARC: The TXT record is not correctly set", "warning",
|
f"DMARC: The TXT record is not correctly set", "warning",
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user