diff options
| author | bwarsaw | 2006-07-08 17:58:13 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-07-08 17:58:13 +0000 |
| commit | f321ff8f419284c32f7eea4e06c83212bccef6b0 (patch) | |
| tree | 7e1d1e1a1b8b81a48d86afb5c47eb039529993ac /Mailman/bin/update.py | |
| parent | 7a94dcd001240e0c06cc4b50017b8bfd097d9ff4 (diff) | |
| download | mailman-f321ff8f419284c32f7eea4e06c83212bccef6b0.tar.gz mailman-f321ff8f419284c32f7eea4e06c83212bccef6b0.tar.zst mailman-f321ff8f419284c32f7eea4e06c83212bccef6b0.zip | |
First crack at real virtual domain support, i.e. mailing lists with the same
name in more than one domain.
- Totally eradicate MAILMAN_SITE_LIST, and in fact the entire need for a site
list. The functions that the site list previously performed are either
removed or supported in other ways. For example, instead of forwarding
owner bounces to the site list, we now have a SITE_OWNER_ADDRESS which
should point to a human, and such bounces are sent there instead. There's
also a "no reply" email address that should be set up to go to devnull. For
any message that never expects a reply, the sender is set to this address.
- Remove the Site.py module. It was an experimental approach to trying to
support virtual domains, and we're going to do it so much better now that
this module is no longer necessary. Site._makedirs() -> Utils.makedir().
- VIRTUAL_HOST_OVERVIEW is completely removed, since now virtual hosts are
always enabled. Virtual domains should be added to mailman.cfg by using the
new add_domain() function. add_virtualhost() is gone. If no virtual
domains are added explicitly, we add the default one that configure guessed
(but we never add that if domains are added explicitly).
- Utils.get_domain() -> Utils.get_request_domain()
- withlist code cleanup and make sure that we load etc/mailman.cfg
- A new base exception called MailmanException is added, from which all
exceptions defined in Errors.py ultimately derive. MailmanError is retained
and derives from MailmanException.
- BadDomainSpecificationError is added.
- Remove the -V/--virtual-host-overview option from list_lists and add instead
-d/--domain and -f/--full.
- bin/update probably works but needs more testing.
- bin/newlist and bin/rmlist take fqdn list names, but default to the default
domain if @whatever isn't given. newlist's -u/--urlhost and -e/--emailhost
options are removed. The domain that the list is being added to must
already exist.
- Minor code cleanup in Message.py
- Bump version to 2.2.0a1
- The Configuration object grows a .domain dictionary which maps email hosts
to url hosts. The reverse mapping is supported, but not directly; use
Configuration.get_email_host() instead.
- Mailman/Cgi/create is converted from mm_cfg to config, and some minor code
cleanup is performed. Also, convert to __i18n_templates__ = True.
- New MailList APIs:
+ property .fqdn_listname
+ GetNoReplyEmail()
+ Create() API changes and refactoring.
Diffstat (limited to 'Mailman/bin/update.py')
| -rw-r--r-- | Mailman/bin/update.py | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/Mailman/bin/update.py b/Mailman/bin/update.py index ea74abfd6..36812dcf8 100644 --- a/Mailman/bin/update.py +++ b/Mailman/bin/update.py @@ -196,6 +196,23 @@ def move_language_templates(mlist): +def situate_list(listname): + # This turns the directory called 'listname' into a directory called + # 'listname@domain'. Start by finding out what the domain should be. + # A list's domain is its email host. + mlist = MailList.MailList(listname, lock=False) + fullname = mlist.fqdn_listname + oldpath = os.path.join(config.VAR_PREFIX, 'lists', listname) + newpath = os.path.join(config.VAR_PREFIX, 'lists', fullname) + if os.path.exists(newpath): + print >> sys.stderr, _('WARNING: could not situate list: $listname') + else: + os.rename(oldpath, newpath) + print _('situated list $listname to $fullname') + return fullname + + + def dolist(listname): mlist = MailList.MailList(listname, lock=False) try: @@ -672,10 +689,8 @@ Exiting.""") if not listnames: print _('no lists == nothing to do, exiting') return - # - # for people with web archiving, make sure the directories + # For people with web archiving, make sure the directories # in the archiving are set with proper perms for b6. - # if os.path.isdir("%s/public_html/archives" % config.PREFIX): print _("""\ fixing all the perms on your old html archives to work with b6 @@ -684,8 +699,12 @@ If your archives are big, this could take a minute or two...""") archive_path_fixer, "") print _('done') for listname in listnames: + # With 2.2.0a0, all list names grew an @domain suffix. If you find a + # list without that, move it now. + if not '@' in listname: + listname = situate_list(listname) print _('Updating mailing list: $listname') - errors = errors + dolist(listname) + errors += dolist(listname) print print _('Updating Usenet watermarks') wmfile = os.path.join(config.DATA_DIR, 'gate_watermarks') |
