not disable alias if ALIAS_AUTOMATIC_DISABLE is not set
This commit is contained in:
parent
de3207ac4b
commit
8b676bc4af
|
@ -47,6 +47,7 @@ from app.config import (
|
|||
ALERT_SPF,
|
||||
POSTFIX_PORT_FORWARD,
|
||||
TEMP_DIR,
|
||||
ALIAS_AUTOMATIC_DISABLE,
|
||||
)
|
||||
from app.dns_utils import get_mx_domains
|
||||
from app.extensions import db
|
||||
|
@ -1022,6 +1023,9 @@ def should_disable(alias: Alias) -> bool:
|
|||
LOG.w("%s cannot be disabled", alias)
|
||||
return False
|
||||
|
||||
if not ALIAS_AUTOMATIC_DISABLE:
|
||||
return False
|
||||
|
||||
yesterday = arrow.now().shift(days=-1)
|
||||
nb_bounced_last_24h = (
|
||||
db.session.query(EmailLog)
|
||||
|
|
|
@ -49,4 +49,6 @@ GOOGLE_CLIENT_SECRET=to_fill
|
|||
FACEBOOK_CLIENT_ID=to_fill
|
||||
FACEBOOK_CLIENT_SECRET=to_fill
|
||||
|
||||
PGP_SENDER_PRIVATE_KEY_PATH=local_data/private-pgp.asc
|
||||
PGP_SENDER_PRIVATE_KEY_PATH=local_data/private-pgp.asc
|
||||
|
||||
ALIAS_AUTOMATIC_DISABLE=true
|
Loading…
Reference in New Issue