
Hi list-ees,
After googling and searching the list archives, haven't been able to find an answer to: how could I approve all messeages (around hundred of'em) held for moderation due to one reason or another? I could manually approve some of them with "confirm in subject and approved:password message", but there are PLENTY of old ones held for more than 3 days in queue.
I suppose it has to be done via /bin/withlist and a script, or is there another solution?
TIA, Alexei.

Alexx wrote:
So far as I know, there is no method for doing this. You can discard all messages that are held for moderation, but there's no "approve all messages" option.
You could always hack the source code yourself to add such a feature, if you were so inclined.
-- Brad Knowles <brad@shub-internet.org> LinkedIn Profile: <http://tinyurl.com/y8kpxu>

Alexx wrote:
Assuming the admindb web interface is working, you could go there and approve the posts.
Otherwise, you can modify bin/discard to approve the posts rather than discard them.
See <http://wiki.list.org/x/nIA9> for some information on the usage of bin/discard.
If you look at the bin/discard script, near the end you will see
mlist.HandleRequest(id, mm_cfg.DISCARD, '', False, False, '')
(actually indented more than above). If you change mm_cfg.DISCARD to mm_cfg.APPROVE, the script will approve held posts rather than discard them.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
And if you want a script to work with that, here's one I wrote for greasemonkey (a firefox add-on that lets you script parts of your interface). You'll have to alter the @include line so it contains your own site address. This would probably work better as a bookmarklet, if someone wants to convert it.
You'll still have to click "submit" yourself (which gives you a chance to review if you want) but it will move all the defaults to be "accept"
// ==UserScript== // @name Approve all Mailman posts // @description Terri Oda's lazy way to approve all postings // @namespace http://terri.zone12.com // @include http://mailman.linuxchix.org/mailman/admindb/* // ==/UserScript==
var inputs = document.getElementsByTagName("input");
for (var i=0; i < inputs.length; i++){ if(inputs[i].type == 'radio' && inputs[i].name.indexOf("senderaction-") == 0 && inputs[i].value == 1){ inputs[i].checked = true; } } // End script

Terri Oda wrote:
Here's a bookmarklet version of the script I posted earlier. Just bookmark this stupidly long string and then when you're viewing your admin page, click the bookmark to move every box over to "Accept" -- should simplify the task some.
javascript:function%20approveAll(){var%20inputs=document.getElementsByTagName("input");for(var%20i=0;i<inputs.length;i++){if(inputs[i].type=='radio'&&inputs[i].name.indexOf("senderaction-")==0&&inputs[i].value==1){inputs[i].checked=true;}}};approveAll()
I expect the stupidly long string is going to get line-wrapped, so you'll probably need to stick it back together. I've only tested it in Firefox 3, but it's pretty basic JavaScript so it will likely work in other browsers.
Terri

Terri Oda пишет:
Thanks, Terri!
And sorry for not replying right away.
Unfortunately I don't have access to the web interface, because of the Group mismatch error.
So currently this leaves me with the command line administration only.
So, thanks again, will use your advice once I transfer mailman web interface onto the other server.
Cheers, Alexei.

Alexei Altuhov wrote:
Unfortunately I don't have access to the web interface, because of the Group mismatch error.
We can help you fix that. How did you install Mailman? From our source or from a vendors package?
Give us the details, and we'll try to help.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
Mailman has been installed by one of our admins from the repository, as usual. The thing is, that he has installed Asterix afterwards and as I understood from now on all cgi scripts are run from the asterix group rather than the mailman one.
Is it possible to change that or divide, which cgi scripts will be executed from the mailman group and which ones from the mailman - I couldn't figure out by myself and that left me with the command line administration.
So, if you need more details in order to resolve this, I'd be happy to provide it!
Thanks for trying to help,
Alexei.

Алексей Алтухов wrote:
This seems to say you installed someone's package from a package repository as opposed to installing from our source.
If you installed from source, the way to fix this is to re-run configure with the addition of the option "--with-cgi-gid=asterix" and then run "make install". The alternative is to configure the web server (is this Asterix?) to run the Mailman CGI wrappers as the group they expect, but I gather this is not possible in your case.
Most packaged versions of Mailman have a way to tell the CGI wrappers what group to expect, but how you do that is specific to the package. You need to ask the packager. I.e., if this is a RedHat or CentOS rpm, ask on a RedHat list or see other RedHat support resources; if Debian or Ubuntu, check those support resources, etc.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro пишет:
Sorry for misspelling the name of the SW: it's Asterisk, open source PBX. And the web server is Apache 2.x.
I learned from the beginning, that if Mailman is installed from source it would have been easier to cope with the group mismatch problem, but...
Admin installed Mailman from the RHEL rpm, so, thanks for the pointer, I'll try to find answers from that community. (I knew it's good I subscribed to CentOS list earlier! =) )
Thanks again, all the best,
Alexei.

