chiark / gitweb /
Use umask 007; preserve perms on logfiles
[modbot-mtm.git] / stump / etc / modenv.INO
index 161a9b8815fe2080a1911fd047f4cfc92831be16..382861e9013d38ebdbbf877995f505a03f260444 100755 (executable)
 # 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.
@@ -19,7 +23,7 @@
 MNG_ROOT=%BASEDIR%/stump
 exec >>%BASEDIR%/errs 2>&1
 
-printf "============ %s" "$*"
+printf "============ %s " "$*"
 date
 
 export MNG_ROOT BASEDIR
@@ -42,22 +46,15 @@ MAILOUT_RECVACK_FORMAIL_ARGS='
        -I Bcc:%OURUSER%+%ABBREV%-internal-log+mailout@%DOMAIN%
 '
 MAILOUT_ACCEPTACK_FORMAIL_ARGS='
-       -I Bcc:%OURUSER%+mtm-internal-log+mailout@%DOMAIN%
+       -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%
 '
-
-sanitise_and_quote_email () {
-       perl -pe '
-               s/ %OURUSER% \+ [-+/0-9a-z]* \@
-                  (\Q %DOMAIN% | %SLIMYDOMAIN \E) \b
-                /%OURUSER%+?\@$1/igx
-                       unless m/^$/..0;
-               s/^/> /;
-               ' "$@"
-}
+export MAILOUT_RECVACK_FORMAIL_ARGS
+export MAILOUT_ACCEPTACK_FORMAIL_ARGS
+export MAILOUT_REJECT_FORMAIL_ARGS
 
 #######################################################################
 # STUMP enforces limitations on the maximum number of newsgroups
@@ -293,6 +290,5 @@ export BEGIN_PGP_SIGNED_MESSAGE BOT_SUBJECT_PREFIX
 #
 
 if [ "x$1" != "x" ]; then
-  umask 077
   antivirus | decodeBase64 | "$@"
 fi