3 # This script takes a raw article that is already rejected, creates a
4 # reply message, signs it with PGP and sends back to the author.
9 # echo $0 invoked with arguments $@ 1>&2
11 MESSAGE=$TMP/rejected.$$
13 shift; REASON="$1"; export REASON; shift
14 #EXPLANATION="$@"; export EXPLANATION
16 echo Action: processRejected, reason=$REASON 1>&2
21 # procmail -p -f- $MNG_ROOT/etc/procmail/save-rejected < $MESSAGE
26 if [ "x$REASON" = xdiscard ]; then return; fi
28 eventheader="reject $REASON"
29 if [ "x$WEBSTUMP_MESSAGENUM" != x ]; then
30 eventheader="[$WEBSTUMP_MESSAGENUM] $eventheader"
32 cat $MESSAGE | formail -rt -I "Reply-To: $BOARD" \
33 -I "Errors-To: $MUNGED_ADDRESS" \
34 -I "X-Webstump-Event: $eventheader" \
35 $MAILOUT_REJECT_FORMAIL_ARGS
40 if [ "x$REASON" != "xcustom" ] ; then
41 cat $MNG_ROOT/etc/messages/$REASON
45 echo ============================================ Full text of your message follows
46 sanitise_and_quote_email \
48 ) | gpg --clearsign --textmode --armor --batch --user "$PMUSER_APPROVAL" \
49 --passphrase "$PMPASSWORD" 2>/dev/null \
50 ) | sendmail -oi -t -f $MUNGED_ADDRESS
53 update_rejection_count() {
54 # don't count forgeries and signature mismatches against the victim
55 # also don't count thread rejections or duplicates
56 if [ "x$REASON" != "xforgery" -a "x$REASON" != "xsignature" -a "x$REASON" != "xthread" -a "x$REASON" != "xduplicate" -a "x$REASON" != "xcrosspost" -a "x$REASON" != "xempty" ]; then
57 cat $MESSAGE | updateActionCount.pl -r
63 #update_rejection_count
66 # ) | stump-pgp -staf -z "$PMPASSWORD" \
67 # -u "$ROBOMOD_APPROVAL" +clearsig=on 2>/dev/null \