diff --git a/CHANGELOG.md b/CHANGELOG.md index e4448bd5..6912069d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## untagged +- Run chatmail-metadata and doveauth as vmail + ([#261](https://github.com/deltachat/chatmail/pull/261)) + - Apply systemd restrictions to echobot ([#259](https://github.com/deltachat/chatmail/pull/259)) diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 92750f3b..cae7885f 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -478,6 +478,11 @@ def deploy_chatmail(config_path: Path) -> None: system=True, ) + server.shell( + name="Fix file owner in /home/vmail", + commands=["test -d /home/vmail && chown -R vmail:vmail /home/vmail"], + ) + apt.update(name="apt update", cache_time=24 * 3600) apt.packages( diff --git a/cmdeploy/src/cmdeploy/service/chatmail-metadata.service.f b/cmdeploy/src/cmdeploy/service/chatmail-metadata.service.f index 6d4bb9a1..419dd09d 100644 --- a/cmdeploy/src/cmdeploy/service/chatmail-metadata.service.f +++ b/cmdeploy/src/cmdeploy/service/chatmail-metadata.service.f @@ -5,6 +5,7 @@ Description=Chatmail dict proxy for IMAP METADATA ExecStart={execpath} /run/dovecot/metadata.socket vmail /home/vmail/mail/{mail_domain} Restart=always RestartSec=30 +User=vmail [Install] WantedBy=multi-user.target diff --git a/cmdeploy/src/cmdeploy/service/doveauth.service.f b/cmdeploy/src/cmdeploy/service/doveauth.service.f index c61e62eb..a43b3c27 100644 --- a/cmdeploy/src/cmdeploy/service/doveauth.service.f +++ b/cmdeploy/src/cmdeploy/service/doveauth.service.f @@ -5,6 +5,7 @@ Description=Chatmail dict authentication proxy for dovecot ExecStart={execpath} /run/dovecot/doveauth.socket vmail /home/vmail/passdb.sqlite {config_path} Restart=always RestartSec=30 +User=vmail [Install] WantedBy=multi-user.target