From: Ian Jackson Date: Tue, 20 Apr 2010 16:51:09 +0000 (+0100) Subject: Include the message number in X-Webstump-Event X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?p=modbot-mtm.git;a=commitdiff_plain;h=379fd49b65b40d28afeeb3741addfc7ec3d2d04c Include the message number in X-Webstump-Event --- diff --git a/stump/bin/processRejected b/stump/bin/processRejected index 460c25a..694d8e9 100755 --- a/stump/bin/processRejected +++ b/stump/bin/processRejected @@ -25,9 +25,13 @@ reply() { if [ "x$REASON" = xdiscard ]; then return; fi ( + eventheader="reject $REASON" + if [ "x$WEBSTUMP_MESSAGENUM" != x ]; then + eventheader="[$WEBSTUMP_MESSAGENUM] $eventheader" + fi cat $MESSAGE | formail -rt -I "Reply-To: $BOARD" \ -I "Errors-To: $MUNGED_ADDRESS" \ - -I "X-Webstump-Event: reject $REASON" \ + -I "X-Webstump-Event: $eventheader" \ $MAILOUT_REJECT_FORMAIL_ARGS ( echo "$EXPLANATION" diff --git a/xlog/bin/record b/xlog/bin/record index 1ba50b7..37a4236 100755 --- a/xlog/bin/record +++ b/xlog/bin/record @@ -112,7 +112,10 @@ sub parse_mailout () { $message .= $line; } chomp; - $f{Event}= "notify $'" if m/^X-Webstump-Event:\s*/i; #'; + if (m/^X-Webstump-Event:\s*(?:\[(\d+)\])?\s*/i) { #'; + $f{Event}= "notify $'"; + $f{MessageNum}= $1 if defined $1; + } last if m/^$/; } while () {