Fix: Allow contacts created with a domain to be delivered even if the domain cannot be used any more for contact creation (#1704)

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
This commit is contained in:
Adrià Casajús 2023-04-21 21:07:58 +02:00 committed by GitHub
parent 59c189957f
commit 52e6f5e2d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1024,7 +1024,7 @@ def handle_reply(envelope, msg: Message, rcpt_to: str) -> (bool, str):
# reply_email must end with EMAIL_DOMAIN or a domain that can be used as reverse alias domain
if not reply_email.endswith(EMAIL_DOMAIN):
sl_domain: SLDomain = SLDomain.get_by(domain=reply_domain)
if sl_domain is None or not sl_domain.use_as_reverse_alias:
if sl_domain is None:
LOG.w(f"Reply email {reply_email} has wrong domain")
return False, status.E501