Browse Source

do not automatically disable alias if it cannot be disabled

Son NK 5 years ago
parent
commit
c8c06aa10e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      email_handler.py

+ 4 - 1
email_handler.py

@@ -809,7 +809,10 @@ def handle_bounce(contact: Contact, alias: Alias, msg: Message, user: User):
             address,
             contact.website_email,
         )
-        alias.enabled = False
+        if alias.cannot_be_disabled:
+            LOG.warning("%s cannot be disabled", alias)
+        else:
+            alias.enabled = False
         db.session.commit()
 
         send_email_with_rate_control(