summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorklm1998-04-23 23:17:48 +0000
committerklm1998-04-23 23:17:48 +0000
commit6fd136ecbe46c31204bd0c91506a1070d9eff2eb (patch)
treeea5f907942acb06f23e95f3ddd9169f48d277c3b /scripts
parenta425c1ac771c4852b4bd1ebbb02436a98688cc2c (diff)
downloadmailman-6fd136ecbe46c31204bd0c91506a1070d9eff2eb.tar.gz
mailman-6fd136ecbe46c31204bd0c91506a1070d9eff2eb.tar.zst
mailman-6fd136ecbe46c31204bd0c91506a1070d9eff2eb.zip
Incorporated janne sinkkonen's fix, with a bit of a spin of my own.
From janne@avocado.pc.helsinki.fi Thu Apr 23 19:17:15 1998 Date: 16 Apr 1998 02:38:37 +0300 From: Janne Sinkkonen <janne@avocado.pc.helsinki.fi> To: mailman-developers@python.org Cc: ilpo@pcuf.fi Subject: [Mailman-developers] Double Reply-To:, answer_majordomo_mail, archives I have several minor things: First, when the "reply to the list" option of a list is set, it seems that a potential existing Reply-To: is not (always) stripped off. Instead there will be two Reply-To: headers, one for the list, one from the original sender. I guess this is a bug? Second, here's a working answer_majordomo_mail script. The script in 1.0b12 didn't work for me (the patch would be larger than the script itself, hence I include this here): #!/usr/local/bin/python # This is another script that's really just for my use, but # feel free to use it if you know how... import sys f = open('/dev/null', 'w') sys.stderr = f sys.path.append('/home/mailman/mailman/modules') import mm_message, mm_utils msg = mm_message.IncomingMessage() text = open('/home/mailman/mailman/misc/majordomo.answer.txt', 'r').read() mm_utils.SendTextToUser('Your mail to Majordomo...', text, msg.GetSender(), 'mailman-owner') I would also like to ask about the archives. The README says 'integrated with [...] external pipermail'. :) Besides the links and authorization service provided, what does this mean in practice? Should I run piper-hypermail from a crontab or is there something better around somewhere? -- Janne ------------------------------------------------------ Mailman-developers maillist - Mailman-developers@python.org http://www.python.org/mailman/listinfo/mailman-developers
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/answer_majordomo_mail23
1 files changed, 9 insertions, 14 deletions
diff --git a/scripts/answer_majordomo_mail b/scripts/answer_majordomo_mail
index d063de234..1d8dbade2 100755
--- a/scripts/answer_majordomo_mail
+++ b/scripts/answer_majordomo_mail
@@ -4,22 +4,17 @@
import sys
-f = open('/tmp/md.err', 'a+')
-sys.stderr = f
-
sys.path.append('/home/mailman/mailman/modules')
+import mm_message, mm_utils
-import mm_message, mm_deliver
+try:
+ sys.stderr = mm_utils.StampedLogger("error",
+ label = 'answer_majordomo_mail',
+ manual_reprime=1)
+except IOError:
+ pass # Oh well - SOL on redirect, errors show thru.
msg = mm_message.IncomingMessage()
-
text = open('/home/mailman/mailman/misc/majordomo.answer.txt', 'r').read()
-
-class MyDeliverer(mm_deliver.Deliverer):
- def GetAdminEmail(self):
- return "mailman-owner"
-
-d = MyDeliverer()
-
-d.SendTextToUser('Your mail to Majordomo...', text, msg.GetSender(),
- 'mailman-owner')
+mm_utils.SendTextToUser('Your mail to Majordomo...', text, msg.GetSender(),
+ 'mailman-owner')