diff --git a/cmdeploy/src/cmdeploy/deployers.py b/cmdeploy/src/cmdeploy/deployers.py index 2b809dda..a11e4561 100644 --- a/cmdeploy/src/cmdeploy/deployers.py +++ b/cmdeploy/src/cmdeploy/deployers.py @@ -463,8 +463,9 @@ class ChatmailDeployer(Deployer): ("iroh", None, None), ] - def __init__(self, mail_domain): - self.mail_domain = mail_domain + def __init__(self, config): + self.config = config + self.mail_domain = config.mail_domain def install(self): files.put( @@ -513,6 +514,15 @@ class ChatmailDeployer(Deployer): ], ) + files.directory( + name=f"Ensure mailboxes directory {self.config.mailboxes_dir} exists", + path=str(self.config.mailboxes_dir), + user="vmail", + group="vmail", + mode="700", + present=True, + ) + class FcgiwrapDeployer(Deployer): def install(self): @@ -631,7 +641,7 @@ def deploy_chatmail(config_path: Path, disable_mail: bool, website_only: bool) - tls_deployer = get_tls_deployer(config, mail_domain) all_deployers = [ - ChatmailDeployer(mail_domain), + ChatmailDeployer(config), LegacyRemoveDeployer(), FiltermailDeployer(), JournaldDeployer(),