Create Cyrus users in alternate namespace
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user