Create Cyrus users in alternate namespace

This commit is contained in:
Mario Fetka
2026-07-22 08:55:12 +02:00
parent 6ccd250f50
commit b662a25d51
+4 -1
View File
@@ -222,7 +222,10 @@ def ensure_mailboxes(password: str) -> None:
try:
client.login("testadmin", password)
for username in SOURCE_USERS:
mailbox = f"user.{username}"
# altnamespace uses '/' as the hierarchy delimiter. A literal
# "user.name" would create a shared top-level mailbox and LMTP
# would correctly reject delivery to the intended user.
mailbox = f"user/{username}"
status, _ = client.create(mailbox)
if status not in ("OK", "NO"):
raise RuntimeError(f"could not create Cyrus mailbox {mailbox}")