Pre-select defer/accept/discard/reject for all mails
Hi! I'm managing some Mailman based lists and get "some" spam each day. Actually, > 95% of all emails kept for being revised is Spam, and it takes some time to navigate through all of them and click on their "discard" radio button. But changing the default from "defer" to "discard" isn't all that wise either, it may break other people's setup horribly. That is why I thought about having a small table ontop with the four chooses, which fire up a JScript to equally check the radio buttons for all mails in this admindb session. However, I'm not really a Python (nor a JavaScript) hacker, so I've only done that on the emitted HTML code. But maybe you get the idea and can integrate that into Mailman at some day or the other. It would save me quite some time a day:) I'll attach a patch (but only for the HTLM code, if you like the idea, you'll need to figure out where to place that into the .py scripts), the outline is like this: - Have a small JavaScript in the HTLM HEAD area that chooses the appropriate radio box. - Have an additional small FORM (w/o submit button or the like, only to have one more radio button list) to choose defer/accept/reject/discard. - Spend a name for the hugh FORM (containing all moderated emails) to be able to access it from inside the JavaScript. I'm not a JavaScript expert (in fact, I made this by trial and error, so for sure this can be done more elegant:) please don't blame for that... --- mail.html 2004-07-16 23:52:30.000000000 +0200 +++ mail2.html 2004-07-17 14:21:35.000000000 +0200 @@ -4,6 +4,38 @@ <LINK REL="SHORTCUT ICON" HREF="/pictures/mm-icon.png"> <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> <TITLE>Linux Administrative Database</TITLE> +<script language="javascript"> +function StatusChange(offset) { + var extra_elements_start = 1; // In one table of emails, + // there's one input element + // before the table of + // emails: the "Submit" + // button. + var extra_elements_stop = 1; // Also, there's a "Submit" + // button at the end + var elements_per_mail = 13; // There are 13 input-like + // fields per mail. + var nth_element_within_mail = 1;// The what-to-do element + // within one email is the + // 1st element. + var number_of_chooses = 4; // leave, discard, accept, reject + var element_counter; + var element_number_within_email; + var e = document.emails.elements; + + for (element_counter = 0; element_counter < e.length ; element_counter++) { + if (element_counter <= (extra_elements_start - 1)) + continue; + if (element_counter >= (e.length - extra_elements_stop - 1)) + break; + element_number_within_email = (element_counter - extra_elements_start) % elements_per_mail; + if (element_number_within_email >= number_of_chooses) + continue; + if (((element_number_within_email - (nth_element_within_mail - 1)) % number_of_chooses) == offset) + e[element_counter].checked = 1; + } +} +</script> </HEAD> <BODY bgcolor="white"> <h2>Administrative requests for mailing list: <em>Linux</em></h2>This page contains a summary of the current set of administrative @@ -21,7 +53,27 @@ <p>You can also <a href="http://lug-owl.de/cgi-bin/mailman/admindb/linux?details=all">view the details</a> of all held postings. -<FORM action="http://lug-owl.de/cgi-bin/mailman/admindb/linux" method="POST" > +<FORM name="chooseall"> + <p>However, you can do moderation pre-discard all emails here + and accept some later on: + <table border> + <tr> + <th>Defer</th> + <th>Accept</th> + <th>Reject</th> + <th>Discard</th> + </tr> + <tr> + <td><INPUT name="chooseall" type="RADIO" value="0" onClick="StatusChange(0)"></td> + <td><INPUT name="chooseall" type="RADIO" value="1" onClick="StatusChange(1)"></td> + <td><INPUT name="chooseall" type="RADIO" value="2" onClick="StatusChange(2)"></td> + <td><INPUT name="chooseall" type="RADIO" value="3" onClick="StatusChange(3)"></td> + </tr> + </table> +</FORM> +<hr> + +<FORM name="emails" action="http://lug-owl.de/cgi-bin/mailman/admindb/linux" method="POST" > <center><INPUT name="submit" type="SUBMIT" value="Submit All Data" ></center> <table BORDER="0"> <tr> MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
At 2:25 PM +0200 2004-07-17, Jan-Benedict Glaw wrote:
I'm not a JavaScript expert (in fact, I made this by trial and error, so for sure this can be done more elegant:) please don't blame for that...
For those who are interested, my understanding is that these
issues can also be handled via the "dispose" command-line tool that I recently mentioned here, or the "bulk-vette" program that David Champion recently mentioned. See the archives of the mailman-developers list for more information.
Also note that you can incorporate anti-spam/anti-virus filtering
programs such as SpamAssassin into your MTA or called via procmail before delivery to Mailman, and then use Mailman's built-in spam processing features to automatically detect and toss the majority of the spam you get.
See the Mailman FAQ for more information on these alternative methods.
Please note that I'm not saying that what you've provided here is
not useful.
Indeed, I think that this is a good idea for a web-oriented way
to handle the same sorts of things as the "dispose" or "bulk-vette" scripts, and I think it's good to have multiple different ways to solve the same problems.
-- Brad Knowles, <brad.knowles@skynet.be>
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin (1706-1790), reply of the Pennsylvania
Assembly to the Governor, November 11, 1755
SAGE member since 1995. See <http://www.sage.org/> for more info.
On Sat, 2004-07-17 15:15:27 +0200, Brad Knowles <brad.knowles@skynet.be> wrote in message <p060020d0bd1ed5d3d21b@[10.0.1.3]>:
At 2:25 PM +0200 2004-07-17, Jan-Benedict Glaw wrote:
I'm not a JavaScript expert (in fact, I made this by trial and error, so for sure this can be done more elegant:) please don't blame for that...
Also note that you can incorporate anti-spam/anti-virus filtering programs such as SpamAssassin into your MTA or called via procmail before delivery to Mailman, and then use Mailman's built-in spam processing features to automatically detect and toss the majority of the spam you get.
Already done:) If that wasn't done, I couldn't do much work besides throwing away spam all the day!
Indeed, I think that this is a good idea for a web-oriented way to handle the same sorts of things as the "dispose" or "bulk-vette" scripts, and I think it's good to have multiple different ways to solve the same problems.
As I said, that's just my idea for a (IMHO good) extension of the web frontend.
MfG, JBG
-- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
On Jul 17, 2004, at 8:25 AM, Jan-Benedict Glaw wrote:
I'm managing some Mailman based lists and get "some" spam each day. Actually, > 95% of all emails kept for being revised is Spam, and it takes some time to navigate through all of them and click on their "discard" radio button. But changing the default from "defer" to "discard" isn't all that wise either, it may break other people's setup horribly. That is why I thought about having a small table ontop with the four chooses, which fire up a JScript to equally check the radio buttons for all mails in this admindb session.
I love the idea, since this question comes up pretty frequently (link to FAQ and contents of that entry below).
This sounds a little nicer than the checkbox we've got in 2.1.5 (again, see below), but is Javascript going to be more of a pain to support?
FAQ Entry:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.026.htp
"3.26. Is there an easy way to discard all messages waiting to be reviewed? If you have a list where non members can post but their messages are moderated, you'll have to deal with a lot of spam. After sometime, just a small percentage of them will be good posts. It's boring to click to discard each messages. A better solution is to approve the good ones, and use a javascript link to mark to discard all.
First, open your bookmark manager and add the following link as an URL:
javascript:var el=document.forms[0].elements;for (var i=0; i<el.length;i++) if (el[i].type=='radio' && el[i].value==3) void(el[i].checked=true);
Now visit the moderation page, and visit the bookmark. All the messages will be marked to discard, just press the button.
I've tested it just with mozilla, but it should work in all browser versions that support javascript links.
For Mailman 2.1.5, we find the following update which is mentioned in the mailman-2.1.5/NEWS file:
- The admindb page has a checkbox that allows you to discard all
held messages that are marked Defer. On heavy lists with lots of spam holds, this makes clearing them much faster."
On Sat, 2004-07-17 16:32:07 -0400, Terri Oda <terri@zone12.com> wrote in message <5F386FB0-D830-11D8-B97F-000D934FBF38@zone12.com>:
On Jul 17, 2004, at 8:25 AM, Jan-Benedict Glaw wrote:
I'm managing some Mailman based lists and get "some" spam each day. Actually, > 95% of all emails kept for being revised is Spam, and it takes some time to navigate through all of them and click on their "discard" radio button. But changing the default from "defer" to "discard" isn't all that wise either, it may break other people's setup horribly. That is why I thought about having a small table ontop with the four chooses, which fire up a JScript to equally check the radio buttons for all mails in this admindb session.
I love the idea, since this question comes up pretty frequently (link to FAQ and contents of that entry below).
This sounds a little nicer than the checkbox we've got in 2.1.5 (again, see below), but is Javascript going to be more of a pain to support?
For now, my personal opinion is that it isn't really hard to support. If the user has JS activated, he'll get a bonus of saved time here, if not, everything works as it did yesterday.
The script I posted is made up so that it can easily be bend to work for other layout of input boxes, as long as all mails get an equal number of input fields.
For sure, there are even better methods to do that, but I'm not a JS expert at all:)
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.026.htp
First, open your bookmark manager and add the following link as an URL:
javascript:var el=document.forms[0].elements;for (var i=0; i<el.length;i++) if (el[i].type=='radio' && el[i].value==3) void(el[i].checked=true);
That'd work, too, but (German wording, don't know an equivalent English message) that's "durch die Brust in's Auge geschossen".
For Mailman 2.1.5, we find the following update which is mentioned in the mailman-2.1.5/NEWS file:
- The admindb page has a checkbox that allows you to discard all
held messages that are marked Defer. On heavy lists with lots of spam holds, this makes clearing them much faster."
So you first approve all legitimate emails, get a new legitimate email and discard all spam inclusive the last legitimate mail you just got.
Don't really like that idea because of that li'l race...
MfG, JBG
-- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
On Jul 18, 2004, at 4:43 AM, Jan-Benedict Glaw wrote:
For Mailman 2.1.5, we find the following update which is mentioned in the mailman-2.1.5/NEWS file: - The admindb page has a checkbox that allows you to discard all held messages that are marked Defer. On heavy lists with lots of spam holds, this makes clearing them much faster." So you first approve all legitimate emails, get a new legitimate email and discard all spam inclusive the last legitimate mail you just got.
Don't really like that idea because of that li'l race...
Well, you *could* do it that way... but I would assume that people go through the list, mark all the ones they want to accept/reject, then hit the checkbox so the others are discarded. No race.
Terri
On Sun, 18 Jul 2004, Jan-Benedict Glaw wrote:
So you first approve all legitimate emails, get a new legitimate email and discard all spam inclusive the last legitimate mail you just got.
Don't really like that idea because of that li'l race...
I agree. From a user interface perspective, there should be a direct and chronologically linked connection between decisions made and actions that result.
The descisions to be made right now are "which of these are worth letting through right now" "which of these do I need to come back to to decide upon later" "which of these do I know right now I want to reject" "which of these do I know right now I want to discard".
I haven't looked at the code, so I don't know this will necessarily work, but I bet we could start off that set of radio buttons in none of the states without diseffecting the server-side processing. I propose that we leave the same 4 radio buttons, but have 4 corresponding selections at the bottom for Do THIS (for the four values of THIS: Defer, Accept, Reject, Discard) to all unmarked ones. (or correspondingly at the top "default all answers to THIS.) This makes all the decisions immediate. As you look at an entry, you decide what it's fate should be. Depending on your list you might want any of the actions to happen to "most" messages, and only pick out the oddballs for other actions. It prevents there being potential for other messages coming in inbetween two loads of the page and painting that new message with the wide brush reserved for spam or whatever category you're sweeping with this time via javascript.
I propose two ways this can work, and it will work whether or not people have javascript turned on. The buttons at the top/bottom can be javascript that flips all the other radio buttons into the same position (assuming they still are in the "none" default state), and is itself submitted so the python code can know what the user expected the default to be. So the javascript is just making the decision that the python code will already make visible to the end user immediately.
This is very similar to what we already have in 2.1.5. Basically I would just expand the "Discard all messages marked Defer" checkbox into a whole additional section with all the choices that can be made for any--this then turns into a "set everything to THIS" global section. So one could do anything from forwarding all messages to someone or banning all posters represented from subscribing to the list. Any decision that can be made on an individual basis can now be made globally (for all the messages/posters/etc. currently presented as being in the admindb).
-Dale
participants (4)
-
Brad Knowles
-
Dale Newfield
-
Jan-Benedict Glaw
-
Terri Oda