chiark / gitweb /
Make sanitise_and_quote_email into a script
[modbot-mtm.git] / stump / etc / modenv.INO
index 161a9b8815fe2080a1911fd047f4cfc92831be16..e403b4237e4eff01b230b48343de2d149a22e1f1 100755 (executable)
@@ -10,6 +10,8 @@
 # to real moderation scripts. Follow the instructions.
 #
 
+set -e
+
 #######################################################################
 # this is the root directory where moderation software & config
 # resides. Make sure that sendmail is in the PATH.
@@ -19,7 +21,7 @@
 MNG_ROOT=%BASEDIR%/stump
 exec >>%BASEDIR%/errs 2>&1
 
-printf "============ %s" "$*"
+printf "============ %s " "$*"
 date
 
 export MNG_ROOT BASEDIR
@@ -49,16 +51,6 @@ MAILOUT_REJECT_FORMAIL_ARGS='
        -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