[Mailman-Developers] [Mailman-checkins] SF.net SVN: mailman: [8041] trunk/mailman/Mailman
Tokio Kikuchi
tkikuchi at is.kochi-u.ac.jp
Wed Sep 27 04:35:06 CEST 2006
bwarsaw at users.sourceforge.net wrote:
> Revision: 8041
> http://svn.sourceforge.net/mailman/?rev=8041&view=rev
> Author: bwarsaw
> Date: 2006-09-25 00:53:58 -0700 (Mon, 25 Sep 2006)
>
> Log Message:
> -----------
> Another milestone: you can now post to lists. Converted the following to use
> the new configuration object: admin, admindb, bounces, confirm, inject, join,
> leave, owner, post, request, unshunt, version.
>
> Also change MailList.GetScriptURL() to return the list's fully qualified name
> in links.
>
I've tested a bit.
Postfix.py: got duplicate warning while creating virtual-mailman.
Shouldn't we include hostname in aliases? Otherwise, true virtual
hosting breaks.
MailList.py: got error when name is None. Looks like full_path is
hostname at listname order. Is this name + '@' + self.host_name?
I needed this patch to create new lists:
mailman at colinux:~/src/svn.trunk$ svn diff Mailman
Index: Mailman/MTA/Postfix.py
===================================================================
--- Mailman/MTA/Postfix.py (revision 8041)
+++ Mailman/MTA/Postfix.py (working copy)
@@ -142,8 +142,9 @@
print >> fp, '# CREATED:', time.ctime(time.time())
# Now add all the standard alias entries
for k, v in makealiases(mlist):
+ fqdnaddr = '%s@%s' % (k, hostname)
# Format the text file nicely
- print >> fp, mlist.fqdn_listname, ((fieldsz - len(k)) * ' '), k
+ print >> fp, fqdnaddr, ((fieldsz - len(k)) * ' '), k
# Finish the text file stanza
print >> fp, '# STANZA END:', listname
print >> fp
Index: Mailman/MailList.py
===================================================================
--- Mailman/MailList.py (revision 8041)
+++ Mailman/MailList.py (working copy)
@@ -287,14 +287,17 @@
os.path.join(config.LOCK_DIR, name or '<site>') + '.lock',
lifetime=config.LIST_LOCK_LIFETIME)
# XXX FIXME Sometimes name is fully qualified, sometimes it's not.
- if '@' in name:
- self._internal_name, self.host_name = name.split('@', 1)
- self._full_path = os.path.join(config.LIST_DATA_DIR, name)
- else:
- self._internal_name = name
- self.host_name = config.DEFAULT_EMAIL_HOST
- self._full_path = os.path.join(config.LIST_DATA_DIR,
- self.host_name + '@' + name)
+ if name:
+ if '@' in name:
+ self._internal_name, self.host_name = name.split('@', 1)
+ self._full_path = os.path.join(config.LIST_DATA_DIR, name)
+ else:
+ self._internal_name = name
+ self.host_name = config.DEFAULT_EMAIL_HOST
+ self._full_path = os.path.join(config.LIST_DATA_DIR,
+ self.host_name + '@' + name)
+ else:
+ self._full_path = ''
# Only one level of mixin inheritance allowed
for baseclass in self.__class__.__bases__:
if hasattr(baseclass, 'InitTempVars'):
--
Tokio Kikuchi, tkikuchi at is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/
More information about the Mailman-Developers
mailing list