[Mailman-Users] default action on administrative requests

Heath Raftery hraftery at myrealbox.com
Wed Jul 30 16:06:02 CEST 2003


Hi Hal,

On Wednesday, July 30, 2003, at 11:36  AM, Hal Huntley wrote:
>
> I have a list that gets more spam than legit email. I would like to 
> have the
> "Action to take on all these held messages" on the 
> "admindb/<listname>" page
> to have a default of "discard" instead of "defer". This way I can 
> quickly
> scan the "baddies" and then "submit all data" once I see they are all 
> spam;
> no clicking on the "Discard" radio button.

Not a definitive answer, but I've found the following in 
Mailman/Mailman/Cgi/admindb.py:

radio = RadioButtonArray(id, (_('Defer'),
                               _('Approve'),
                               _('Reject'),
                               _('Discard')),
                                  values=(mm_cfg.DEFER,
                                          mm_cfg.SUBSCRIBE,
                                          mm_cfg.REJECT,
                                          mm_cfg.DISCARD),
                                  checked=0).Format()

I reckon (but have not confirmed) that you could change the checked=0 
bit to
checked=4 for Approve
checked=2 for Reject
checked=3 for Discard

(got these values from the HTML source generated in a typical 
Administrative Requests page)

This seems to put a CHECKED flag in the <INPUT> tag, which I'm not 
actually sure is valid HTML. My reading seems to suggest that a 
value="Yes" is required instead. If that is not visible, then the 
standard is unclear. One version says the user agent should select the 
first radio button in the group, so you may want to try rearranging the 
order of the buttons in the RadioButtonArray above instead.

> Right now, I also wish this behavior for one list only, not as a 
> default for
> all the lists that I have.

Hmm, dunno about that!

Hope that helps, tell us how you go!
Heath
-- 
  ________________________________________________________
|   Heath Raftery                                        |
|   hraftery at myrealbox.com                               |
|   *There's nothing like a depressant to cheer you up*  |
|                       - Heard at Moe's Tavern          |
|                                         _\|/_          |
|________________________________________m(. .)m_________|





More information about the Mailman-Users mailing list