mirror of
https://github.com/simple-login/app.git
synced 2025-11-03 04:12:20 +08:00
Do not send custom domain errors to disabled users
This commit is contained in:
parent
2871cf2a94
commit
68fd7bd7cc
1 changed files with 5 additions and 1 deletions
6
cron.py
6
cron.py
|
|
@ -929,7 +929,9 @@ def check_custom_domain():
|
|||
|
||||
LOG.d("Check verified domain for DNS issues")
|
||||
|
||||
for custom_domain in CustomDomain.filter_by(verified=True): # type: CustomDomain
|
||||
for custom_domain in (
|
||||
CustomDomain.filter_by(verified=True).enable_eagerloads(False).yield_per(100)
|
||||
): # type: CustomDomain
|
||||
try:
|
||||
check_single_custom_domain(custom_domain)
|
||||
except ObjectDeletedError:
|
||||
|
|
@ -937,6 +939,8 @@ def check_custom_domain():
|
|||
|
||||
|
||||
def check_single_custom_domain(custom_domain: CustomDomain):
|
||||
if custom_domain.user.disabled:
|
||||
return
|
||||
mx_domains = get_mx_domains(custom_domain.domain)
|
||||
validator = CustomDomainValidation(
|
||||
dkim_domain=config.EMAIL_DOMAIN,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue