chiark / gitweb /
Remove more urcm-isms
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Feb 2010 13:16:41 +0000 (13:16 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Feb 2010 13:16:41 +0000 (13:16 +0000)
12 files changed:
stump/bin/processRejected
stump/etc/messages/abuse.IN1
stump/etc/messages/charter.IN1
stump/etc/messages/crosspost.IN1
stump/etc/messages/inflammatory.IN1
stump/etc/messages/meta.IN1
stump/etc/messages/repetition.IN1
stump/etc/messages/thread.IN1
stump/etc/modack.approved.INO
stump/etc/modack.received.INO
stump/etc/modenv.INO
stump/etc/procmailrc [deleted file]

index 212a8f7caa7499613c8093319694c3b445b8e0e4..046e6921cd517d27e078d747046184efcf5ff839 100755 (executable)
@@ -26,8 +26,7 @@ reply() {
     cat $MESSAGE | formail -rt -I "Reply-To: $BOARD"   \
                               -I "Errors-To: $MUNGED_ADDRESS"   \
         -I "X-Webstump-Event: reject $REASON" \
-       -I 'Bcc: webstump+urcm-internal-log+mailout' \
-       -I 'Bcc: webstump+urcm-internal-reject-copy'
+       $MAILOUT_REJECT_FORMAIL_ARGS
     (
       echo "$EXPLANATION"
       echo
@@ -38,8 +37,8 @@ reply() {
 
       echo ""
       echo ============================================ Full text of your message follows
-      sed 's/^/> /; s/webstump+[-+/0-9a-z]*@chiark/webstump+?@chiark/' \
-         < $MESSAGE
+      sanitise_and_quote_email \
+         < $MESSAGE
     ) | gpg --clearsign --textmode --armor --batch --user "$PMUSER_APPROVAL" \
          --passphrase "$PMPASSWORD" 2>/dev/null \
   ) | sendmail -oi -t -f $MUNGED_ADDRESS
index 6b3cc5de7b354396f7f2d837cb30db7ab01fef78..cf51a745acf856e951887ecd4e1226622ba1f02a 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because it was rude, a flame, and/or personal abuse.
index 175e0425a4d5d955077ea579f71c9bc59384c9b4..464b1b29ddc5c2a258253b6cc86f598667bba25c 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because it was not in accordance with the charter - for example,
index 82ee4843962bbc836adceb3e605a22b803bb2390..4c6cbe3f691f15f3f89fb9cbef4990305903a337 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because it was crossposted.  The moderators do not currently permit
index 4636f28d2e67bdf85759e25b2a4bf8ef16e65a93..2ca481b4de75f0f41d422bef0015a66797491f64 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because we feel it was needlessly inflammatory.
index e2edf3640cdba32b205a3efa42ee9995ee80907c..e83cf76c2187d62bd91fe5928c0d1c1c6e837a4f 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because it is a posting about moderation decisions, and we feel it is
index 21713d43835ff325468278f8946951d41c2ad562..90aff7f3d69941a4bc4dfc24cdc371911119178e 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because it is a repetitious posting which we feel does not bring new
index 1c6c1dd4e7f3f0779aaf456a0dc6c63d992d858e..89aa4c3cab65cdaa4bc2ef91f8dfd416876a16f9 100644 (file)
@@ -1,4 +1,4 @@
-Thank you for your submission to uk.rec.cycling.moderated.
+Thank you for your submission to %GROUP%.
 
 However, we regret to inform you that your message has been rejected
 because it was posted in a thread that had strayed off topic and was
index 9e96268a000ba60df345610723d6989073b381d3..d07d7609928d6115693791f03b3651b790775e6e 100755 (executable)
@@ -3,7 +3,7 @@
 (
   cat $@ | formail -rt -I "Reply-To: $NOACK" \
         -I "X-Webstump-Event: approve" \
-       -I 'Bcc: %OURUSER%+%ABBREV%-internal-log+mailout'
+       $MAILOUT_ACCEPTACK_FORMAIL_ARGS
   cat <<_EOB_
 Hello,
 
@@ -20,6 +20,7 @@ simply reply to this message, QUOTING ITS TEXT IN FULL.
 
 _EOB_
 
-  sed 's/^/> /; s/%OURUSER%+[-+/0-9a-z]*@%DOMAIN%/%OURUSER%+?@%DOMAIN%/' \
+  sanitise_and_quote_email \
      $@
+
 ) | sendmail -t -f $MUNGED_ADDRESS
index e030affddb0ca2ff965a61a5d9e9dc1978a68903..63be1104f494b1b6222fb6786deeea3375f1beaf 100755 (executable)
@@ -7,7 +7,7 @@ cat > $TMPFILE
 (
   formail -rt -I "Reply-To: $NOACK" \
         -I "X-Webstump-Event: ack" \
-       -I 'Bcc: %OURUSER%+%ABBREV%-internal-log+mailout' \
+       $MAILOUT_RECVACK_FORMAIL_ARGS \
      < $TMPFILE
   cat <<_EOB_
 Hello,
@@ -27,8 +27,9 @@ For details of the moderation arrangements see
 
 _EOB_
 
-  sed 's/^/> /; s/%OURUSER%+[-+/0-9a-z]*@%DOMAIN%/%OURUSER%+?@%DOMAIN%/' \
+  sanitise_and_quote_email \
       < $TMPFILE
+
 ) | sendmail -t -f $MUNGED_ADDRESS
 
 rm $TMPFILE
index a9e4d1acdfe30bef97f12a67fcda01790ca45b26..161a9b8815fe2080a1911fd047f4cfc92831be16 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+###
 #
 # MAIN CONFIGURATION FILE
 #
@@ -34,6 +35,30 @@ export PATH
 
 NEWSGROUP="%GROUP%"; export NEWSGROUP
 
+#######################################################################
+# Email handling and mangling
+
+MAILOUT_RECVACK_FORMAIL_ARGS='
+       -I Bcc:%OURUSER%+%ABBREV%-internal-log+mailout@%DOMAIN%
+'
+MAILOUT_ACCEPTACK_FORMAIL_ARGS='
+       -I Bcc:%OURUSER%+mtm-internal-log+mailout@%DOMAIN%
+'
+MAILOUT_REJECT_FORMAIL_ARGS='
+       -I Bcc:%OURUSER%+%ABBREV%-internal-log+mailout@%DOMAIN%
+       -I Bcc:%OURUSER%+%ABBREV%-internal-reject-copy@%DOMAIN%
+'
+
+sanitise_and_quote_email () {
+       perl -pe '
+               s/ %OURUSER% \+ [-+/0-9a-z]* \@
+                  (\Q %DOMAIN% | %SLIMYDOMAIN \E) \b
+                /%OURUSER%+?\@$1/igx
+                       unless m/^$/..0;
+               s/^/> /;
+               ' "$@"
+}
+
 #######################################################################
 # STUMP enforces limitations on the maximum number of newsgroups
 # used in Newsgroups: header line. The default value is 5. I
@@ -88,7 +113,7 @@ export PGP
 #
 # this MUST be dfined EVEN if PGP is set to "none".
 # This goes into your Approved: field.
-PMUSER_APPROVAL="%GROUP% approval key <urcm-moderators@chiark.greenend.org.uk>"
+PMUSER_APPROVAL="%GROUP% approval key <%MODEMAIL%>"
 export PMUSER_APPROVAL
 
 ######################################################################
@@ -128,7 +153,7 @@ PMAPP="pmapp"; export PMAPP
 # a devnulled address, since a lot of rejections/acks will bounce
 # and there is no need for a human being to see the bounces.
 #
-MUNGED_ADDRESS=%OURUSER%+urcm-bounces@%DOMAIN%
+MUNGED_ADDRESS=%OURUSER%+%ABBREV%-bounces@%DOMAIN%
 export MUNGED_ADDRESS
 
 
@@ -171,13 +196,13 @@ BOARD=%MODEMAIL%; export BOARD
 
 ######################################################################
 # address for the no-ack requests.
-NOACK=%OURUSER%+urcm-noack@chiark.greenend.org.uk
+NOACK=%OURUSER%+%ABBREV%-noack@chiark.greenend.org.uk
 export NOACK
 
 ######################################################################
 # Official address for submissions to the newsgroup.
 #
-SUBMIT=%OURUSER%+urcm+%KEYSUBMIT%@chiark.greenend.org.uk; export SUBMIT
+SUBMIT=%OURUSER%+%ABBREV%+%KEYSUBMIT%@chiark.greenend.org.uk; export SUBMIT
 
 ###################################################################### Flags
 #
diff --git a/stump/etc/procmailrc b/stump/etc/procmailrc
deleted file mode 100644 (file)
index 2b0b6d7..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-# Please check if all the paths in PATH are reachable, remove the ones that
-# are not.
-#
-# NOTE: I use lockfiles extensively (and even excessively) because
-# I do not want to overburden the system. Since I am on a
-# PPP link that is not always on, sometimes large amounts of 
-# submissions come in simultaneously and that may impair
-# performance of the overall system. You do not REALLY need
-# to use these lockfiles otherwise.
-#
-# STUMP USERS: 
-#
-# * Go through this file and replace urcm and
-#   uk.rec.cycling.moderated with appropriate text for
-#   your own group.
-#
-# * Please remove recipes related to user "mkagalen". He is not
-#   likely to bother you.
-#
-# * Replace "ichudov" with the address of the robomod supporter.
-#
-# good luck. igor
-#
-###################################################################
-
-PATH=/bin:/usr/bin:/usr/local/bin:$HOME/stump/bin:$HOME/stump/etc
-MAILDIR=$HOME/Mail     # You'd better make sure it exists
-DEFAULT=$MAILDIR/mbox
-# VERBOSE=ON
-LOGFILE=$MAILDIR/from
-LOCKFILE=$HOME/.lockmail
-
-:0 c
-$MAILDIR/allmail
-
-############################################################ Begin Mailbombing
-:0:
-* ^(From|Sender): .*mkagalen@lynx.dac.neu.edu
-* TOurcm-board
-$MAILDIR/bomb
-
-:0:
-* ^(From|Sender): .*mkagalen@lynx.dac.neu.edu
-* TOurcm-mods
-$MAILDIR/bomb
-
-:0
-* ^From: .*mkagalen@lynx.dac.neu.edu
-* ^Subject: .*Spongiform
-$MAILDIR/bomb
-
-:0:
-* From: "The Filter of mkagalen@lynx"
-$MAILDIR/bomb
-
-#
-# This recipe removes duplicates!
-#
-:0 Wh: msgid.lock
-| formail -D 32768 msgid.cache
-
-
-############################################################ End Mailbombing
-
-# Cabal maillist
-:0 
-* ^From .*uu.net
-* ^To: urcm-board
-| modenv mods-message moderators@isc.org ADVICE
-
-:0
-* ^From .*uu.net
-* ^TOmoderators
-| modenv mods-message moderators@isc.org ADVICE
-
-:0
-* ^From .*isc.org
-* ^TOmoderators
-| modenv mods-message moderators@isc.org ADVICE
-
-
-###################################################################### Standard
-
-:0 
-* ^TOurcm-mods
-| modenv mods-message urcm-mods@algebra.com
-
-:0 
-* ^TOurcm-board
-| modenv mods-message urcm-mods@algebra.com
-
-:0
-* ^TOurcm-noack
-| modenv stump.pl processNoack.pl
-
-:0
-* ^TOsoc-culture-russian-moderated
-| modenv stump.pl submission.pl
-
-:0
-* ^TOuk.rec.cycling.moderated
-| modenv stump.pl submission.pl
-
-
-:0
-* ^TOurcm-approved
-| formail -c | modenv stump.pl acceptFromMod.pl
-
-:0
-* ^TOurcm-rejected
-| modenv stump.pl acceptFromMod.pl
-
-:0 
-* ^TOurcm-admin
-!ichudov
-
-:0
-* ^TOurcm-approval-key
-| modenv send_pgp_key
-
-:0
-* ^Newsgroups: 
-| modenv stump.pl submission.pl
-
-:0 
-* ^FROM_DAEMON
-!ichudov
-
-:0 
-* ^FROM_MAILER
-!ichudov
-
-# Anything that has not been delivered by now is a submission
-:0
-| modenv stump.pl submission.pl