or $local_part_suffix is +%ABBREV%+test-submission
then
unseen pipe "mail -s submission %LOGGROUPEMAILPREFIX%+%ABBREV%+log+submissions"
+ if $header_X-WebSTUMP-Relay-Probe: contains %GROUP% then
+ pipe "%BASEDIR/probes/modrelays-probe received %BASEDIR%"
+ finish
+ endif
unseen pipe "%BASEDIR%/xlog/bin/record submission %GROUP%"
pipe "%BASEDIR%/stump/etc/modenv stump.pl submission.pl"
finish
PROBE_TIMEOUT=$(( 20 * 60 ))
PROBE_EXPIRE=$(( 32 * 86400 ))
+case "$1" in
+received)
+ mode="$1"
+ cd "$2"
+ shift; shift; set "$mode" "$@"
+ ;;
+esac
+
. ../global-settings
. ./settings
exit 16
}
-record-probing () {
- # implicitly uses newsgroup, id, domain
+compute-td () {
+ # implicitly uses GROUP, id, domain
# caller must "local td", which will be set
local probeid=$1
esac
td="$statedir/$probeid"
+}
+
+record-probing () {
+ compute-td "$@"
mkdir -p $td
}
}
no_args () {
- case $1 in
+ case $# in
0) return ;;
*) fail "no arguments to $mode allowed" ;;
esac
done
}
+mode_received () {
+ no_args
+
+ local hn group id domain mx addr
+ while read hn group id domain mx addr; do
+ if [ x"$hn" != x"X-WebSTUMP-Relay-Probe:" ]; then continue; fi
+ if [ x"$group" != x"$GROUP" ]; then continue; fi
+ local td
+ compute-td "mx=$mx,addr=$addr"
+ >"$td/ok" ||:
+ return
+ done
+}
+
mode_all () {
no_args $#
for domain in $MODRELAYS; do