fix for non-MAILHOST that were previously MAILHOST
authorIan Kelling <ian@iankelling.org>
Thu, 20 Nov 2025 11:52:57 +0000 (06:52 -0500)
committerIan Kelling <ian@iankelling.org>
Thu, 20 Nov 2025 11:52:57 +0000 (06:52 -0500)
mail-setup

index 7a60e895cf510a650e30a6f5d5c925e4aa4dba74..788a34a8d9aa96089ee46dce76be78953d9f294e 100755 (executable)
@@ -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