summaryrefslogtreecommitdiff
path: root/scripts/post
diff options
context:
space:
mode:
authormailman1998-04-10 19:16:17 +0000
committermailman1998-04-10 19:16:17 +0000
commit3bd8d1cba4177a9286d7ae1e4db95b7531716650 (patch)
tree176e6ad3334d2a434f1c68bce25e38d8fb8c562f /scripts/post
parentbafa42d529a47aa6f89801ee2cfd63c370a28045 (diff)
downloadmailman-3bd8d1cba4177a9286d7ae1e4db95b7531716650.tar.gz
mailman-3bd8d1cba4177a9286d7ae1e4db95b7531716650.tar.zst
mailman-3bd8d1cba4177a9286d7ae1e4db95b7531716650.zip
Set stderr to the logger, to get errors logged if they occur.
Diffstat (limited to 'scripts/post')
-rwxr-xr-xscripts/post11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/post b/scripts/post
index a0a27c94e..ec5e3cecf 100755
--- a/scripts/post
+++ b/scripts/post
@@ -7,8 +7,7 @@ This script is invoked via the mail wrapper.
Stdin is the mail message, and argv[1] is the name of the target mailing
list."""
-__version__ = "$Revision: 400 $"
-
+__version__ = "$Revision: 416 $"
# Todo: check size of To: list < 100
# Send back why the post was rejected.
@@ -17,7 +16,13 @@ import sys
sys.path.append('/home/mailman/mailman/modules')
-import maillist, mm_message, mm_err, mm_cfg
+import maillist, mm_message, mm_err, mm_cfg, mm_utils
+
+try:
+ sys.stderr = mm_utils.StampedLogger("error", label = 'post',
+ manual_reprime=1, nofail=0)
+except IOError:
+ pass # Oh well - SOL on redirect, errors show thru.
# Only let one program run at once per list.