Alexx wrote:
So far as I know, there is no method for doing this. You can discard all messages that are held for moderation, but there's no "approve all messages" option.
You could always hack the source code yourself to add such a feature, if you were so inclined.
-- Brad Knowles <brad@shub-internet.org> LinkedIn Profile: <http://tinyurl.com/y8kpxu>

Alexx wrote:
Assuming the admindb web interface is working, you could go there and approve the posts.
Otherwise, you can modify bin/discard to approve the posts rather than discard them.
See <http://wiki.list.org/x/nIA9> for some information on the usage of bin/discard.
If you look at the bin/discard script, near the end you will see
mlist.HandleRequest(id, mm_cfg.DISCARD, '', False, False, '')
(actually indented more than above). If you change mm_cfg.DISCARD to mm_cfg.APPROVE, the script will approve held posts rather than discard them.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
And if you want a script to work with that, here's one I wrote for greasemonkey (a firefox add-on that lets you script parts of your interface). You'll have to alter the @include line so it contains your own site address. This would probably work better as a bookmarklet, if someone wants to convert it.
You'll still have to click "submit" yourself (which gives you a chance to review if you want) but it will move all the defaults to be "accept"
// ==UserScript== // @name Approve all Mailman posts // @description Terri Oda's lazy way to approve all postings // @namespace http://terri.zone12.com // @include http://mailman.linuxchix.org/mailman/admindb/* // ==/UserScript==
var inputs = document.getElementsByTagName("input");
for (var i=0; i < inputs.length; i++){ if(inputs[i].type == 'radio' && inputs[i].name.indexOf("senderaction-") == 0 && inputs[i].value == 1){ inputs[i].checked = true; } } // End script

Terri Oda wrote:
Here's a bookmarklet version of the script I posted earlier. Just bookmark this stupidly long string and then when you're viewing your admin page, click the bookmark to move every box over to "Accept" -- should simplify the task some.
javascript:function%20approveAll(){var%20inputs=document.getElementsByTagName("input");for(var%20i=0;i<inputs.length;i++){if(inputs[i].type=='radio'&&inputs[i].name.indexOf("senderaction-")==0&&inputs[i].value==1){inputs[i].checked=true;}}};approveAll()
I expect the stupidly long string is going to get line-wrapped, so you'll probably need to stick it back together. I've only tested it in Firefox 3, but it's pretty basic JavaScript so it will likely work in other browsers.
Terri

Terri Oda пишет:
Thanks, Terri!
And sorry for not replying right away.
Unfortunately I don't have access to the web interface, because of the Group mismatch error.
So currently this leaves me with the command line administration only.
So, thanks again, will use your advice once I transfer mailman web interface onto the other server.
Cheers, Alexei.

Alexei Altuhov wrote:
Unfortunately I don't have access to the web interface, because of the Group mismatch error.
We can help you fix that. How did you install Mailman? From our source or from a vendors package?
Give us the details, and we'll try to help.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
Mailman has been installed by one of our admins from the repository, as usual. The thing is, that he has installed Asterix afterwards and as I understood from now on all cgi scripts are run from the asterix group rather than the mailman one.
Is it possible to change that or divide, which cgi scripts will be executed from the mailman group and which ones from the mailman - I couldn't figure out by myself and that left me with the command line administration.
So, if you need more details in order to resolve this, I'd be happy to provide it!
Thanks for trying to help,
Alexei.

Алексей Алтухов wrote:
This seems to say you installed someone's package from a package repository as opposed to installing from our source.
If you installed from source, the way to fix this is to re-run configure with the addition of the option "--with-cgi-gid=asterix" and then run "make install". The alternative is to configure the web server (is this Asterix?) to run the Mailman CGI wrappers as the group they expect, but I gather this is not possible in your case.
Most packaged versions of Mailman have a way to tell the CGI wrappers what group to expect, but how you do that is specific to the package. You need to ask the packager. I.e., if this is a RedHat or CentOS rpm, ask on a RedHat list or see other RedHat support resources; if Debian or Ubuntu, check those support resources, etc.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro пишет:
Sorry for misspelling the name of the SW: it's Asterisk, open source PBX. And the web server is Apache 2.x.
I learned from the beginning, that if Mailman is installed from source it would have been easier to cope with the group mismatch problem, but...
Admin installed Mailman from the RHEL rpm, so, thanks for the pointer, I'll try to find answers from that community. (I knew it's good I subscribed to CentOS list earlier! =) )
Thanks again, all the best,
Alexei.
participants (6)
-
Alexei Altuhov
-
Alexx
-
Brad Knowles
-
Mark Sapiro
-
Terri Oda
-
Алексей Алтухов