Command line moderation?

Is there a way to:
Approve a message to a moderated mailman list from the command line, when logged into the machine on which mailman is installed?
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?)
This functionality would be useful in the following scenario:
You have a time-sensitive posting. You are the list owner. You have access to the machine with Mailman. But:
a) The webserver is down, and the person who can restart it is unavailable.
b) The webserver has been restarted, but they forgot something, and all the mailman webpages are still inaccessible, and the person(s) who can fix it is unavailable.
c) Mailman also doesn't respond to e-mail commands.
Thomas Gramstad

On 10/18/2011 3:30 PM, Thomas Gramstad wrote:
This is a multi-step process with current tools.
First dounload the script from <http://www.msapiro.net/scripts/list_requests> and put it in Mailman's bin/ directory. Then run
/path/to/mailman/bin/list_requests --verbose --list=LISTNAME
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.)
m.Save()
(This is important to save the state of the list.)
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@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/18/2011 3:30 PM, Thomas Gramstad wrote:
This is a multi-step process with current tools.
First dounload the script from <http://www.msapiro.net/scripts/list_requests> and put it in Mailman's bin/ directory. Then run
/path/to/mailman/bin/list_requests --verbose --list=LISTNAME
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.)
m.Save()
(This is important to save the state of the list.)
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@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Thomas Gramstad