[Mailman-developers] Double Reply-To:, answer_majordomo_mail, archives

Ken Manheimer klm@python.org
Thu, 23 Apr 1998 19:25:55 -0400 (EDT)


On 16 Apr 1998, Janne Sinkkonen wrote:

> 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): 

Included below is about what you suggested, but with what i would like
to see as canonical provision for logging in mailman scripts.  (Any of
the scripts that i actually concentrated on have this provision, instead
of the hard-wired - and failure prone - file logging.)

> 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?

Perhaps i got a bit carried away with marketing speak.  The idea is
exactly that - run pipermail (or whatever archiver you want) externally,
eg from crontab.  Someone i know is planning to run an archiver that
revises the archive as each new message comes in, but if you're using
something, like pipermail, that watches a file for changes, then setting
private or public archives will place the mbox file in the respective
archives directory, which is the way the distinction is communicated to
the external archiver.  (I suppose an X-header could be added to
private-archive messages, for the benefit of recipient-based archivers. 
Does that make sense?  I'm a bit worried about sending out messages that
are increasingly header heavy - adding a header seems to offer a
solution to lots of problems...-) 

My slightly different version of answer_majordomo_mail is included below
my sig.

Ken Manheimer		  klm@python.org	    703 620-8990 x268
	    (orporation for National Research |nitiatives

		   # Thanks for joining the PSA!  #
		    # http://www.python.org/psa/ #

#!/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

sys.path.append('/home/mailman/mailman/modules')
import mm_message, mm_utils

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()
mm_utils.SendTextToUser('Your mail to Majordomo...', text, msg.GetSender(),
                        'mailman-owner')