mail, remove excess commands
authorIan Kelling <ian@iankelling.org>
Tue, 20 Oct 2020 22:59:56 +0000 (18:59 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 20 Oct 2020 22:59:56 +0000 (18:59 -0400)
mail-setup

index d1fd81b90480d2585cd7dfa421aeadae9f7a9fe5..5e072324bc0794a4694dcb69347874d97e57d02c 100755 (executable)
@@ -479,24 +479,21 @@ esac
 # 2020-10-19 remove old file. remove this when all hosts updated
 rm -fv /etc/systemd/system/spamddnsfix.{timer,service}
 
+# per readme.debian, allow nightly cronjob to run
+sed -i '/^\s*CRON\s*=/d' /etc/default/spamassassin
+e CRON=1 >>/etc/default/spamassassin
+
 case $HOSTNAME in
-  $MAIL_HOST)
-    # per readme.debian
-    sed -i '/^\s*CRON\s*=/d' /etc/default/spamassassin
-    e CRON=1 >>/etc/default/spamassassin
+  $MAIL_HOST|bk)
     # just noticed this in the config file, seems like a good idea.
     sed -i '/^\s*NICE\s*=/d' /etc/default/spamassassin
     e 'NICE="--nicelevel 15"' >>/etc/default/spamassassin
 
+    # We wait until later to stop if we arent mailhost, so that if we
+    # are transitioning from mail host to non-mail host, we wont screw
+    # up exim.
     m systemctl enable spamassassin
     m systemctl start spamassassin
-    m systemctl reload spamassassin
-    ;;
-esac
-
-case $HOSTNAME in
-  $MAIL_HOST|bk)
-    m systemctl restart spamassassin
     ;;
 esac