[Mailman-Users] changing the Welcome message on a per list basis... a shot in the dark

Jon Carnes jonc at haht.com
Thu Apr 11 21:12:27 CEST 2002

Thanks for testing it!  I'll give it a  run tonight myself and tweak it.
Shouldn't be too hard to make it work, though it might work better if I used
a file in the ~mailman/templates/.. directory. It also doesn't need to be a
function - I just thought I would get fancy.

It should be easy to play with and get it to work..
I grepped the ~mailman/Mailman/.. dir for subscribeack.txt and found it in
the file Deliverer.py.  Then I peeked at the code in Deliverer.py and saw
that it was a simple import of the text from the file (and then a
translation of some dynamic variables from the text).

So I thought of replacing the default filename with a function call and
having the function return either the default file name (subscribeack.txt),
or a different list specific file name (if it existed).

I hacked it together in email.  Never tested it.  It's not something I'm
likely to use.

I normally don't worry about the welcome message.  For my purposes, if it is
inappropriate, I don't send a welcome message out.

----- Original Message -----
From: "Eric Sisler" <esisler at westminster.lib.co.us>
To: <mailman-users at python.org>
Sent: Thursday, April 11, 2002 2:12 PM
Subject: Re: [Mailman-Users] changing the Welcome message on a per list
basis... a shot in the dark

> At 12:28 PM 04/11/2002 -0400, Jon Carnes wrote:
> >Okay, here is the deal...
> >
> >  - You can simply change the text in subscribeack.txt and you are done.
> >This changes every welcome message from every list, or
> [snip]
> >def specwelcome(listname):
> >     """Return special welcome file for `listname' if it exists."""
> >     # If a special subscibeack.txt file exists in the lists home
> >     # use that instead of the normal one specified in the templates dir
> >welcfile = os.path.join(mm_cfg.LIST_DATA_DIR, listname,
> >if not os.path.exists(welcfile):
> >      welcfile = "subscribeack.txt"
> >return welcfile
> >===
> >
> >This function looks for a copy of the subscribeack.txt file in the lists
> >home directory (~mailman/lists/<listname>/..).  If it finds a copy then
> >uses that, instead of the common one in ~mailman/templates/...
> >At least, that is what it's supposed to do!
> Have you gotten this snippet of code to work?  I tried and it bombed,
> although I know very little about python so I may have done something
> wrong.  I haven't changed the following line yet:
> >To use it, you would add the function to Deliverer.py and then replace
> >existing line (in Deliverer.py):
> >             'subscribeack.txt',
> >with something like:
> >             specwelcome(name),
> Another solution would be to edit subscribeack.txt to include just text
> that should be sent to *every* list and add your own text to the "list
> specific text prepended..." box on the general options page.  I'm
> considering doing this to prevent the "to post to the list..." text &
> accompanying e-mail address from being included in the welcome message for
> announce only lists.  The trick will be remembering to add the necessary
> text and list address to lists that do accept posts!
> -Eric
> Eric Sisler <esisler at westminster.lib.co.us>
> Applications Specialist
> Westminster Public Library
> Westminster, CO USA
> Linux - Don't fear the Penguin.
> Want to know what we use Linux for?
> Visit http://gromit.westminster.lib.co.us/linux
> ------------------------------------------------------
> Mailman-Users mailing list
> Mailman-Users at python.org
> http://mail.python.org/mailman/listinfo/mailman-users
> Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py

More information about the Mailman-Users mailing list