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

Eric Sisler esisler at westminster.lib.co.us
Thu Apr 11 20:12:37 CEST 2002


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 directory
>     # use that instead of the normal one specified in the templates dir
>welcfile = os.path.join(mm_cfg.LIST_DATA_DIR, listname, 'subscribeack.txt')
>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 it
>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 the
>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






More information about the Mailman-Users mailing list