chiark
/
gitweb
/
~webstump
/
modbot-mtm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
593412d
)
probes: started feature
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 10 Oct 2017 14:59:50 +0000
(15:59 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 10 Oct 2017 14:59:50 +0000
(15:59 +0100)
probes/modrelays-probe
patch
|
blob
|
history
diff --git
a/probes/modrelays-probe
b/probes/modrelays-probe
index 27c5545d6f78a661ce656c97d099ca900ad0d896..ef7c639bb2b90365b9e532078924438cf7bd2b8b 100755
(executable)
--- a/
probes/modrelays-probe
+++ b/
probes/modrelays-probe
@@
-32,6
+32,13
@@
record-probing () {
mkdir -p $td
}
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
record-outcome () {
local probeid=$1
local outcome=$2
@@
-50,7
+57,7
@@
probe-addr () {
local addr=$2
local td
local addr=$2
local td
- record-probing "mx=$mx,addr=$addr"
+ record-probing
-start
"mx=$mx,addr=$addr"
set +e
swaks --to "${GROUP//./-}@$domain" \
set +e
swaks --to "${GROUP//./-}@$domain" \
@@
-104,7
+111,7
@@
probe-addr () {
probe-domain () {
local domain=$1
local td
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
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
The moderation relay probe
$info
+END
+
+ if [ -e "$attempt/started" ]; then
+ local started
+ read started <"$attempt/started"
+ cat >>"$email" <<END
+started at
+ $started
+END
+ fi
+
+ cat >>"$email" <<END
resulted in the outcome
$outcome
END
resulted in the outcome
$outcome
END
@@
-274,6
+293,7
@@
END
--$delim
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline; filename="${log##*/}"
--$delim
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline; filename="${log##*/}"
+Content-Description: "${log##*/}"
Content-Transfer-Encoding: 8bit
END
Content-Transfer-Encoding: 8bit
END