From: Ian Jackson Date: Tue, 10 Oct 2017 14:59:50 +0000 (+0100) Subject: probes: started feature X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?p=modbot-mtm.git;a=commitdiff_plain;h=7125403d58d2a281a699a8c53ab09bd7304aa048 probes: started feature --- diff --git a/probes/modrelays-probe b/probes/modrelays-probe index 27c5545..ef7c639 100755 --- a/probes/modrelays-probe +++ b/probes/modrelays-probe @@ -32,6 +32,13 @@ record-probing () { mkdir -p $td } +record-probing-start () { + record-probing "$@" + if ! [ -e "$td/started" ]; then + date -R >"$td/started" + fi +} + record-outcome () { local probeid=$1 local outcome=$2 @@ -50,7 +57,7 @@ probe-addr () { local addr=$2 local td - record-probing "mx=$mx,addr=$addr" + record-probing-start "mx=$mx,addr=$addr" set +e swaks --to "${GROUP//./-}@$domain" \ @@ -104,7 +111,7 @@ probe-addr () { probe-domain () { local domain=$1 local td - record-probing dns + record-probing-start dns set +e adnshost -Fi -Tn +Do +Dt -t mx $domain >$td/dns @@ -242,6 +249,18 @@ Content-Transfer-Encoding: 7bit The moderation relay probe $info +END + + if [ -e "$attempt/started" ]; then + local started + read started <"$attempt/started" + cat >>"$email" <>"$email" <