[Mailman-Developers] Re: A RELEASED Mailman 2.1 beta 2

David Champion dgc@uchicago.edu
Mon, 6 May 2002 12:43:34 -0500


Just a quickie while I'm in between crises:


* On 2002.05.06, in <B8FC0A5C.31044%chuqui@plaidworks.com>,
*	"Chuq Von Rospach" <chuqui@plaidworks.com> wrote:
> I would, by the way, do two of these: a pre-filter and a post-filter. The

Delivery filter and archiving filter? A little clearer in intent. Good
idea.

Along these lines, it might be nice if the site op could set up certain
filters (or handlers) and make them available at the discretion of the
list admin, with the flick of a checkbox. Technically we can do that
now, but it would be nice if just by defining the filter, the checkbox
is automatically made available in the admin pages.

$ cat /path/to/mailman/filters/braindump.filter
##
## Anything ending in *.filter is a filter definition file.
##
## %s is the basename of the file, minus ".filter"
DESCRIPTION=The %s filter removes the word 'foo' in mail messages.
##
## Booleans control whether to pass the header or body or both to the filter.
FILTERHEADER=false
FILTERBODY=true
##
## Is this filter available for delivery filtration?
DELIVERY=true
##
## ... for archival filtration?
ARCHIVE=true
##
## $EXEC sets a command line to accept a message on stdin
## and process to stdout
EXEC=/usr/local/foo-filter
##
## Or alternatively, write it in python and execute it in the same process.
## if there's a CALLBACK setting, then "from $CALLBACK import Filter" or
## something.
#CALLBACK=/usr/local/foo-filter.py

This would automatically place into the admin pages:

--------
Filter Options:

Description                                             Value
Enable the braindump filter? The braindump filter	[x] yes  [ ] no
removes the word 'foo' in mail messages.
--------

The list admin wouldn't need to be knowledgeable of unix or the
particular system hosting the list if the site op can set up some common
wishlist filters.


-- 
 -D.	dgc@uchicago.edu	NSIT	University of Chicago