From e5a96f14fb0fe8196e7b3ea0306c9f57f45c3110 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 3 Jan 2009 05:13:41 -0500 Subject: - For command line scripts, -C names the configuration file to use. For convenient testing, if -C is not given, then the environment variable MAILMAN_CONFIG_FILE is consulted. - Mailing lists no longer have a .web_page_url attribute; this is taken from the mailing list's domain's base_url attribute. - Incoming MTA selection is now taken from the config file instead of plugins. An MTA for Postfix+LMTP is added. bin/genaliases works again. - The LMTP server now properly calculates the message's original size. - If a message has no Message-ID, the stock archivers will return None for the permalink now instead of raising an assertion. - IArchiver no longer has an is_enabled property; this is taken from the configuration file now. - In bin/create_list, fixed a unicode problem when the language is defined in the configuration file. - Fixed bin/dumbdb, bin/list_lists, bin/remove_list, bin/unshunt, and bin/mailmanctl - config.archivers is a property now, not a dictionary that needs initialization from plugins. - IMailTransportAgent interface has been added. --- mailman/config/config.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mailman/config/config.py') diff --git a/mailman/config/config.py b/mailman/config/config.py index 3f717d3be..cbdea2aea 100644 --- a/mailman/config/config.py +++ b/mailman/config/config.py @@ -54,7 +54,6 @@ class Configuration(object): self._config = None self.filename = None # Create various registries. - self.archivers = {} self.chains = {} self.rules = {} self.handlers = {} @@ -174,9 +173,21 @@ class Configuration(object): @property def qrunner_configs(self): + """Iterate over all the qrunner configuration sections.""" for section in self._config.getByCategory('qrunner', []): yield section + @property + def archivers(self): + """Iterate over all the enabled archivers.""" + for section in self._config.getByCategory('archiver', []): + if not as_boolean(section.enable): + continue + class_path = section['class'] + module_name, class_name = class_path.rsplit('.', 1) + __import__(module_name) + yield getattr(sys.modules[module_name], class_name)() + @property def header_matches(self): """Iterate over all spam matching headers. -- cgit v1.2.3-70-g09d2