diff options
Diffstat (limited to 'mailman/core')
| -rw-r--r-- | mailman/core/chains.py | 6 | ||||
| -rw-r--r-- | mailman/core/errors.py | 2 | ||||
| -rw-r--r-- | mailman/core/initialize.py | 117 | ||||
| -rw-r--r-- | mailman/core/logging.py | 154 | ||||
| -rw-r--r-- | mailman/core/pipelines.py | 4 | ||||
| -rw-r--r-- | mailman/core/plugins.py | 2 | ||||
| -rw-r--r-- | mailman/core/rules.py | 4 | ||||
| -rw-r--r-- | mailman/core/styles.py | 132 |
8 files changed, 349 insertions, 72 deletions
diff --git a/mailman/core/chains.py b/mailman/core/chains.py index bebbf5bee..ba34a426e 100644 --- a/mailman/core/chains.py +++ b/mailman/core/chains.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2008 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2009 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -17,11 +17,11 @@ """Application support for chain processing.""" +__metaclass__ = type __all__ = [ 'initialize', 'process', ] -__metaclass__ = type from mailman.chains.accept import AcceptChain @@ -30,7 +30,7 @@ from mailman.chains.discard import DiscardChain from mailman.chains.headers import HeaderMatchChain from mailman.chains.hold import HoldChain from mailman.chains.reject import RejectChain -from mailman.configuration import config +from mailman.config import config from mailman.interfaces import LinkAction diff --git a/mailman/core/errors.py b/mailman/core/errors.py index 0704acb4a..e83f32932 100644 --- a/mailman/core/errors.py +++ b/mailman/core/errors.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/mailman/core/initialize.py b/mailman/core/initialize.py new file mode 100644 index 000000000..d7a2fde5a --- /dev/null +++ b/mailman/core/initialize.py @@ -0,0 +1,117 @@ +# Copyright (C) 2006-2009 by the Free Software Foundation, Inc. +# +# This file is part of GNU Mailman. +# +# GNU Mailman is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# GNU Mailman. If not, see <http://www.gnu.org/licenses/>. + +"""Initialize all global state. + +Every entrance into the Mailman system, be it by command line, mail program, +or cgi, must call the initialize function here in order for the system's +global state to be set up properly. Typically this is called after command +line argument parsing, since some of the initialization behavior is controlled +by the command line arguments. +""" + +import os + +from zope.interface.interface import adapter_hooks +from zope.interface.verify import verifyObject + +import mailman.config.config +import mailman.core.logging + +from mailman.core.plugins import get_plugin +from mailman.interfaces import IDatabase + + + +# These initialization calls are separated for the testing framework, which +# needs to do some internal calculations after config file loading and log +# initialization, but before database initialization. Generally all other +# code will just call initialize(). + +def initialize_1(config_path=None, propagate_logs=None): + """First initialization step. + + * The configuration system + * Run-time directories + * The logging subsystem + + :param config_path: The path to the configuration file. + :type config_path: string + :param propagate_logs: Should the log output propagate to stderr? + :type propagate_logs: boolean or None + """ + # By default, set the umask so that only owner and group can read and + # write our files. Specifically we must have g+rw and we probably want + # o-rwx although I think in most cases it doesn't hurt if other can read + # or write the files. Note that the Pipermail archive has more + # restrictive permissions in order to handle private archives, but it + # handles that correctly. + os.umask(007) + mailman.config.config.load(config_path) + # Create the queue and log directories if they don't already exist. + mailman.config.config.ensure_directories_exist() + mailman.core.logging.initialize(propagate_logs) + + +def initialize_2(debug=False): + """Second initialization step. + + * Archivers + * Rules + * Chains + * Pipelines + * Commands + + :param debug: Should the database layer be put in debug mode? + :type debug: boolean + """ + database_plugin = get_plugin('mailman.database') + # Instantiate the database plugin, ensure that it's of the right type, and + # initialize it. Then stash the object on our configuration object. + database = database_plugin() + verifyObject(IDatabase, database) + database.initialize(debug) + mailman.config.config.db = database + # Initialize the rules and chains. Do the imports here so as to avoid + # circular imports. + from mailman.app.commands import initialize as initialize_commands + from mailman.archiving import initialize as initialize_archivers + from mailman.core.chains import initialize as initialize_chains + from mailman.core.pipelines import initialize as initialize_pipelines + from mailman.core.rules import initialize as initialize_rules + # Order here is somewhat important. + initialize_archivers() + initialize_rules() + initialize_chains() + initialize_pipelines() + initialize_commands() + + +def initialize_3(): + """Third initialization step. + + * Adapters + """ + from mailman.app.registrar import adapt_domain_to_registrar + adapter_hooks.append(adapt_domain_to_registrar) + + + +def initialize(config_path=None, propagate_logs=None): + initialize_1(config_path, propagate_logs) + initialize_2() + initialize_3() diff --git a/mailman/core/logging.py b/mailman/core/logging.py new file mode 100644 index 000000000..d1f46f951 --- /dev/null +++ b/mailman/core/logging.py @@ -0,0 +1,154 @@ +# Copyright (C) 2006-2009 by the Free Software Foundation, Inc. +# +# This file is part of GNU Mailman. +# +# GNU Mailman is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# GNU Mailman. If not, see <http://www.gnu.org/licenses/>. + +"""Logging initialization, using Python's standard logging package.""" + +from __future__ import absolute_import + +__metaclass__ = type +__all__ = [ + 'initialize', + 'reopen', + ] + + +import os +import sys +import codecs +import logging +import ConfigParser + +from lazr.config import as_boolean, as_log_level + +from mailman.config import config + + +_handlers = {} + + + +class ReopenableFileHandler(logging.Handler): + """A file handler that supports reopening.""" + + def __init__(self, name, filename): + self.name = name + self._filename = filename + self._stream = self._open() + logging.Handler.__init__(self) + + def _open(self): + return codecs.open(self._filename, 'a', 'utf-8') + + def flush(self): + if self._stream: + self._stream.flush() + + def emit(self, record): + # It's possible for the stream to have been closed by the time we get + # here, due to the shut down semantics. This mostly happens in the + # test suite, but be defensive anyway. + stream = (self._stream if self._stream else sys.stderr) + try: + msg = self.format(record) + fs = '%s\n' + try: + stream.write(fs % msg) + except UnicodeError: + stream.write(fs % msg.encode('string-escape')) + self.flush() + except: + self.handleError(record) + + def close(self): + self.flush() + self._stream.close() + self._stream = None + logging.Handler.close(self) + + def reopen(self, filename=None): + """Reopen the output stream. + + :param filename: If given, this reopens the output stream to a new + file. This is used in the test suite. + :type filename: string + """ + if filename is not None: + self._filename = filename + self._stream.close() + self._stream = self._open() + + + +def initialize(propagate=None): + """Initialize all logs. + + :param propagate: Flag specifying whether logs should propagate their + messages to the root logger. If omitted, propagation is determined + from the configuration files. + :type propagate: bool or None + """ + # First, find the root logger and configure the logging subsystem. + # Initialize the root logger, then create a formatter for all the + # sublogs. The root logger should log to stderr. + logging.basicConfig(format=config.logging.root.format, + datefmt=config.logging.root.datefmt, + level=as_log_level(config.logging.root.level), + stream=sys.stderr) + # Create the subloggers. + for logger_config in config.logger_configs: + sub_name = logger_config.name.split('.')[-1] + if sub_name == 'root': + continue + logger_name = 'mailman.' + sub_name + log = logging.getLogger(logger_name) + # Get settings from log configuration file (or defaults). + log_format = logger_config.format + log_datefmt = logger_config.datefmt + # Propagation to the root logger is how we handle logging to stderr + # when the qrunners are not run as a subprocess of mailmanctl. + log.propagate = (as_boolean(logger_config.propagate) + if propagate is None else propagate) + # Set the logger's level. + log.setLevel(as_log_level(logger_config.level)) + # Create a formatter for this logger, then a handler, and link the + # formatter to the handler. + formatter = logging.Formatter(fmt=log_format, datefmt=log_datefmt) + path_str = logger_config.path + path_abs = os.path.normpath(os.path.join(config.LOG_DIR, path_str)) + handler = ReopenableFileHandler(sub_name, path_abs) + _handlers[sub_name] = handler + handler.setFormatter(formatter) + log.addHandler(handler) + + + +def reopen(): + """Re-open all log files.""" + for handler in _handlers.values(): + handler.reopen() + + + +def get_handler(sub_name): + """Return the handler associated with a named logger. + + :param sub_name: The logger name, sans the 'mailman.' prefix. + :type sub_name: string + :return: The file handler associated with the named logger. + :rtype: `ReopenableFileHandler` + """ + return _handlers[sub_name] diff --git a/mailman/core/pipelines.py b/mailman/core/pipelines.py index c790901b2..bc4a70b87 100644 --- a/mailman/core/pipelines.py +++ b/mailman/core/pipelines.py @@ -1,4 +1,4 @@ -# Copyright (C) 2008 by the Free Software Foundation, Inc. +# Copyright (C) 2008-2009 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -27,7 +27,7 @@ __all__ = [ from zope.interface import implements from zope.interface.verify import verifyObject -from mailman.configuration import config +from mailman.config import config from mailman.core.plugins import get_plugins from mailman.i18n import _ from mailman.interfaces import IHandler, IPipeline diff --git a/mailman/core/plugins.py b/mailman/core/plugins.py index cf22ad377..cce95fddd 100644 --- a/mailman/core/plugins.py +++ b/mailman/core/plugins.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2008 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2009 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # diff --git a/mailman/core/rules.py b/mailman/core/rules.py index 2c1e4fb3b..62c643937 100644 --- a/mailman/core/rules.py +++ b/mailman/core/rules.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2008 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2009 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -26,7 +26,7 @@ __all__ = [ from zope.interface import implements from zope.interface.verify import verifyObject -from mailman.configuration import config +from mailman.config import config from mailman.core.plugins import get_plugins from mailman.interfaces import IRule diff --git a/mailman/core/styles.py b/mailman/core/styles.py index 96104c204..66b8baaf2 100644 --- a/mailman/core/styles.py +++ b/mailman/core/styles.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2008 by the Free Software Foundation, Inc. +# Copyright (C) 2007-2009 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -23,14 +23,17 @@ __all__ = [ 'style_manager', ] +# XXX Styles need to be reconciled with lazr.config. + import datetime from operator import attrgetter from zope.interface import implements from zope.interface.verify import verifyObject +from mailman import Defaults from mailman import Utils -from mailman.configuration import config +from mailman.config import config from mailman.core.plugins import get_plugins from mailman.i18n import _ from mailman.interfaces import ( @@ -54,75 +57,77 @@ class DefaultStyle: # Most of these were ripped from the old MailList.InitVars() method. mlist.volume = 1 mlist.post_id = 1 - mlist.new_member_options = config.DEFAULT_NEW_MEMBER_OPTIONS + mlist.new_member_options = Defaults.DEFAULT_NEW_MEMBER_OPTIONS # This stuff is configurable mlist.real_name = mlist.list_name.capitalize() mlist.respond_to_post_requests = True - mlist.advertised = config.DEFAULT_LIST_ADVERTISED - mlist.max_num_recipients = config.DEFAULT_MAX_NUM_RECIPIENTS - mlist.max_message_size = config.DEFAULT_MAX_MESSAGE_SIZE - mlist.reply_goes_to_list = config.DEFAULT_REPLY_GOES_TO_LIST + mlist.advertised = Defaults.DEFAULT_LIST_ADVERTISED + mlist.max_num_recipients = Defaults.DEFAULT_MAX_NUM_RECIPIENTS + mlist.max_message_size = Defaults.DEFAULT_MAX_MESSAGE_SIZE + mlist.reply_goes_to_list = Defaults.DEFAULT_REPLY_GOES_TO_LIST mlist.reply_to_address = u'' - mlist.first_strip_reply_to = config.DEFAULT_FIRST_STRIP_REPLY_TO - mlist.admin_immed_notify = config.DEFAULT_ADMIN_IMMED_NOTIFY + mlist.first_strip_reply_to = Defaults.DEFAULT_FIRST_STRIP_REPLY_TO + mlist.admin_immed_notify = Defaults.DEFAULT_ADMIN_IMMED_NOTIFY mlist.admin_notify_mchanges = ( - config.DEFAULT_ADMIN_NOTIFY_MCHANGES) + Defaults.DEFAULT_ADMIN_NOTIFY_MCHANGES) mlist.require_explicit_destination = ( - config.DEFAULT_REQUIRE_EXPLICIT_DESTINATION) - mlist.acceptable_aliases = config.DEFAULT_ACCEPTABLE_ALIASES - mlist.send_reminders = config.DEFAULT_SEND_REMINDERS - mlist.send_welcome_msg = config.DEFAULT_SEND_WELCOME_MSG - mlist.send_goodbye_msg = config.DEFAULT_SEND_GOODBYE_MSG + Defaults.DEFAULT_REQUIRE_EXPLICIT_DESTINATION) + mlist.acceptable_aliases = Defaults.DEFAULT_ACCEPTABLE_ALIASES + mlist.send_reminders = Defaults.DEFAULT_SEND_REMINDERS + mlist.send_welcome_msg = Defaults.DEFAULT_SEND_WELCOME_MSG + mlist.send_goodbye_msg = Defaults.DEFAULT_SEND_GOODBYE_MSG mlist.bounce_matching_headers = ( - config.DEFAULT_BOUNCE_MATCHING_HEADERS) + Defaults.DEFAULT_BOUNCE_MATCHING_HEADERS) mlist.header_matches = [] - mlist.anonymous_list = config.DEFAULT_ANONYMOUS_LIST + mlist.anonymous_list = Defaults.DEFAULT_ANONYMOUS_LIST mlist.description = u'' mlist.info = u'' mlist.welcome_msg = u'' mlist.goodbye_msg = u'' - mlist.subscribe_policy = config.DEFAULT_SUBSCRIBE_POLICY - mlist.subscribe_auto_approval = config.DEFAULT_SUBSCRIBE_AUTO_APPROVAL - mlist.unsubscribe_policy = config.DEFAULT_UNSUBSCRIBE_POLICY - mlist.private_roster = config.DEFAULT_PRIVATE_ROSTER - mlist.obscure_addresses = config.DEFAULT_OBSCURE_ADDRESSES - mlist.admin_member_chunksize = config.DEFAULT_ADMIN_MEMBER_CHUNKSIZE - mlist.administrivia = config.DEFAULT_ADMINISTRIVIA - mlist.preferred_language = config.DEFAULT_SERVER_LANGUAGE + mlist.subscribe_policy = Defaults.DEFAULT_SUBSCRIBE_POLICY + mlist.subscribe_auto_approval = ( + Defaults.DEFAULT_SUBSCRIBE_AUTO_APPROVAL) + mlist.unsubscribe_policy = Defaults.DEFAULT_UNSUBSCRIBE_POLICY + mlist.private_roster = Defaults.DEFAULT_PRIVATE_ROSTER + mlist.obscure_addresses = Defaults.DEFAULT_OBSCURE_ADDRESSES + mlist.admin_member_chunksize = Defaults.DEFAULT_ADMIN_MEMBER_CHUNKSIZE + mlist.administrivia = Defaults.DEFAULT_ADMINISTRIVIA + mlist.preferred_language = Defaults.DEFAULT_SERVER_LANGUAGE mlist.include_rfc2369_headers = True mlist.include_list_post_header = True - mlist.filter_mime_types = config.DEFAULT_FILTER_MIME_TYPES - mlist.pass_mime_types = config.DEFAULT_PASS_MIME_TYPES + mlist.filter_mime_types = Defaults.DEFAULT_FILTER_MIME_TYPES + mlist.pass_mime_types = Defaults.DEFAULT_PASS_MIME_TYPES mlist.filter_filename_extensions = ( - config.DEFAULT_FILTER_FILENAME_EXTENSIONS) - mlist.pass_filename_extensions = config.DEFAULT_PASS_FILENAME_EXTENSIONS - mlist.filter_content = config.DEFAULT_FILTER_CONTENT - mlist.collapse_alternatives = config.DEFAULT_COLLAPSE_ALTERNATIVES + Defaults.DEFAULT_FILTER_FILENAME_EXTENSIONS) + mlist.pass_filename_extensions = ( + Defaults.DEFAULT_PASS_FILENAME_EXTENSIONS) + mlist.filter_content = Defaults.DEFAULT_FILTER_CONTENT + mlist.collapse_alternatives = Defaults.DEFAULT_COLLAPSE_ALTERNATIVES mlist.convert_html_to_plaintext = ( - config.DEFAULT_CONVERT_HTML_TO_PLAINTEXT) - mlist.filter_action = config.DEFAULT_FILTER_ACTION + Defaults.DEFAULT_CONVERT_HTML_TO_PLAINTEXT) + mlist.filter_action = Defaults.DEFAULT_FILTER_ACTION # Digest related variables - mlist.digestable = config.DEFAULT_DIGESTABLE - mlist.digest_is_default = config.DEFAULT_DIGEST_IS_DEFAULT - mlist.mime_is_default_digest = config.DEFAULT_MIME_IS_DEFAULT_DIGEST - mlist.digest_size_threshhold = config.DEFAULT_DIGEST_SIZE_THRESHHOLD - mlist.digest_send_periodic = config.DEFAULT_DIGEST_SEND_PERIODIC - mlist.digest_header = config.DEFAULT_DIGEST_HEADER - mlist.digest_footer = config.DEFAULT_DIGEST_FOOTER - mlist.digest_volume_frequency = config.DEFAULT_DIGEST_VOLUME_FREQUENCY + mlist.digestable = Defaults.DEFAULT_DIGESTABLE + mlist.digest_is_default = Defaults.DEFAULT_DIGEST_IS_DEFAULT + mlist.mime_is_default_digest = Defaults.DEFAULT_MIME_IS_DEFAULT_DIGEST + mlist.digest_size_threshold = Defaults.DEFAULT_DIGEST_SIZE_THRESHOLD + mlist.digest_send_periodic = Defaults.DEFAULT_DIGEST_SEND_PERIODIC + mlist.digest_header = Defaults.DEFAULT_DIGEST_HEADER + mlist.digest_footer = Defaults.DEFAULT_DIGEST_FOOTER + mlist.digest_volume_frequency = ( + Defaults.DEFAULT_DIGEST_VOLUME_FREQUENCY) mlist.one_last_digest = {} - mlist.digest_members = {} mlist.next_digest_number = 1 - mlist.nondigestable = config.DEFAULT_NONDIGESTABLE + mlist.nondigestable = Defaults.DEFAULT_NONDIGESTABLE mlist.personalize = Personalization.none # New sender-centric moderation (privacy) options mlist.default_member_moderation = ( - config.DEFAULT_DEFAULT_MEMBER_MODERATION) + Defaults.DEFAULT_DEFAULT_MEMBER_MODERATION) # Archiver - mlist.archive = config.DEFAULT_ARCHIVE - mlist.archive_private = config.DEFAULT_ARCHIVE_PRIVATE + mlist.archive = Defaults.DEFAULT_ARCHIVE + mlist.archive_private = Defaults.DEFAULT_ARCHIVE_PRIVATE mlist.archive_volume_frequency = ( - config.DEFAULT_ARCHIVE_VOLUME_FREQUENCY) + Defaults.DEFAULT_ARCHIVE_VOLUME_FREQUENCY) mlist.emergency = False mlist.member_moderation_action = Action.hold mlist.member_moderation_notice = u'' @@ -130,9 +135,9 @@ class DefaultStyle: mlist.hold_these_nonmembers = [] mlist.reject_these_nonmembers = [] mlist.discard_these_nonmembers = [] - mlist.forward_auto_discards = config.DEFAULT_FORWARD_AUTO_DISCARDS + mlist.forward_auto_discards = Defaults.DEFAULT_FORWARD_AUTO_DISCARDS mlist.generic_nonmember_action = ( - config.DEFAULT_GENERIC_NONMEMBER_ACTION) + Defaults.DEFAULT_GENERIC_NONMEMBER_ACTION) mlist.nonmember_rejection_notice = u'' # Ban lists mlist.ban_list = [] @@ -140,9 +145,9 @@ class DefaultStyle: # 2-tuple of the date of the last autoresponse and the number of # autoresponses sent on that date. mlist.hold_and_cmd_autoresponses = {} - mlist.subject_prefix = _(config.DEFAULT_SUBJECT_PREFIX) - mlist.msg_header = config.DEFAULT_MSG_HEADER - mlist.msg_footer = config.DEFAULT_MSG_FOOTER + mlist.subject_prefix = _(Defaults.DEFAULT_SUBJECT_PREFIX) + mlist.msg_header = Defaults.DEFAULT_MSG_HEADER + mlist.msg_footer = Defaults.DEFAULT_MSG_FOOTER # Set this to Never if the list's preferred language uses us-ascii, # otherwise set it to As Needed if Utils.GetCharSet(mlist.preferred_language) == 'us-ascii': @@ -150,9 +155,9 @@ class DefaultStyle: else: mlist.encode_ascii_prefixes = 2 # scrub regular delivery - mlist.scrub_nondigest = config.DEFAULT_SCRUB_NONDIGEST + mlist.scrub_nondigest = Defaults.DEFAULT_SCRUB_NONDIGEST # automatic discarding - mlist.max_days_to_hold = config.DEFAULT_MAX_DAYS_TO_HOLD + mlist.max_days_to_hold = Defaults.DEFAULT_MAX_DAYS_TO_HOLD # Autoresponder mlist.autorespond_postings = False mlist.autorespond_admin = False @@ -169,19 +174,20 @@ class DefaultStyle: mlist.admin_responses = {} mlist.request_responses = {} # Bounces - mlist.bounce_processing = config.DEFAULT_BOUNCE_PROCESSING - mlist.bounce_score_threshold = config.DEFAULT_BOUNCE_SCORE_THRESHOLD - mlist.bounce_info_stale_after = config.DEFAULT_BOUNCE_INFO_STALE_AFTER + mlist.bounce_processing = Defaults.DEFAULT_BOUNCE_PROCESSING + mlist.bounce_score_threshold = Defaults.DEFAULT_BOUNCE_SCORE_THRESHOLD + mlist.bounce_info_stale_after = ( + Defaults.DEFAULT_BOUNCE_INFO_STALE_AFTER) mlist.bounce_you_are_disabled_warnings = ( - config.DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS) + Defaults.DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS) mlist.bounce_you_are_disabled_warnings_interval = ( - config.DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS_INTERVAL) + Defaults.DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS_INTERVAL) mlist.bounce_unrecognized_goes_to_list_owner = ( - config.DEFAULT_BOUNCE_UNRECOGNIZED_GOES_TO_LIST_OWNER) + Defaults.DEFAULT_BOUNCE_UNRECOGNIZED_GOES_TO_LIST_OWNER) mlist.bounce_notify_owner_on_disable = ( - config.DEFAULT_BOUNCE_NOTIFY_OWNER_ON_DISABLE) + Defaults.DEFAULT_BOUNCE_NOTIFY_OWNER_ON_DISABLE) mlist.bounce_notify_owner_on_removal = ( - config.DEFAULT_BOUNCE_NOTIFY_OWNER_ON_REMOVAL) + Defaults.DEFAULT_BOUNCE_NOTIFY_OWNER_ON_REMOVAL) # This holds legacy member related information. It's keyed by the # member address, and the value is an object containing the bounce # score, the date of the last received bounce, and a count of the @@ -190,7 +196,7 @@ class DefaultStyle: # New style delivery status mlist.delivery_status = {} # NNTP gateway - mlist.nntp_host = config.DEFAULT_NNTP_HOST + mlist.nntp_host = Defaults.DEFAULT_NNTP_HOST mlist.linked_newsgroup = u'' mlist.gateway_to_news = False mlist.gateway_to_mail = False |
