chiark / gitweb /
Use umask 007; preserve perms on logfiles
[modbot-mtm.git] / stump / etc / modenv.INO
old mode 100644 (file)
new mode 100755 (executable)
index 0375428..382861e
@@ -1,4 +1,5 @@
 #!/bin/bash
+###
 #
 # MAIN CONFIGURATION FILE
 #
@@ -9,6 +10,10 @@
 # to real moderation scripts. Follow the instructions.
 #
 
+set -e
+
+umask 007
+
 #######################################################################
 # this is the root directory where moderation software & config
 # resides. Make sure that sendmail is in the PATH.
@@ -18,6 +23,9 @@
 MNG_ROOT=%BASEDIR%/stump
 exec >>%BASEDIR%/errs 2>&1
 
+printf "============ %s " "$*"
+date
+
 export MNG_ROOT BASEDIR
 
 # Add bin and local/bin to PATH
@@ -31,6 +39,23 @@ 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%+%ABBREV%-internal-log+mailout@%DOMAIN%
+'
+MAILOUT_REJECT_FORMAIL_ARGS='
+       -I Bcc:%OURUSER%+%ABBREV%-internal-log+mailout@%DOMAIN%
+       -I Bcc:%OURUSER%+%ABBREV%-internal-reject-copy@%DOMAIN%
+'
+export MAILOUT_RECVACK_FORMAIL_ARGS
+export MAILOUT_ACCEPTACK_FORMAIL_ARGS
+export MAILOUT_REJECT_FORMAIL_ARGS
+
 #######################################################################
 # STUMP enforces limitations on the maximum number of newsgroups
 # used in Newsgroups: header line. The default value is 5. I
@@ -85,7 +110,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
 
 ######################################################################
@@ -125,7 +150,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
 
 
@@ -168,13 +193,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
 #
@@ -265,6 +290,5 @@ export BEGIN_PGP_SIGNED_MESSAGE BOT_SUBJECT_PREFIX
 #
 
 if [ "x$1" != "x" ]; then
-  umask 077
   antivirus | decodeBase64 | "$@"
 fi