On Mon, 9 Dec 2002, Martin Pool <mbp@samba.org>
wrote:>
>Mailman holds some suspicious messages for filtering by the admin.
>However, for samba.org, this means about 80 messages per week, which
>have to be handled through a clunky web interface, and which take time
>away from more useful tasks. This is not acceptable.
Pah! :) Try 100+ messages per day, with 200+ at the peak of various
virus 'releases'. 99.5% of 'held' messages were
spam/virus-related mail.
So I modified our mailman to do two things for the held messages page:
- Make the default 'discard' instead of 'defer'.
- Add a link at the end of the button row to advance to the next item.
Now it's a snap to work through the messages. That next item link is
in the same position on subsequent renderings, so just keep the mouse
in the same place and click to advance to the next item if you want to
discard the current one.
Here's the patch to Mailman/Cgi/admindb.py if you are interested
(it also includes a fix to escape html in the message excerpt):
$ diff -c admindb.py.orig admindb.py
*** admindb.py.orig Wed Jul 25 13:46:29 2001
--- admindb.py Sat Jun 22 17:48:09 2002
***************
*** 218,227 ****
buttons = Table(cellspacing="5", cellpadding="0")
buttons.AddRow(map(lambda x, s=' '*5: s+x+s,
('Defer', 'Approve', 'Reject',
'Discard')))
! buttons.AddRow([Center(RadioButton(id, mm_cfg.DEFER, 1)),
Center(RadioButton(id, mm_cfg.APPROVE, 0)),
Center(RadioButton(id, mm_cfg.REJECT, 0)),
! Center(RadioButton(id, mm_cfg.DISCARD, 0)),
])
t.AddRow([Bold('Action:'), buttons])
t.AddCellInfo(row+3, col-1, align='right')
--- 218,229 ----
buttons = Table(cellspacing="5", cellpadding="0")
buttons.AddRow(map(lambda x, s=' '*5: s+x+s,
('Defer', 'Approve', 'Reject',
'Discard')))
! buttons.AddRow([Center(RadioButton(id, mm_cfg.DEFER, 0)),
Center(RadioButton(id, mm_cfg.APPROVE, 0)),
Center(RadioButton(id, mm_cfg.REJECT, 0)),
! Center(RadioButton(id, mm_cfg.DISCARD, 1)),
! ## 02-May-2002 JVE Add link to name tag at end
! Link('#Item%03d' % (count+1), 'Next
Item'),
])
t.AddRow([Bold('Action:'), buttons])
t.AddCellInfo(row+3, col-1, align='right')
***************
*** 250,259 ****
row, col = t.GetCurrentRowIndex(), t.GetCurrentCellIndex()
t.AddCellInfo(row, col-1, align='right')
t.AddRow([Bold('Message Excerpt:'),
! TextArea('fulltext-%d' % id, text, rows=10, cols=80)])
t.AddCellInfo(row+1, col-1, align='right')
form.AddItem(t)
form.AddItem('<p>')
--- 252,264 ----
row, col = t.GetCurrentRowIndex(), t.GetCurrentCellIndex()
t.AddCellInfo(row, col-1, align='right')
t.AddRow([Bold('Message Excerpt:'),
! ## 21-Jan-2002 JVE Escape html in text to prevent display problems
! TextArea('fulltext-%d' % id, cgi.escape(text), rows=10,
cols=80)])
t.AddCellInfo(row+1, col-1, align='right')
form.AddItem(t)
form.AddItem('<p>')
+ ## 02-May-2002 JVE Add name tag at end
+ form.AddItem('\n<a name="Item%03d">\n' %
(count+1))
Hope this helps.
--
John Van Essen Univ of MN Alumnus <vanes002@umn.edu>