summaryrefslogtreecommitdiff
path: root/Mailman/Queue
diff options
context:
space:
mode:
authorbwarsaw2006-07-08 17:58:13 +0000
committerbwarsaw2006-07-08 17:58:13 +0000
commitf321ff8f419284c32f7eea4e06c83212bccef6b0 (patch)
tree7e1d1e1a1b8b81a48d86afb5c47eb039529993ac /Mailman/Queue
parent7a94dcd001240e0c06cc4b50017b8bfd097d9ff4 (diff)
downloadmailman-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/Queue')
-rw-r--r--Mailman/Queue/BounceRunner.py13
-rw-r--r--Mailman/Queue/IncomingRunner.py2
-rw-r--r--Mailman/Queue/MaildirRunner.py4
-rw-r--r--Mailman/Queue/Runner.py2
4 files changed, 11 insertions, 10 deletions
diff --git a/Mailman/Queue/BounceRunner.py b/Mailman/Queue/BounceRunner.py
index 93bee2062..9e1a34bf5 100644
--- a/Mailman/Queue/BounceRunner.py
+++ b/Mailman/Queue/BounceRunner.py
@@ -177,16 +177,17 @@ class BounceRunner(Runner, BounceMixin):
# we'll simply log the problem and attempt to deliver the message to
# the site owner.
#
- # All messages to list-owner@vdom.ain have their envelope sender set
- # to site-owner@dom.ain (no virtual domain). Is this a bounce for a
+ # All messages sent to list owners have their sender set to the site
+ # owner address. That way, if a list owner address bounces, at least
+ # some human has a chance to deal with it. Is this a bounce for a
# message to a list owner, coming to the site owner?
- if msg.get('to', '') == Utils.get_site_email(extra='owner'):
+ if msg.get('to', '') == config.SITE_OWNER_ADDRESS:
# Send it on to the site owners, but craft the envelope sender to
- # be the -loop detection address, so if /they/ bounce, we won't
+ # be the noreply address, so if the site owner bounce, we won't
# get stuck in a bounce loop.
outq.enqueue(msg, msgdata,
- recips=[Utils.get_site_email()],
- envsender=Utils.get_site_email(extra='loop'),
+ recips=[config.SITE_OWNER_ADDRESS],
+ envsender=config.NO_REPLY_ADDRESS,
)
# List isn't doing bounce processing?
if not mlist.bounce_processing:
diff --git a/Mailman/Queue/IncomingRunner.py b/Mailman/Queue/IncomingRunner.py
index 332c9f129..efd7072d8 100644
--- a/Mailman/Queue/IncomingRunner.py
+++ b/Mailman/Queue/IncomingRunner.py
@@ -115,6 +115,8 @@ class IncomingRunner(Runner):
QDIR = config.INQUEUE_DIR
def _dispose(self, mlist, msg, msgdata):
+ if msgdata.get('envsender') is None:
+ msg['envsender'] = mlist.GetNoReplyEmail()
# Try to get the list lock.
try:
mlist.Lock(timeout=config.LIST_LOCK_TIMEOUT)
diff --git a/Mailman/Queue/MaildirRunner.py b/Mailman/Queue/MaildirRunner.py
index 9e5e08be5..e253f3506 100644
--- a/Mailman/Queue/MaildirRunner.py
+++ b/Mailman/Queue/MaildirRunner.py
@@ -162,8 +162,8 @@ class MaildirRunner(Runner):
queue = get_switchboard(config.CMDQUEUE_DIR)
elif subq == 'owner':
msgdata.update({
- 'toowner': 1,
- 'envsender': Utils.get_site_email(extra='bounces'),
+ 'toowner': True,
+ 'envsender': config.SITE_OWNER_ADDRESS,
'pipeline': config.OWNER_PIPELINE,
})
queue = get_switchboard(config.INQUEUE_DIR)
diff --git a/Mailman/Queue/Runner.py b/Mailman/Queue/Runner.py
index 95cb3fd43..bdb811a3a 100644
--- a/Mailman/Queue/Runner.py
+++ b/Mailman/Queue/Runner.py
@@ -132,8 +132,6 @@ class Runner:
#
# Find out which mailing list this message is destined for.
listname = msgdata.get('listname')
- if not listname:
- listname = config.MAILMAN_SITE_LIST
mlist = self._open_list(listname)
if not mlist:
log.error('Dequeuing message destined for missing list: %s',