[Mailman-Users] Is it possible to filter what is archived?
msapiro at value.net
Sat Aug 18 23:28:39 CEST 2007
Mike Peachey wrote:
>Mark Sapiro wrote:
>> The above is a bit too simple. Something like
>> def process(mlist, msg, msgdata):
>> if mlist.umbrella_list:
>> del msg['x-no-archive']
>> msg['X-No-Archive'] = 'Yes'
>> is probably better to avoid creating multiple X-No-Archive: headers.
>> Also, if you insert the handler prior to 'ToArchive', the message (any
>> message to an umbrella list) will not be archived at all. If you
>> insert the handler after 'ToArchive' but prior to 'ToOutgoing', the
>> message will be archived in the archive of the first umbrella list it
>> hits, but won't be archived in any subsequent lists which is probably
>> more like what you want.
>This is just what I need, thank you!
>However it seems that the "if mlist.umbrella_list:" statement is
>superfluous. On the assumption that the handler is being inserted AFTER
>the first archiving, then surely it's safe to assume that no message
>should be archived a second time and so ALL messages should get an
>X-No-Archive as soon as they've been archived once.
>Let me know if I'm off base here.
Sorry for the long delay in replying. I have been away with no online
You are correct for what you want to accomplish. I.e. if you only want
any message to be archived once in the archive of the first list it
hits, then it is safe to add the X-No-Archive header to all messages
after ToArchive and before ToOutging. However, there may be other
cases where one might have a list (e.g. mailman-users at python.org)
which is not an umbrella list and which has, e.g. a mail-archive.com
or some other external archive address as a member to provide a
searchable archive or some other archiving benefit, and in this case,
one wouldn't want to send the message to the external archiver with an
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users