From 1f3068176f19e911fbe7eb9a852ca91961d4b751 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 28 Feb 2010 21:25:50 +0000 Subject: [PATCH] Make sanitise_and_quote_email into a script --- .gitignore | 1 + stump/etc/modenv.INO | 12 ++---------- stump/etc/sanitise_and_quote_email.INO | 7 +++++++ 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100755 stump/etc/sanitise_and_quote_email.INO diff --git a/.gitignore b/.gitignore index 661170f..180fe79 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ /stump/etc/modack.approved.new /stump/etc/modack.received.new /stump/etc/moderators +/stump/etc/sanitise_and_quote_email /stump/etc/messages/*[^N]? /sballot/issues /inews diff --git a/stump/etc/modenv.INO b/stump/etc/modenv.INO index eebf1d5..e403b42 100755 --- a/stump/etc/modenv.INO +++ b/stump/etc/modenv.INO @@ -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. @@ -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 diff --git a/stump/etc/sanitise_and_quote_email.INO b/stump/etc/sanitise_and_quote_email.INO new file mode 100755 index 0000000..a62f349 --- /dev/null +++ b/stump/etc/sanitise_and_quote_email.INO @@ -0,0 +1,7 @@ +#!/usr/bin/perl -p + +s, %OURUSER% \+ [-+/0-9a-z]* \@ (\Q %DOMAIN% | %SLIMYDOMAIN \E) \b + ,%OURUSER%+?\@$1,igx + unless m/^$/..0; + +s/^/> /; -- 2.30.2