X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mailtest-check;fp=mailtest-check;h=cce5908fb78267d53c06a8bb224df0248b40daca;hb=b28eebdf9143aa17733f233b30b96f462008f3b6;hp=c7d40c17502e967b808e2e251a6b50b63cb1464c;hpb=ea108a03dfa2d7f73447c0b14210d766e5ee5d9b;p=distro-setup diff --git a/mailtest-check b/mailtest-check index c7d40c1..cce5908 100755 --- a/mailtest-check +++ b/mailtest-check @@ -57,10 +57,11 @@ if [[ $1 == nonint ]]; then fi #### end arg processing #### - -if ! $int; then - sleep 60 -fi +# we put this in to avoid dns errors that happen on reboot, +# but I want to debug them. +# if ! $int; then +# sleep 60 +# fi # TODO, get je to deliver the local mailbox: /m/md/INBOX @@ -145,6 +146,7 @@ EOF tmpfile=$(mktemp) declare -i unexpected=0 declare -i missing_dnswl=0 + declare -i dnsfail=0 for folder in ${folders[@]}; do for from in ${froms[@]}; do latest= @@ -264,9 +266,10 @@ EOF rm -f $resultfile for r in ${results[@]}; do case $r in - DKIM_INVALID|T_SPF_TEMPERROR|T_SPF_HELO_TEMPERROR) - missing_dnswl+=1 - ;; + # iank: for when we want to handle dns errors differently + # DKIM_INVALID|T_SPF_TEMPERROR|T_SPF_HELO_TEMPERROR) + # dnsfail+=1 + # ;; *) unexpected=$(( unexpected + 1 )) ;; @@ -276,7 +279,9 @@ EOF # We expect dns failures from time to time, so # we count them separately and alert differently. case $miss in - DKIM_VALID|DKIM_VALID_AU|DKIM_VALID_EF|SPF_HELO_PASS|SPF_PASS|RCVD_IN_DNSWL_MED|DKIMWL_WL_HIGH) + # iank: dns fail + # DKIM_VALID|DKIM_VALID_AU|DKIM_VALID_EF|SPF_HELO_PASS|SPF_PASS| + RCVD_IN_DNSWL_MED|DKIMWL_WL_HIGH) missing_dnswl+=1 ;; *)