summaryrefslogtreecommitdiff
path: root/scripts/owner
diff options
context:
space:
mode:
authormailman1998-02-27 16:10:31 +0000
committermailman1998-02-27 16:10:31 +0000
commit46d178b98b5ae3c6b164258bdba01b9598cc73dc (patch)
tree26641a348a8a51a120524bebc3e347488901f738 /scripts/owner
parent34424e63e8008c267dd7eeaf15c6453e246ec966 (diff)
downloadmailman-46d178b98b5ae3c6b164258bdba01b9598cc73dc.tar.gz
mailman-46d178b98b5ae3c6b164258bdba01b9598cc73dc.tar.zst
mailman-46d178b98b5ae3c6b164258bdba01b9598cc73dc.zip
Initial revision
Diffstat (limited to 'scripts/owner')
-rwxr-xr-xscripts/owner26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/owner b/scripts/owner
new file mode 100755
index 000000000..746dc8008
--- /dev/null
+++ b/scripts/owner
@@ -0,0 +1,26 @@
+#! /usr/local/bin/python
+#
+# This script gets called by the wrapper.
+# Stdin is the mail message, and argv[1] is the name of the mailing list
+# whose owner(s) to send mail to.
+
+import sys
+f = open('/tmp/owner.errs', 'a+')
+sys.stderr = f
+
+sys.path.append('/home/mailman/mailman/modules')
+
+import maillist, mm_message
+
+# Only let one program run at once per list.
+
+# TODO: This *can* fail, and should send back an error message when it does.
+current_list = maillist.MailList(sys.argv[1])
+try:
+ msg = mm_message.IncomingMessage()
+ if not current_list.bounce_processing or not current_list.ScanMessage(msg):
+ current_list.DeliverToList(msg, current_list.owner, '', '')
+# Let another process run.
+finally:
+ current_list.Unlock()
+