[Mailman-Users] CLI changing members to moderated
Jim Tittsler
jwt at onjapan.net
Wed Jun 9 06:12:15 CEST 2004
On Jun 9, 2004, at 02:23, Brian York wrote:
> I haven't been able to figure out how to change users to moderated
> from the
> CLI.
I don't know of a command line tool supplied with Mailman that will do
it, but you can use bin/withlist and a tiny Python script to set the
moderation bit for a particular email address.
Create a file called moderate.py containing:
from Mailman.Errors import NotAMemberError
from Mailman import mm_cfg
def moderate(m, addr):
try:
m.setMemberOption(addr, mm_cfg.Moderate, mm_cfg.Yes)
m.Save()
except NotAMemberError:
print 'No address matched:', addr
Then you can call bin/withlist with the listname and email address you
want to set the moderate bit on:
$ bin/withlist -l -r moderate mylist luser at somewhere.com
--
Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6
Python Starship http://Starship.Python.net/
Ringo MUG Tokyo http://www.ringo.net/rss.html
More information about the Mailman-Users
mailing list