Skip to content

Commit 72bdf0f

Browse files
committed
initialize mailboxes dir
1 parent 2e2cbb9 commit 72bdf0f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

cmdeploy/src/cmdeploy/deployers.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,9 @@ class ChatmailDeployer(Deployer):
463463
("iroh", None, None),
464464
]
465465

466-
def __init__(self, mail_domain):
467-
self.mail_domain = mail_domain
466+
def __init__(self, config):
467+
self.config = config
468+
self.mail_domain = config.mail_domain
468469

469470
def install(self):
470471
files.put(
@@ -502,6 +503,15 @@ def configure(self):
502503
],
503504
)
504505

506+
files.directory(
507+
name=f"Ensure mailboxes directory {self.config.mailboxes_dir} exists",
508+
path=str(self.config.mailboxes_dir),
509+
user="vmail",
510+
group="vmail",
511+
mode="700",
512+
present=True,
513+
)
514+
505515

506516
class FcgiwrapDeployer(Deployer):
507517
def install(self):
@@ -620,7 +630,7 @@ def deploy_chatmail(config_path: Path, disable_mail: bool, website_only: bool) -
620630
tls_deployer = get_tls_deployer(config, mail_domain)
621631

622632
all_deployers = [
623-
ChatmailDeployer(mail_domain),
633+
ChatmailDeployer(config),
624634
LegacyRemoveDeployer(),
625635
FiltermailDeployer(),
626636
JournaldDeployer(),

0 commit comments

Comments
 (0)