Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c541830a49 | |||
| 9a6feb3990 | |||
| 3fde1e23ba | |||
| 294219d16c | |||
| d0d3cbc758 |
@@ -1,2 +1,2 @@
|
|||||||
VERSION_CLI='1.0.6'
|
VERSION_CLI='1.0.8'
|
||||||
VERSION_DAEMON='0.16.5'
|
VERSION_DAEMON='0.16.8'
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
/usr/bin/chmod --verbose '0755' './stalwart/DEBIAN/preinst'
|
/usr/bin/chmod --verbose '0755' './stalwart/DEBIAN/preinst'
|
||||||
/usr/bin/chmod --verbose '0755' './stalwart/DEBIAN/prerm'
|
/usr/bin/chmod --verbose '0755' './stalwart/DEBIAN/prerm'
|
||||||
/usr/bin/chmod --verbose '0755' './stalwart/etc/init.d/stalwart'
|
/usr/bin/chmod --verbose '0755' './stalwart/etc/init.d/stalwart'
|
||||||
/usr/bin/chmod --verbose '0640' './stalwart/etc/stalwart.toml'
|
/usr/bin/chmod --verbose '0640' './stalwart/etc/stalwart/stalwart.env'
|
||||||
/usr/bin/install --directory --verbose './stalwart/usr/bin'
|
/usr/bin/install --directory --verbose './stalwart/usr/bin'
|
||||||
/usr/bin/mv --verbose './sources/stalwart-cli-${{ matrix.binary }}-unknown-linux-gnu/stalwart-cli' './stalwart/usr/bin/stalwart-cli'
|
/usr/bin/mv --verbose './sources/stalwart-cli-${{ matrix.binary }}-unknown-linux-gnu/stalwart-cli' './stalwart/usr/bin/stalwart-cli'
|
||||||
/usr/bin/chmod --verbose '0755' './stalwart/usr/bin/stalwart-cli'
|
/usr/bin/chmod --verbose '0755' './stalwart/usr/bin/stalwart-cli'
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
/etc/stalwart.toml
|
/etc/stalwart/stalwart.env
|
||||||
|
|||||||
@@ -25,31 +25,9 @@ case "${1}" in
|
|||||||
/usr/sbin/update-rc.d 'stalwart' defaults > '/dev/null' 2>&1 || \
|
/usr/sbin/update-rc.d 'stalwart' defaults > '/dev/null' 2>&1 || \
|
||||||
/usr/bin/true
|
/usr/bin/true
|
||||||
fi
|
fi
|
||||||
/usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/lib/stalwart'
|
/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='stalwart' --mode='750' --owner='stalwart' '/var/log/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'
|
/usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/logrotate/stalwart'
|
||||||
if ! /usr/bin/grep --quiet "secret =" '/etc/stalwart.toml'; then
|
|
||||||
PASSWORD=$(/usr/bin/openssl rand -base64 '18')
|
|
||||||
PASSWORD_SHA512=$(/usr/bin/echo "${PASSWORD}" | /usr/bin/openssl passwd -noverify -stdin -quiet -6)
|
|
||||||
/usr/bin/echo "secret = \"${PASSWORD_SHA512}\"" >> '/etc/stalwart.toml'
|
|
||||||
/usr/bin/chown 'stalwart' '/etc/stalwart.toml'
|
|
||||||
/usr/bin/echo '##'
|
|
||||||
/usr/bin/echo '##'
|
|
||||||
/usr/bin/echo '## User: root '
|
|
||||||
/usr/bin/echo "## Password: ${PASSWORD}"
|
|
||||||
/usr/bin/echo '##'
|
|
||||||
/usr/bin/echo '##'
|
|
||||||
fi
|
|
||||||
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
|
|
||||||
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
|
|
||||||
/usr/bin/true
|
|
||||||
if [ -n "${2}" ]; then
|
|
||||||
_dh_action='restart'
|
|
||||||
else
|
|
||||||
_dh_action='start'
|
|
||||||
fi
|
|
||||||
/usr/bin/deb-systemd-invoke "${_dh_action}" 'stalwart.service' > '/dev/null' 2>&1 || \
|
|
||||||
/usr/bin/true
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -22,14 +22,19 @@ GROUP='stalwart'
|
|||||||
PIDFOLDER="/run/${NAME}"
|
PIDFOLDER="/run/${NAME}"
|
||||||
PIDFILE="${PIDFOLDER}/${NAME}.pid"
|
PIDFILE="${PIDFOLDER}/${NAME}.pid"
|
||||||
DAEMON='/usr/sbin/stalwart'
|
DAEMON='/usr/sbin/stalwart'
|
||||||
DAEMON_CONFIG='/etc/stalwart.toml'
|
DAEMON_CONFIG='/etc/stalwart/config.json'
|
||||||
DAEMON_OPTS="--config ${DAEMON_CONFIG}"
|
DAEMON_OPTS="--config ${DAEMON_CONFIG}"
|
||||||
|
ENVIRONMENT='/etc/stalwart/stalwart.env'
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
[ -f "${DAEMON_CONFIG}" ]
|
[ -f "${DAEMON_CONFIG}" ]
|
||||||
|
[ -f "${ENVIRONMENT}" ]
|
||||||
|
|
||||||
. '/lib/lsb/init-functions'
|
. '/lib/lsb/init-functions'
|
||||||
|
set -a
|
||||||
|
. "${ENVIRONMENT}"
|
||||||
|
set +a
|
||||||
|
|
||||||
[ -x "${DAEMON}" ]
|
[ -x "${DAEMON}" ]
|
||||||
|
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
[server.listener.smtp]
|
|
||||||
bind = "[::]:25"
|
|
||||||
protocol = "smtp"
|
|
||||||
|
|
||||||
[server.listener.submission]
|
|
||||||
bind = "[::]:587"
|
|
||||||
protocol = "smtp"
|
|
||||||
|
|
||||||
[server.listener.submissions]
|
|
||||||
bind = "[::]:465"
|
|
||||||
protocol = "smtp"
|
|
||||||
tls.implicit = true
|
|
||||||
|
|
||||||
[server.listener.imap]
|
|
||||||
bind = "[::]:143"
|
|
||||||
protocol = "imap"
|
|
||||||
|
|
||||||
[server.listener.imaptls]
|
|
||||||
bind = "[::]:993"
|
|
||||||
protocol = "imap"
|
|
||||||
tls.implicit = true
|
|
||||||
|
|
||||||
[server.listener.pop3]
|
|
||||||
bind = "[::]:110"
|
|
||||||
protocol = "pop3"
|
|
||||||
|
|
||||||
[server.listener.pop3s]
|
|
||||||
bind = "[::]:995"
|
|
||||||
protocol = "pop3"
|
|
||||||
tls.implicit = true
|
|
||||||
|
|
||||||
[server.listener.sieve]
|
|
||||||
bind = "[::]:4190"
|
|
||||||
protocol = "managesieve"
|
|
||||||
|
|
||||||
[server.listener.https]
|
|
||||||
protocol = "http"
|
|
||||||
bind = "[::]:8443"
|
|
||||||
tls.implicit = true
|
|
||||||
|
|
||||||
[server.listener.http]
|
|
||||||
protocol = "http"
|
|
||||||
bind = "[::]:80"
|
|
||||||
|
|
||||||
[storage]
|
|
||||||
data = "rocksdb"
|
|
||||||
fts = "rocksdb"
|
|
||||||
blob = "rocksdb"
|
|
||||||
lookup = "rocksdb"
|
|
||||||
directory = "internal"
|
|
||||||
|
|
||||||
[store.rocksdb]
|
|
||||||
type = "rocksdb"
|
|
||||||
path = "/var/lib/stalwart"
|
|
||||||
compression = "lz4"
|
|
||||||
|
|
||||||
[directory.internal]
|
|
||||||
type = "internal"
|
|
||||||
store = "rocksdb"
|
|
||||||
|
|
||||||
[tracer.log]
|
|
||||||
type = "log"
|
|
||||||
level = "info"
|
|
||||||
path = "/var/log/stalwart"
|
|
||||||
prefix = "stalwart.log"
|
|
||||||
rotate = "never"
|
|
||||||
ansi = false
|
|
||||||
enable = true
|
|
||||||
|
|
||||||
[authentication.fallback-admin]
|
|
||||||
user = "root"
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Enable bootstrap / recovery mode on startup. Accepted: 1, true. Default: false.
|
||||||
|
STALWART_RECOVERY_MODE=false
|
||||||
|
|
||||||
|
# Log level while in recovery mode. Default: info.
|
||||||
|
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
|
||||||
@@ -10,8 +10,9 @@ After=network-online.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=15
|
RestartSec=5
|
||||||
ExecStart=/usr/sbin/stalwart --config=/etc/stalwart.toml
|
EnvironmentFile=-/etc/stalwart/stalwart.env
|
||||||
|
ExecStart=/usr/sbin/stalwart --config=/etc/stalwart/config.json
|
||||||
ExecStartPost=/usr/bin/sh -c "umask '022'; /usr/bin/pgrep --newest 'stalwart' > '/run/stalwart/stalwart.pid'"
|
ExecStartPost=/usr/bin/sh -c "umask '022'; /usr/bin/pgrep --newest 'stalwart' > '/run/stalwart/stalwart.pid'"
|
||||||
ExecStop=/usr/bin/rm --force '/run/stalwart/stalwart.pid'
|
ExecStop=/usr/bin/rm --force '/run/stalwart/stalwart.pid'
|
||||||
LimitNOFILE=65536
|
LimitNOFILE=65536
|
||||||
@@ -22,12 +23,13 @@ Group=stalwart
|
|||||||
PrivateDevices=true
|
PrivateDevices=true
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
ReadWriteDirectories=/etc/stalwart.toml
|
ReadWriteDirectories=/etc/stalwart
|
||||||
ReadWriteDirectories=/var/lib/stalwart
|
ReadWriteDirectories=/var/lib/stalwart
|
||||||
ReadWriteDirectories=/var/log/stalwart
|
ReadWriteDirectories=/var/log/stalwart
|
||||||
RuntimeDirectory=stalwart
|
RuntimeDirectory=stalwart
|
||||||
RuntimeDirectoryMode=755
|
RuntimeDirectoryMode=755
|
||||||
RuntimeDirectoryPreserve=yes
|
RuntimeDirectoryPreserve=yes
|
||||||
|
SyslogIdentifier=stalwart
|
||||||
WorkingDirectory=/var/lib/stalwart
|
WorkingDirectory=/var/lib/stalwart
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in New Issue
Block a user