From 97b78b0003982c6374f4d631694ba2746580cf1f Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 10 May 2022 14:31:45 -0400 Subject: [PATCH] fixes --- .../etc/unbound/unbound.conf.d/ian.conf | 7 ++++++- mailtest-check | 16 ++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/machine_specific/bitfolk/filesystem/etc/unbound/unbound.conf.d/ian.conf b/machine_specific/bitfolk/filesystem/etc/unbound/unbound.conf.d/ian.conf index b31ed34..5b1cfef 100644 --- a/machine_specific/bitfolk/filesystem/etc/unbound/unbound.conf.d/ian.conf +++ b/machine_specific/bitfolk/filesystem/etc/unbound/unbound.conf.d/ian.conf @@ -9,7 +9,12 @@ server: #log-tag-queryreply: yes #log-servfail: yes #val-log-level: 1 -verbosity: 4 + +## This is very verbose, fills up 4g of logs in 8 hours on bk.b8.nz. I think +## it leads to spamassassin dns timeout (1 second) when the system first +## starts. +#verbosity: 4 +# interface: 127.0.0.1 interface: ::1 diff --git a/mailtest-check b/mailtest-check index 5cf79fe..89ed00c 100755 --- a/mailtest-check +++ b/mailtest-check @@ -131,13 +131,14 @@ EOF fi # webmail sends them to cur it seems while read -r file; do - if [[ $file -nt $latest ]]; then + file_sec=$(awk '/^Subject: / {print $4}' $file) + if [[ $file_sec ]] && (( file_sec > last_sec )); then latest=$file + last_sec="$file_sec" fi done <$tmpfile to=$(awk '/^Envelope-to: / {print $2}' $latest) - last_sec=$(awk '/^Subject: / {print $4}' $latest) if $slow; then if ! $int; then @@ -236,6 +237,7 @@ EOF #fi fi rm -f $resultfile + unexpected=$(( unexpected + ${#results[@]} + ${#missing[@]} )) fi # if spamdpid fi # if $slow @@ -247,9 +249,8 @@ EOF pr <