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"
$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 (<STDIN>) {