From: Ian Jackson Date: Sun, 28 Feb 2010 13:16:41 +0000 (+0000) Subject: Remove more urcm-isms X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?p=modbot-mtm.git;a=commitdiff_plain;h=0f086a3142fbd6951cea31e37cb20ebf2c895ba6 Remove more urcm-isms --- diff --git a/stump/bin/processRejected b/stump/bin/processRejected index 212a8f7..046e692 100755 --- a/stump/bin/processRejected +++ b/stump/bin/processRejected @@ -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 diff --git a/stump/etc/messages/abuse.IN1 b/stump/etc/messages/abuse.IN1 index 6b3cc5d..cf51a74 100644 --- a/stump/etc/messages/abuse.IN1 +++ b/stump/etc/messages/abuse.IN1 @@ -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. diff --git a/stump/etc/messages/charter.IN1 b/stump/etc/messages/charter.IN1 index 175e042..464b1b2 100644 --- a/stump/etc/messages/charter.IN1 +++ b/stump/etc/messages/charter.IN1 @@ -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, diff --git a/stump/etc/messages/crosspost.IN1 b/stump/etc/messages/crosspost.IN1 index 82ee484..4c6cbe3 100644 --- a/stump/etc/messages/crosspost.IN1 +++ b/stump/etc/messages/crosspost.IN1 @@ -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 diff --git a/stump/etc/messages/inflammatory.IN1 b/stump/etc/messages/inflammatory.IN1 index 4636f28..2ca481b 100644 --- a/stump/etc/messages/inflammatory.IN1 +++ b/stump/etc/messages/inflammatory.IN1 @@ -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. diff --git a/stump/etc/messages/meta.IN1 b/stump/etc/messages/meta.IN1 index e2edf36..e83cf76 100644 --- a/stump/etc/messages/meta.IN1 +++ b/stump/etc/messages/meta.IN1 @@ -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 diff --git a/stump/etc/messages/repetition.IN1 b/stump/etc/messages/repetition.IN1 index 21713d4..90aff7f 100644 --- a/stump/etc/messages/repetition.IN1 +++ b/stump/etc/messages/repetition.IN1 @@ -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 diff --git a/stump/etc/messages/thread.IN1 b/stump/etc/messages/thread.IN1 index 1c6c1dd..89aa4c3 100644 --- a/stump/etc/messages/thread.IN1 +++ b/stump/etc/messages/thread.IN1 @@ -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 diff --git a/stump/etc/modack.approved.INO b/stump/etc/modack.approved.INO index 9e96268..d07d760 100755 --- a/stump/etc/modack.approved.INO +++ b/stump/etc/modack.approved.INO @@ -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 diff --git a/stump/etc/modack.received.INO b/stump/etc/modack.received.INO index e030aff..63be110 100755 --- a/stump/etc/modack.received.INO +++ b/stump/etc/modack.received.INO @@ -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 diff --git a/stump/etc/modenv.INO b/stump/etc/modenv.INO index a9e4d1a..161a9b8 100755 --- a/stump/etc/modenv.INO +++ b/stump/etc/modenv.INO @@ -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 " +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 index 2b0b6d7..0000000 --- a/stump/etc/procmailrc +++ /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