From 1b16cbcfde10c72105fccaad6327966574dddb4f Mon Sep 17 00:00:00 2001 From: Cantibra Date: Thu, 18 Jun 2026 01:15:18 +0200 Subject: [PATCH] 5 --- .env | 2 +- stalwart/DEBIAN/postinst | 2 +- stalwart/DEBIAN/preinst | 14 ++++++++++++++ stalwart/etc/stalwart/stalwart.env | 17 ++--------------- stalwart/lib/systemd/system/stalwart.service | 2 +- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.env b/.env index cb17ccd..ff7aa77 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ VERSION_CLI='1.0.8' -VERSION_DAEMON='0.16.8' +VERSION_DAEMON='0.16.9' diff --git a/stalwart/DEBIAN/postinst b/stalwart/DEBIAN/postinst index beea4e3..26a1ea6 100644 --- a/stalwart/DEBIAN/postinst +++ b/stalwart/DEBIAN/postinst @@ -26,7 +26,7 @@ case "${1}" in /usr/bin/true fi /usr/bin/chown --quiet --recursive 'stalwart':'root' '/etc/stalwart' - /usr/bin/install --directory --group='stalwart' --mode='750' --owner='root' '/var/lib/stalwart' + /usr/bin/install --directory --group='root' --mode='770' --owner='stalwart' '/var/lib/stalwart' /usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/log/stalwart' /usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/logrotate/stalwart' ;; diff --git a/stalwart/DEBIAN/preinst b/stalwart/DEBIAN/preinst index 0c8da3d..6bfe5a9 100644 --- a/stalwart/DEBIAN/preinst +++ b/stalwart/DEBIAN/preinst @@ -16,5 +16,19 @@ case "${1}" in --disabled-login \ 'stalwart' > '/dev/null' 2>&1 fi + /usr/bin/echo "#########################################################################" + /usr/bin/echo "# #" + /usr/bin/echo "# ! Run this commands as User 'stalwart' and follow the instructios ! #" + /usr/bin/echo "# ! to initialize the Stalwart Mail Server ! #" + /usr/bin/echo "# #" + /usr/bin/echo "# /usr/bin/sudo --user='stalwart' \ #" + /usr/bin/echo "# /usr/sbin/stalwart \ #" + /usr/bin/echo "# --config '/etc/stalwart/config.json' #" + /usr/bin/echo "# #" + /usr/bin/echo "# /bin/chmod '0640' '/etc/stalwart/config.json' #" + /usr/bin/echo "# #" + /usr/bin/echo "# /bin/chgrp 'root' '/etc/stalwart/config.json' #" + /usr/bin/echo "# #" + /usr/bin/echo "######################################################################'##" ;; esac diff --git a/stalwart/etc/stalwart/stalwart.env b/stalwart/etc/stalwart/stalwart.env index ad7a8be..50f0fbf 100644 --- a/stalwart/etc/stalwart/stalwart.env +++ b/stalwart/etc/stalwart/stalwart.env @@ -1,12 +1,11 @@ # Environment variables for the Stalwart service. -# Uncomment and edit an entry to override its default. # Override the hostname used in HTTP responses -STALWART_HOSTNAME=mail.example.com +STALWART_HOSTNAME=mx.example.com # Override the public base URL published in OAuth, OIDC, and JMAP discovery # documents. Accepts scheme, host, optional port, and optional path prefix. -STALWART_PUBLIC_URL=https://mail.example.com +STALWART_PUBLIC_URL=https://mx.example.com # Enable bootstrap / recovery mode on startup. Accepted: 1, true. Default: false. STALWART_RECOVERY_MODE=false @@ -16,15 +15,3 @@ STALWART_RECOVERY_MODE_LOG_LEVEL=info # HTTP port used in recovery mode. Default: 8080. STALWART_RECOVERY_MODE_PORT=8080 - -# Fixed administrator credentials — format: username:password -# Default: a temporary random password is generated and printed to the logs. -#STALWART_RECOVERY_ADMIN=admin:changeme - -# Cluster role assigned to this node. Must match a role name defined in the -# cluster registry. Leave unset for a standalone (non-clustered) deployment. -STALWART_ROLE=standalone - -# Push-notification shard this node is responsible for, when running in a -# cluster. -STALWART_PUSH_SHARD=0 \ No newline at end of file diff --git a/stalwart/lib/systemd/system/stalwart.service b/stalwart/lib/systemd/system/stalwart.service index 4cba1e4..a5d4128 100644 --- a/stalwart/lib/systemd/system/stalwart.service +++ b/stalwart/lib/systemd/system/stalwart.service @@ -1,6 +1,6 @@ [Unit] Description=Stalwart Mail & Collaboration Server -ConditionPathExists=/etc/stalwart.toml +ConditionPathExists=/etc/stalwart/config.json StartLimitBurst=3 StartLimitIntervalSec=60 Conflicts=postfix.service sendmail.service exim4.service