Fix: mailwolt-sandbox-sync via update.sh automatisch installieren

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main v1.1.353
boban 2026-04-26 22:34:52 +02:00
parent 00f715480f
commit 598f0edacf
2 changed files with 17 additions and 2 deletions

View File

@ -0,0 +1,13 @@
#!/bin/bash
# Writes /etc/postfix/transport.sandbox from a temp file and runs postmap.
# Usage: mailwolt-sandbox-sync <tempfile>
set -e
DEST="/etc/postfix/transport.sandbox"
SRC="$1"
if [[ -z "$SRC" || ! -f "$SRC" ]]; then
echo "Usage: mailwolt-sandbox-sync <tempfile>" >&2
exit 1
fi
cp "$SRC" "$DEST"
chmod 644 "$DEST"
postmap "$DEST"

View File

@ -207,6 +207,7 @@ ensure_system(){
_sbin_install "${APP_DIR}/scripts/update.sh" /usr/local/sbin/mailwolt-update
_sbin_install "${APP_DIR}/scripts/mailwolt-clamav" /usr/local/sbin/mailwolt-clamav
_sbin_install "${APP_DIR}/scripts/mailwolt-backup" /usr/local/sbin/mailwolt-backup
_sbin_install "${APP_DIR}/scripts/mailwolt-sandbox-sync" /usr/local/sbin/mailwolt-sandbox-sync
# Sudoers-Regeln: dediziertes File unabhängig von certbot/dkim
local MW_SUDO="/etc/sudoers.d/mailwolt"
if [[ ! -f "$MW_SUDO" ]]; then touch "$MW_SUDO"; chmod 440 "$MW_SUDO"; fi
@ -214,6 +215,7 @@ ensure_system(){
_sudoers_add "$MW_SUDO" 'www-data ALL=(root) NOPASSWD: /usr/local/sbin/mailwolt-update --check-only'
_sudoers_add "$MW_SUDO" 'www-data ALL=(root) NOPASSWD: /usr/local/sbin/mailwolt-clamav'
_sudoers_add "$MW_SUDO" 'www-data ALL=(root) NOPASSWD: /usr/local/sbin/mailwolt-backup'
_sudoers_add "$MW_SUDO" 'www-data ALL=(root) NOPASSWD: /usr/local/sbin/mailwolt-sandbox-sync *'
_sudoers_add "$MW_SUDO" 'www-data ALL=(root) NOPASSWD: /usr/bin/openssl x509 -enddate -noout -in /etc/letsencrypt/live/*/fullchain.pem'
# Legacy-Files ebenfalls nachrüsten (falls vorhanden)
for f in /etc/sudoers.d/mailwolt-certbot /etc/sudoers.d/mailwolt-dkim; do