On 10/18/2011 3:30 PM, Thomas Gramstad wrote:
> Is there a way to:
> 1. Approve a message to a moderated mailman list from the
> command line, when logged into the machine on which mailman
> is installed?
This will produce a list of outstanding moderator requests with each
request followed by an integer which is its request ID.
To approve a held message, you then run
/path/to/mailman/bin/withlist -l LISTNAME
which will respond
Loading list LISTNAME (locked)
The variable `m' is the LISTNAME MailList instance
at the >>> prompts, type
>>> from Mailman.mm_cfg import APPROVE
>>> m.HandleRequest(nnn, APPROVE)
(where nnn is the request ID from the step above - this should not print
any error. You can repeat the above multiple times with other IDs if
you have more that one message to approve.)
(This is important to save the state of the list.)
>>> <- at this prompt type control-D to exit which should respond
Unlocking (but not saving) list: LISTNAME
> 2. Get a list of the subscribers (who password listname-request)
> from the command line, when logged into the machine on which
> mailman is installed? (i.e., what is the file name and path
> of the subscriber file?)
The file is /path/to/mailman/lists/LISTNAME/config.pck, and you could
dump it with /path/to/mailman/bin/dumpdb, but that isn't what you want.
You want /path/to/mailman/bin/list_members. Give the command with the
--help option for more info. Also see http://wiki.list.org/x/z4A9>.
Mark Sapiro <mark@msap...> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan