Remove Members waiting for Moderator Approval via Command Line

I'm sorry if this was posted elsewhere - I've been unable to find an answer.
I also realized I originated this e-mail from an account not associated with the mailing list. This e-mail is from a subscribed mailman-user account.
I'm trying to kill a pending subscription to a mailing list via the command line because the domain owner forgot to register the main domain of our site and we can't approve/deny membership via the web admin interface.
I've tried to remove the e-mail address pending approval via the remove_members command and it seem to only react to active and approved members of a mailing list.
Is there a way to approve / deny a pending user request via shell?
Thanks for the help
Phil / w2lie Monitor Long Island, Inc. <http://www.monitorlongisland.com> | W2LIE.net<http://www.w2lie.net>| LongIslandFirePhotos.com <http://www.LongIslandFirePhotos.com> <http://www.w2lie.net/charity>

Phil wrote:
That's correct. remove_members only removes members. A pending subscription is not (yet) a member.
Is there a way to approve / deny a pending user request via shell?
Do you mean a subscription request that is waiting moderator approval because subscribe_policy is 'Require approval' or 'Confirm and approve' or one that is waiting user confirmation because subscribe_policy is 'Confirm' or 'Confirm and approve'? It seems you mean the former.
Deleting a subscription waiting approval is a multi step process with existing tools.
First run
/path/to/mailman/bin/dumpdb /path/to/mailman/lists/LISTNAME/pending.pck
This will report something like
[----- start pickle file -----] <----- start object 1 -----> { 104: ( 2, ( 1318366634.8118629, 'user@example.com', 'User Name', 'tuufwuge', False, 'en')), 'version': (0, 1)} [----- end pickle file -----]
There may be more entries than above, but those other than
'version': (0, 1)
are all pending requests of some kind. Each will have a numeric key, 104 in the above followed by a 2-tuple consisting of a number indicating the request type (1 for a held message, 2 for a held subscription or 3 for a held unsubscription) and a tuple of information the format of which depends on the type.
You are interested in type 2 as above and the information tuple is (time stamp, e-mail address, real name, password, digest flag, language). Find the key(s) of the one(s) you want to discard, in the example above, 104.
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 DISCARD m.HandleRequest(104, DISCARD)
(Use the key from your request instead of 104 - this should not print any error. You can repeat the above multiple times with other keys if you have more that one request to discard.)
m.Save()
(This is important to save the state of the list.)
The discards will be logged in Mailman's vette log.
The above method can be used to discard a held message, but Mailman's bin/discard is simpler.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark, Thanks for the help. When I tried to run the database dump, it looks like it might be encrypted. Does this look right to you? Thanks Phil.
[----- start pickle file -----] <----- start object 1 -----> { '0b9e53af60a8139e94986c07bcd3b092a0e5a26c': ('H', 10), '9dc482c780b8131cf518d6908b580e69dcdb36ee': ('H', 11), 'a4820f58310f6f028ed5cdd2eaad0e407ac3dfa9': ('H', 9), 'evictions': { '0b9e53af60a8139e94986c07bcd3b092a0e5a26c': 1313195808.891789, '9dc482c780b8131cf518d6908b580e69dcdb36ee': 1313281235.9221661, 'a4820f58310f6f028ed5cdd2eaad0e407ac3dfa9': 1313173460.4197421}, 'version': 2} [----- end pickle file -----]
--
Phil / w2lie Monitor Long Island, Inc. <http://www.monitorlongisland.com/> | W2LIE.net<http://www.w2lie.net/>| LongIslandFirePhotos.com <http://www.longislandfirephotos.com/> <http://www.w2lie.net/charity>
On Tue, Oct 11, 2011 at 8:51 PM, Mark Sapiro <mark@msapiro.net> wrote:

Phil wrote:
My mistake. I meant to say dump request.pck, not pending.pck. The dump above of pending.pck shows 3 held messages keyed by the confirmation cookie that could be used to discard the message. The newest of these cookies expired at 1313281235.9221661 = Sat Aug 13 17:20:35 2011.
The dump of request.pck shows the records that are waiting moderator action and should look as I described.
Should be request.pck, not pending.pck.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you for the help Mark. It looks like the request.pck worked.
--
Phil / w2lie Monitor Long Island, Inc. <http://www.monitorlongisland.com/> | W2LIE.net<http://www.w2lie.net/>| LongIslandFirePhotos.com <http://www.longislandfirephotos.com/> <http://www.w2lie.net/charity>
On Mon, Oct 17, 2011 at 11:31 PM, Mark Sapiro <mark@msapiro.net> wrote:

Phil wrote:
That's correct. remove_members only removes members. A pending subscription is not (yet) a member.
Is there a way to approve / deny a pending user request via shell?
Do you mean a subscription request that is waiting moderator approval because subscribe_policy is 'Require approval' or 'Confirm and approve' or one that is waiting user confirmation because subscribe_policy is 'Confirm' or 'Confirm and approve'? It seems you mean the former.
Deleting a subscription waiting approval is a multi step process with existing tools.
First run
/path/to/mailman/bin/dumpdb /path/to/mailman/lists/LISTNAME/pending.pck
This will report something like
[----- start pickle file -----] <----- start object 1 -----> { 104: ( 2, ( 1318366634.8118629, 'user@example.com', 'User Name', 'tuufwuge', False, 'en')), 'version': (0, 1)} [----- end pickle file -----]
There may be more entries than above, but those other than
'version': (0, 1)
are all pending requests of some kind. Each will have a numeric key, 104 in the above followed by a 2-tuple consisting of a number indicating the request type (1 for a held message, 2 for a held subscription or 3 for a held unsubscription) and a tuple of information the format of which depends on the type.
You are interested in type 2 as above and the information tuple is (time stamp, e-mail address, real name, password, digest flag, language). Find the key(s) of the one(s) you want to discard, in the example above, 104.
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 DISCARD m.HandleRequest(104, DISCARD)
(Use the key from your request instead of 104 - this should not print any error. You can repeat the above multiple times with other keys if you have more that one request to discard.)
m.Save()
(This is important to save the state of the list.)
The discards will be logged in Mailman's vette log.
The above method can be used to discard a held message, but Mailman's bin/discard is simpler.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark, Thanks for the help. When I tried to run the database dump, it looks like it might be encrypted. Does this look right to you? Thanks Phil.
[----- start pickle file -----] <----- start object 1 -----> { '0b9e53af60a8139e94986c07bcd3b092a0e5a26c': ('H', 10), '9dc482c780b8131cf518d6908b580e69dcdb36ee': ('H', 11), 'a4820f58310f6f028ed5cdd2eaad0e407ac3dfa9': ('H', 9), 'evictions': { '0b9e53af60a8139e94986c07bcd3b092a0e5a26c': 1313195808.891789, '9dc482c780b8131cf518d6908b580e69dcdb36ee': 1313281235.9221661, 'a4820f58310f6f028ed5cdd2eaad0e407ac3dfa9': 1313173460.4197421}, 'version': 2} [----- end pickle file -----]
--
Phil / w2lie Monitor Long Island, Inc. <http://www.monitorlongisland.com/> | W2LIE.net<http://www.w2lie.net/>| LongIslandFirePhotos.com <http://www.longislandfirephotos.com/> <http://www.w2lie.net/charity>
On Tue, Oct 11, 2011 at 8:51 PM, Mark Sapiro <mark@msapiro.net> wrote:

Phil wrote:
My mistake. I meant to say dump request.pck, not pending.pck. The dump above of pending.pck shows 3 held messages keyed by the confirmation cookie that could be used to discard the message. The newest of these cookies expired at 1313281235.9221661 = Sat Aug 13 17:20:35 2011.
The dump of request.pck shows the records that are waiting moderator action and should look as I described.
Should be request.pck, not pending.pck.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you for the help Mark. It looks like the request.pck worked.
--
Phil / w2lie Monitor Long Island, Inc. <http://www.monitorlongisland.com/> | W2LIE.net<http://www.w2lie.net/>| LongIslandFirePhotos.com <http://www.longislandfirephotos.com/> <http://www.w2lie.net/charity>
On Mon, Oct 17, 2011 at 11:31 PM, Mark Sapiro <mark@msapiro.net> wrote:
participants (2)
-
Mark Sapiro
-
Phil