From 6fd136ecbe46c31204bd0c91506a1070d9eff2eb Mon Sep 17 00:00:00 2001 From: klm Date: Thu, 23 Apr 1998 23:17:48 +0000 Subject: 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 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 --- scripts/answer_majordomo_mail | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'scripts') 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') -- cgit v1.3.1