remove fix for old distro
authorIan Kelling <ian@iankelling.org>
Tue, 20 Oct 2020 22:56:59 +0000 (18:56 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 20 Oct 2020 22:56:59 +0000 (18:56 -0400)
mail-setup
spamd-dns-fix [deleted file]

index d3b5691b46abd21df902dc9abee08ebffda1e03c..d1fd81b90480d2585cd7dfa421aeadae9f7a9fe5 100755 (executable)
@@ -426,7 +426,7 @@ fi
 
 ### begin setup network namespace ###
 case $HOSTNAME in
-  $MAIL_HOST)
+  $MAIL_HOST|bk)
     reload=false
     for unit in exim4 spamassassin; do
       f=/etc/systemd/system/$unit.service.d/nn.conf
@@ -476,6 +476,9 @@ esac
 ### end setup network namespace ###
 
 
+# 2020-10-19 remove old file. remove this when all hosts updated
+rm -fv /etc/systemd/system/spamddnsfix.{timer,service}
+
 case $HOSTNAME in
   $MAIL_HOST)
     # per readme.debian
@@ -488,35 +491,6 @@ case $HOSTNAME in
     m systemctl enable spamassassin
     m systemctl start spamassassin
     m systemctl reload spamassassin
-
-    cat >/etc/systemd/system/spamddnsfix.service <<'EOF'
-[Unit]
-Description=spamd dns bug fix cronjob
-
-[Service]
-Type=oneshot
-ExecStart=/a/bin/distro-setup/spamd-dns-fix
-EOF
-    # 2017-09, debian closed the bug on this saying upstream had fixed it.
-    # remove this when i\'m using the newer package, ie, debian 10, or maybe
-    # ubuntu 18.04.
-    cat >/etc/systemd/system/spamddnsfix.timer <<'EOF'
-[Unit]
-Description=run spamd bug fix script every 10 minutes
-
-[Timer]
-OnActiveSec=60
-# the script looks back 9 minutes into the journal,
-# it takes a second to run,
-# so lets run every 9 minutes and 10 seconds.
-OnUnitActiveSec=550
-
-[Install]
-WantedBy=timers.target
-EOF
-    m systemctl daemon-reload
-    m systemctl restart spamddnsfix.timer
-    m systemctl enable spamddnsfix.timer
     ;;
 esac
 
diff --git a/spamd-dns-fix b/spamd-dns-fix
deleted file mode 100755 (executable)
index fb042f5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
-
-[[ $EUID == 0 ]]
-
-# to deal with this bug until it\'s fixed
-# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741521
-# I just happened to notice it in my journal.
-str="dns: sendto() to \S\+ failed: Connection refused, failing over"
-if journalctl --since=-9m --unit=spamassassin | \
-        grep "$str" &>/dev/null; then
-    echo "dns bug, restarting spamassassin"
-    systemctl restart spamassassin
-fi