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 cat $MESSAGE | formail -rt -I "Reply-To: $BOARD" \
29 -I "Errors-To: $MUNGED_ADDRESS" \
30 -I "X-Webstump-Event: reject $REASON" \
31 $MAILOUT_REJECT_FORMAIL_ARGS
36 if [ "x$REASON" != "xcustom" ] ; then
37 cat $MNG_ROOT/etc/messages/$REASON
41 echo ============================================ Full text of your message follows
42 sanitise_and_quote_email \
44 ) | gpg --clearsign --textmode --armor --batch --user "$PMUSER_APPROVAL" \
45 --passphrase "$PMPASSWORD" 2>/dev/null \
46 ) | sendmail -oi -t -f $MUNGED_ADDRESS
49 update_rejection_count() {
50 # don't count forgeries and signature mismatches against the victim
51 # also don't count thread rejections or duplicates
52 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
53 cat $MESSAGE | updateActionCount.pl -r
59 #update_rejection_count
62 # ) | stump-pgp -staf -z "$PMPASSWORD" \
63 # -u "$ROBOMOD_APPROVAL" +clearsig=on 2>/dev/null \