[Mailman-Users] can I resend new list creation welcome message?

Mark Sapiro mark at msapiro.net
Wed Feb 25 01:46:07 CET 2009


Steve Lindemann wrote:

>I've had several occasions where list admins have "lost" the initial 
>welcome message they received when I created a new list for them.  Is 
>there a way to resend that new list created message?


Mailman can't resend the list created email with the password. You can
recreate the mail or even make a script to do it from the newlist.txt
template, but you can't get the password because it's encrypted.

The following withlist script will resend the mail with a password of
"Not Available". The other difference between this and the original
mail is if there is now more than one owner, only the first owner in
the list will get the mail.

If, as I suspect, the real reason for wanting this is to inform the
owner of the password, this script could be modified to set a new list
admin password and report that. I'm not including that capability
below because the implementation depends on the Mailman version.


---------------------------------------------------------------------
"""Resend the list created mail for a list without the password.

Save this as bin/remail.py

Run via

bin/withlist -r remail LISTNAME
"""

from Mailman import Message
from Mailman import Utils
from Mailman.i18n import _
from Mailman.i18n import set_language

def remail(mlist):
    set_language(mlist.preferred_language)
    siteowner = Utils.get_site_email(mlist.host_name, 'owner')
    listname = mlist._internal_name
    owner = mlist.owner[0]
    text = Utils.maketext(
        'newlist.txt',
        {'listname'    : listname,
         'password'    : 'Not Available',
         'admin_url'   : mlist.GetScriptURL('admin', absolute=1),
         'listinfo_url': mlist.GetScriptURL('listinfo', absolute=1),
         'requestaddr' : mlist.GetRequestEmail(),
         'siteowner'   : siteowner,
         }, mlist=mlist)
    msg = Message.UserNotification(
        owner, siteowner,
        _('Your new mailing list: %(listname)s'),
        text, mlist.preferred_language)
    msg.send(mlist)
---------------------------------------------------------------------

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list