add more logging in email_domain_can_be_used_as_mailbox

This commit is contained in:
Son NK 2020-06-14 12:00:02 +02:00
parent 84381e9635
commit 4906d3a4a8
1 changed files with 2 additions and 0 deletions

View File

@ -351,6 +351,7 @@ def email_domain_can_be_used_as_mailbox(email: str) -> bool:
from app.models import CustomDomain
if CustomDomain.get_by(domain=domain, verified=True):
LOG.d("domain %s is a SimpleLogin custom domain", domain)
return False
if is_disposable_domain(domain):
@ -362,6 +363,7 @@ def email_domain_can_be_used_as_mailbox(email: str) -> bool:
# if no MX record, email is not valid
if not mx_domains:
LOG.d("No MX record for domain %s", domain)
return False
for mx_domain in mx_domains: