From ddee689c365e2a8d24720e03aaff8222d4bd5b85 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 20 Nov 2025 06:52:57 -0500 Subject: [PATCH] fix for non-MAILHOST that were previously MAILHOST --- mail-setup | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/mail-setup b/mail-setup index 7a60e89..788a34a 100755 --- a/mail-setup +++ b/mail-setup @@ -3389,7 +3389,6 @@ EOF fi # ** exim: main daemon use non-default config file -run_as_nonroot=true case $HOSTNAME in bk|$MAIL_HOST) @@ -3407,10 +3406,34 @@ EXIMSERVICE='-bdf -q10m -C /etc/exim4/nn-mainlog.conf' E4BCD_WATCH_PANICLOG='no' EOF + + u /etc/exim4/trusted_configs <<'EOF' +/etc/exim4/nn-mainlog.conf +EOF + ;; + *) + # default file + u /etc/default/exim4 <<'EOF' +QUEUERUNNER='combined' +QUEUEINTERVAL='30m' +EOF + ;; +esac + +# ** exim non-root related setting + +case $HOSTNAME in + je|li) + # no reason to expect it to ever be there. + rm -fv /etc/systemd/system/exim4.service.d/nonroot.conf + ;; + *) + # for debugging/testing, sometimes I need debian to run as root, so # made it conditional here. # note: nonroot settings also exists in # /b/ds/filesystem/usr/local/bin/mailbindwatchdog + run_as_nonroot=true if $run_as_nonroot; then owners=$(stat -c %U:%G /usr/sbin/exim4) @@ -3450,27 +3473,6 @@ EOF fi fi - u /etc/exim4/trusted_configs <<'EOF' -/etc/exim4/nn-mainlog.conf -EOF - ;; - *) - # default file - u /etc/default/exim4 <<'EOF' -QUEUERUNNER='combined' -QUEUEINTERVAL='30m' -EOF - ;; -esac - -# ** exim non-root related setting - -case $HOSTNAME in - bk|je|li) - # no reason to expect it to ever be there. - rm -fv /etc/systemd/system/exim4.service.d/nonroot.conf - ;; - *) dirs=() for d in /a /d /m /media /mnt /nocow /o /p /q; do if [[ -d $d ]]; then -- 2.30.2