On 6/1/11 8:51 PM, UUN Hostmaster wrote:
> Mailman Folks,
> 
> Who do I convert these manual instructions into a program?
> 
>          bin/withlist bar
>          >>> m.real_name='bar'
>          >>> m.Lock()
>          >>> m.Save()
>          >>> m.Unlock()
>          >>> ^D

First of all, that is wrong. the m.Lock() will reload the list object
and undo the m.real_name='bar'. Just add -l to the withlist command and
don't do either m.Lock() or m.Unlock().

To make a script, put something like

def rename_list(mlist):
    if not mlist.Locked():
        mlist.Lock()
    mlist.real_name = mlist.internal_name()
    mlist.Save()
    mlist.Unlock()

in a file named rename_list.py in Mailman's bin/ directory and then you
can run

bin/withlist -r rename_list bar

However, if this is cPanel there may be problems with the above.

-- 
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    Better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to