various fixes
[distro-setup] / mailtest-check
index fd27ae5ed984c08e7b5b9f3d92d4ac15c6c75797..db5df60e0b883a5d4de948960e03c9f09b7da49a 100755 (executable)
@@ -21,7 +21,7 @@
 # limitations under the License.
 
 
-# Usage: mail-test-check [slow] [int|nonint]
+# Usage: mailtest-check [slow] [int|nonint]
 #
 # slow: do slow checks, like spamassassin
 #
@@ -41,7 +41,7 @@ getspamdpid() {
   if [[ ! $spamdpid || ! -d /proc/$spamdpid ]]; then
     # try twice in case we are restarting, it happens.
     for (( i=0; i<2; i++ )); do
-      spamdpid=$(systemctl show --property MainPID --value spamassassin | sed 's/^[10]$//' ||:)
+      spamdpid=$(systemctl show --property MainPID --value $spamd_ser | sed 's/^[10]$//' ||:)
       if [[ $spamdpid ]]; then
         break
       fi
@@ -215,6 +215,9 @@ EOF
           raw_results="$(tail $resultfile | grep -A2 -Fx /usr/local/bin/send-test-forward | tail -n+2 | sed -nr 's/^\([^)]*\) *//;s/=[^, ]*([, ]|$)/ /gp')"
           for r in $raw_results; do
             case $r in
+              # This came in t12, but its just dkim + spf, and my
+              # systems aren't all t12, so ignore it for now.
+              DMARC_PASS) : ;;
               # got this in an update 2022-01. dun care
               T_SCC_BODY_TEXT_LINE|SCC_BODY_SINGLE_WORD) : ;;
               # we have a new domain, ignore this.