Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0143543abd | ||
|
|
8419cf3d88 | ||
|
|
9a73cc78d6 |
No files matched your search
@@ -127,7 +127,13 @@ def remove_delivery(mailbox, account, auth_group, modern):
|
||||
and mail.postfix_lookup(mailbox.address, mail.POSTFIX_MAILBOXES)
|
||||
is None
|
||||
):
|
||||
mail.run("doveadm", "kick", mailbox.address)
|
||||
mail.run(
|
||||
"doveadm",
|
||||
"kick",
|
||||
mailbox.address,
|
||||
missing_exit=68,
|
||||
missing_output="no users kicked",
|
||||
)
|
||||
return
|
||||
time.sleep(0.25)
|
||||
raise ValueError("The mail node still resolves the retired recipient.")
|
||||
@@ -146,6 +146,7 @@ def reconcile_routes(records, *, retired=None):
|
||||
return
|
||||
previous = read_table()
|
||||
recipients = managed_recipients(records)
|
||||
pruned = None
|
||||
if retired is not None and retired.domain in routes:
|
||||
spec = routes[retired.domain]
|
||||
if any(
|
||||
@@ -166,6 +167,7 @@ def reconcile_routes(records, *, retired=None):
|
||||
spec = MailRouting(spec.domain, aliases, catchall)
|
||||
else:
|
||||
spec = MailRouting(spec.domain, {})
|
||||
routes[spec.domain] = spec
|
||||
save_policy(spec)
|
||||
routes[spec.domain] = pruned = spec
|
||||
publish_routes(routes, recipients, previous)
|
||||
if pruned is not None:
|
||||
save_policy(pruned)
|
||||
Reference in new issue
Block a user