~launchpad-pqm/launchpad/devel

8687.15.4 by Karl Fogel
Add the copyright header block to more files; tweak format in a few files.
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
8255.3.2 by Barry Warsaw
Add a bin/withlist script to fix existing mailing lists.
3
4
"""Disable bounce processing in all existing mailing lists.
5
6
This fixes bug 363217 for existing mailing lists.  New lists will
7
automatically have bounce processing disabled via the new default option
8
9
DEFAULT_BOUNCE_PROCESSING = No
10
11
Run like so:
12
13
    PYTHONPATH=utilities lib/mailman/bin/withlist -l -a -r mlist_no_bounce.fix
14
15
You can ignore the final warning you will get that looks something like this:
16
17
Unlocking (but not saving) lists: whatever
18
"""
19
20
__metaclass__ = type
21
__all__ = [
22
    'fix',
23
    ]
24
25
26
def fix(mlist):
27
    mlist.bounce_processing = False
28
    mlist.Save()