FAQ
If you assume Mailman is configured for an organisation as a
hierarchical structure of umbrealla lists.. e.g.:

ALL@ -> Dept1@, Dept2@, Dept3@
Dept1@ -> Dept1admin@, dept1engineers@
Dept2@ -> Dept2admin@, dept2engineers@
Dept3@ -> Dept3admin@, dept3engineers@

When archiving, it can get a bit messy when e-mails to ALL@ get archived
in all of the sub lists the messages pass through.

What I would like to do is filter what gets archived so that if a
message originates in mailman (ie from an umbrella list) it doesn't get
archived.

Any thoughts?

I appreciate this may not be possible.
--
Kind Regards,

__________________________________________________

Mike Peachey, IT
Tel: +44 114 281 2655
Fax: +44 114 281 2951
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
Comp Reg No: 3191371 - Registered In England
http://www.jennic.com
__________________________________________________

Search Discussions

  • Brad Knowles at Aug 1, 2007 at 6:16 pm

    On 8/1/07, Mike Peachey wrote:

    What I would like to do is filter what gets archived so that if a
    message originates in mailman (ie from an umbrella list) it doesn't get
    archived.
    If you write some custom code and put that into the appropriate
    handler, or you write your own custom handler, it should not be
    difficult to achieve what you're looking for. Check the Mailman
    patches page at SourceForge, just in case someone has already done
    the same sort of thing.

    Other than that, I am not personally aware of any obvious ways to
    achieve your goal.

    --
    Brad Knowles <brad at shub-internet.org>, Consultant & Author
    LinkedIn Profile: <http://tinyurl.com/y8kpxu>
    Slides from Invited Talks: <http://tinyurl.com/tj6q4>

    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
  • Mark Sapiro at Aug 2, 2007 at 3:07 am

    Mike Peachey wrote:
    What I would like to do is filter what gets archived so that if a
    message originates in mailman (ie from an umbrella list) it doesn't get
    archived.

    I'm pretty sure this isn't what you're asking for, but you could just
    turn off archiving on all the umbrella lists so the posts are only
    archived in the 'final' lists.

    I know this results in duplicate archived messages for different
    'final' lists, but if I'm a member of listx, I want to see listx posts
    in listx's archive regardless of whether they came directly or via one
    or more umbrellas.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mike Peachey at Aug 2, 2007 at 8:04 am

    Mark Sapiro wrote:
    Mike Peachey wrote:
    What I would like to do is filter what gets archived so that if a
    message originates in mailman (ie from an umbrella list) it doesn't get
    archived.

    I'm pretty sure this isn't what you're asking for, but you could just
    turn off archiving on all the umbrella lists so the posts are only
    archived in the 'final' lists.

    I know this results in duplicate archived messages for different
    'final' lists, but if I'm a member of listx, I want to see listx posts
    in listx's archive regardless of whether they came directly or via one
    or more umbrellas.
    If only it were that easy, the problem I have is that I have list admins
    complaining to me (and my boss' boss) that their archive is polluted
    with messages from top-level lists and they want their archive to just
    contain messages sent directly to their list.
    --
    Kind Regards,

    __________________________________________________

    Mike Peachey, IT
    Tel: +44 114 281 2655
    Fax: +44 114 281 2951
    Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
    Comp Reg No: 3191371 - Registered In England
    http://www.jennic.com
    __________________________________________________
  • Mark Sapiro at Aug 2, 2007 at 2:23 pm

    Mike Peachey wrote:
    If only it were that easy, the problem I have is that I have list admins
    complaining to me (and my boss' boss) that their archive is polluted
    with messages from top-level lists and they want their archive to just
    contain messages sent directly to their list.


    Make a custom handler (see
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.067.htp>)
    that checks mlist.umbrella_list, and if true add an X-No-Archive:
    header to the message. E.g.

    def process(mlist, msg, msgdata):
    if mlist.umbrella_list:
    msg['X-No-Archive'] = 'Yes'

    The handler has to be in the pipeline prior to 'ToArchive'.


    The header

    X-Archive: No

    also works.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mark Sapiro at Aug 3, 2007 at 4:10 am

    Mark Sapiro wrote:
    Make a custom handler (see
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.067.htp>)
    that checks mlist.umbrella_list, and if true add an X-No-Archive:
    header to the message. E.g.

    def process(mlist, msg, msgdata):
    if mlist.umbrella_list:
    msg['X-No-Archive'] = 'Yes'

    The handler has to be in the pipeline prior to 'ToArchive'.

    I should know better than to post code when I'm in a hurry, but ...

    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.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mike Peachey at Aug 6, 2007 at 12:57 pm

    Mark Sapiro wrote:
    Mark Sapiro wrote:
    Make a custom handler (see
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.067.htp>)
    that checks mlist.umbrella_list, and if true add an X-No-Archive:
    header to the message. E.g.

    def process(mlist, msg, msgdata):
    if mlist.umbrella_list:
    msg['X-No-Archive'] = 'Yes'

    The handler has to be in the pipeline prior to 'ToArchive'.

    I should know better than to post code when I'm in a hurry, but ...

    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.

    --
    Kind Regards,

    __________________________________________________

    Mike Peachey, IT
    Tel: +44 114 281 2655
    Fax: +44 114 281 2951
    Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
    Comp Reg No: 3191371 - Registered In England
    http://www.jennic.com
    __________________________________________________
  • Mark Sapiro at Aug 18, 2007 at 9:28 pm

    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
    access.

    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
    X-No-Archive header.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mike Peachey at Aug 20, 2007 at 7:33 am

    Mark Sapiro wrote:
    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
    access.

    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
    X-No-Archive header.
    Thanks for the reply. Since all our lists are archived, this is the way
    we're dealing with it and it has been working well so far.
    --
    Kind Regards,

    __________________________________________________

    Mike Peachey, IT
    Tel: +44 114 281 2655
    Fax: +44 114 281 2951
    Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
    Comp Reg No: 3191371 - Registered In England
    http://www.jennic.com
    __________________________________________________

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedAug 1, '07 at 11:02a
activeAug 20, '07 at 7:33a
posts9
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase