![](https://secure.gravatar.com/avatar/e6f40b83e480344956f34b57bd7b702c.jpg?s=120&d=mm&r=g)
Hello,
I've just started playing with Mailman on a virtual hosting solution. I decided to write about it in the 'developers' mailing lists because I am ready to make some changes to the code and publish them.
I know you're working on Mailman 3.x series but it's not ready yet (correct me if I'm wrong) and I would like to have a solution now.
First thing that surprised me is that Mailman doesn't support virtual hosting. The second one was that documentation claimes it does. Even the simplest test, creation of lists with same names under different domains shows 2.x vhost support is simply broken.
There are several modified versions of Mailman that claim to support vhosts. Mark Sapiro's version didn't work for me (most commands resulted in errors). It could have been broken by merging upstream code.
https://code.launchpad.net/~msapiro/mailman/vhost
There is a pretty good resource with patches at koumbit.net (in French):
https://wiki.koumbit.net/VirtualMailman
I tried to apply the 2.1.13 patch to Debian Squeeze's Mailman installation. And it sort of works. You can at least create the mailing lists now, which is good.
Postfix virtual alias generator doesn't work. Mails are usually sent with wrong list e-mail addresses (the translated ones, not the public ones), so it's rather broken. But sending and recieving mail works.
I would like to know if there's anyone else interested in getting Mailman 2.x to support a feature the documentation already claims to support.
Testing, links to resources, code, and help with getting it official is welcome.
Pavel Šimerda
![](https://secure.gravatar.com/avatar/173371753ea2206b9934a9be1bdce423.jpg?s=120&d=mm&r=g)
Hi Pavel, thanks for writing this up for the benefit of other users. I just want to comment on one thing.
On Jun 24, 2011, at 03:06 PM, Pavel Šimerda wrote:
First thing that surprised me is that Mailman doesn't support virtual hosting. The second one was that documentation claimes it does. Even the simplest test, creation of lists with same names under different domains shows 2.x vhost support is simply broken.
Can you point to where the documentation makes this claim? It's painfully well-known that same-list-different-domains is not supported by default in Mailman 2.x. If there's official documentation that claims otherwise, we need to fix that.
I would like to know if there's anyone else interested in getting Mailman 2.x to support a feature the documentation already claims to support.
Testing, links to resources, code, and help with getting it official is welcome.
I would oppose making this feature official in Mailman 2.x. It's much better to help get Mailman 3 to releasable state. I think it's fine if you need a solution right now, to work on, and publish unofficial patches for Mailman 2.x.
Cheers, -Barry
![](https://secure.gravatar.com/avatar/e6f40b83e480344956f34b57bd7b702c.jpg?s=120&d=mm&r=g)
Hi Barry,
I'm sorry I couldn't write earlier.
On Fri, 2011-06-24 at 16:29 -0400, Barry Warsaw wrote:
Hi Pavel, thanks for writing this up for the benefit of other users. I just want to comment on one thing.
On Jun 24, 2011, at 03:06 PM, Pavel Šimerda wrote:
First thing that surprised me is that Mailman doesn't support virtual hosting. The second one was that documentation claimes it does. Even the simplest test, creation of lists with same names under different domains shows 2.x vhost support is simply broken.
Can you point to where the documentation makes this claim? It's painfully well-known that same-list-different-domains is not supported by default in Mailman 2.x. If there's official documentation that claims otherwise, we need to fix that.
The official documentation doesn't explicitly claim it. But there's a section about setting up virtual domains that doesn't warn that virtual domain implementation is incomplete:
http://www.gnu.org/s/mailman/mailman-install/postfix-virtual.html
I, as a seasoned user of Postfix, Apache, and other virtualized server software, but new user of Mailman, can confirm, that this documentation made me think mailman fully supports virtual hosting. Unfortunately, there are other resources on the web that are similarly confusing.
With most of the patches already working, it doesn't look too hard to add full virtual domain support to Mailman 2.x via address rewriting. I fixed more issues on my installation myself.
Any way, I'd be very pleased if the documentation is “fixed”, even if its brokennes is not obvious to people who have lived with Mailman for long time.
I would like to know if there's anyone else interested in getting Mailman 2.x to support a feature the documentation already claims to support.
Testing, links to resources, code, and help with getting it official is welcome.
I would oppose making this feature official in Mailman 2.x. It's much better to help get Mailman 3 to releasable state. I think it's fine if you need a solution right now, to work on, and publish unofficial patches for Mailman 2.x.
If Mailman 3 is comming soon, I could stay with the current, semi-functional state (combination of Mailman 2.x, downloaded patches and some local fixes) and switch to Mailman 3 when it's ready (possibly help with bugreports and some fixes, as I know a bit of Python).
Any timelines?
Pavel
Cheers, -Barry
Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/pavlix%40pavlix.ne...
Security Policy: http://wiki.list.org/x/QIA9
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 7/6/2011 8:29 AM, Pavel Šimerda wrote:
The official documentation doesn't explicitly claim it. But there's a section about setting up virtual domains that doesn't warn that virtual domain implementation is incomplete:
http://www.gnu.org/s/mailman/mailman-install/postfix-virtual.html
I have added a note to the above that attempts to clarify this.
I, as a seasoned user of Postfix, Apache, and other virtualized server software, but new user of Mailman, can confirm, that this documentation made me think mailman fully supports virtual hosting. Unfortunately, there are other resources on the web that are similarly confusing.
If any of those resources are under control of the GNU Mailman project, and you tell us where they are, I will attempt to clarify them too.
With most of the patches already working, it doesn't look too hard to add full virtual domain support to Mailman 2.x via address rewriting. I fixed more issues on my installation myself.
It might not be hard. Perhaps you could tell us exactly what you did to give us something to work with.
However, please keep in mind that Mailman 2.1 is at the end of its life. The development focus is currently on Mailman 3. It is not a good use of development resources to implement a significant new feature in 2.1 that would undoubtedly lead to additional bug reports that would need to be addressed.
I think a better approach would be to incorporate whatever additional fixes are necessary into the existing <https://code.launchpad.net/~msapiro/mailman/vhost> branch, or for you to publish your changes as an alternative branch.
Any way, I'd be very pleased if the documentation is “fixed”, even if its brokennes is not obvious to people who have lived with Mailman for long time.
What do you think of the change I made?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e6f40b83e480344956f34b57bd7b702c.jpg?s=120&d=mm&r=g)
On Fri, 2011-07-08 at 15:32 -0700, Mark Sapiro wrote:
On 7/6/2011 8:29 AM, Pavel Šimerda wrote:
The official documentation doesn't explicitly claim it. But there's a section about setting up virtual domains that doesn't warn that virtual domain implementation is incomplete:
http://www.gnu.org/s/mailman/mailman-install/postfix-virtual.html
I have added a note to the above that attempts to clarify this.
You were quick, thank you very much.
I, as a seasoned user of Postfix, Apache, and other virtualized server software, but new user of Mailman, can confirm, that this documentation made me think mailman fully supports virtual hosting. Unfortunately, there are other resources on the web that are similarly confusing.
If any of those resources are under control of the GNU Mailman project, and you tell us where they are, I will attempt to clarify them too.
I believe these other places were outside the Mailman project.
With most of the patches already working, it doesn't look too hard to add full virtual domain support to Mailman 2.x via address rewriting. I fixed more issues on my installation myself.
It might not be hard. Perhaps you could tell us exactly what you did to give us something to work with.
Ok, but I haven't made proper patches (yet). And these are quick and dirty fixes I made directly in the installed *.py files.
I've made some changes to /var/lib/mailman/Mailman/MTA/Postfix.py to fix badly generated alias files for postfix:
144 print >> fp, '# STANZA START:', listname 145 print >> fp, '# CREATED:', time.ctime(time.time()) 146 # Now add all the standard alias entries 147 #### Fixed by pavlix@pavlix.net 148 if (mlist.host_name): 149 for ext in ('', '-admin', '-bounces', '-confirm', '-join', '-leave', 150 '-owner', '-request', '-subscribe', '-unsubscribe'): 151 fqdnaddr = '%s%s@%s' % (mlist.real_name, ext, mlist.host_name) 152 target = '%s-%s%s' % (mlist.real_name, mlist.host_name, ext) 153 badfqdnaddr = '%s@%s' % (target, mlist.host_name) 154 # Format the text file nicely 155 print >> fp, fqdnaddr, ((fieldsz - len(target)) * ' '), target 156 print >> fp, badfqdnaddr, ((fieldsz - len(target)) * ' '), target 157 # Finish the text file stanza 158 print >> fp, '# STANZA END:', listname 159 print >> fp
And I fixed apparently broken part of /usr/lib/mailman/Mailman/MailList.py to include the correct address inside the messages:
187 def getListAddress(self, extra=None): 188 #### pavlix@pavlix.net # return '%s-%s@%s' % (self.internal_name(), extra, self.host_name) 189 posting_addr = self.internal_name() 190 try: 191 posting_addr = self.real_name.lower() 192 except: 193 pass 194 if extra is None: 195 return '%s@%s' % (posting_addr, self.host_name) 196 return '%s-%s@%s' % (posting_addr, extra, self.host_name)
Please don't forget that I made these changes to Debian's Mailman package using patches from:
https://wiki.koumbit.net/VirtualMailman
However, please keep in mind that Mailman 2.1 is at the end of its life. The development focus is currently on Mailman 3. It is not a good use of development resources to implement a significant new feature in 2.1 that would undoubtedly lead to additional bug reports that would need to be addressed.
I think a better approach would be to incorporate whatever additional fixes are necessary into the existing <https://code.launchpad.net/~msapiro/mailman/vhost> branch, or for you to publish your changes as an alternative branch.
It sounds like a good idea. I actually tried to download from this branch first, but it didn't work for me (I don't remember the details, but AFAIK even the basic commands like newlist failed).
I'll try to look at your version history and see what can be done to merge our modifications, when I have a little bit more time.
Any way, I'd be very pleased if the documentation is “fixed”, even if its brokennes is not obvious to people who have lived with Mailman for long time.
What do you think of the change I made?
It's perfect, IMO.
Pavel
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 7/8/2011 5:49 PM, Pavel Šimerda wrote:
On Fri, 2011-07-08 at 15:32 -0700, Mark Sapiro wrote:
Ok, but I haven't made proper patches (yet). And these are quick and dirty fixes I made directly in the installed *.py files.
I've made some changes to /var/lib/mailman/Mailman/MTA/Postfix.py to fix badly generated alias files for postfix:
144 print >> fp, '# STANZA START:', listname 145 print >> fp, '# CREATED:', time.ctime(time.time()) 146 # Now add all the standard alias entries 147 #### Fixed by pavlix@pavlix.net 148 if (mlist.host_name): 149 for ext in ('', '-admin', '-bounces', '-confirm', '-join', '-leave', 150 '-owner', '-request', '-subscribe', '-unsubscribe'): 151 fqdnaddr = '%s%s@%s' % (mlist.real_name, ext, mlist.host_name) 152 target = '%s-%s%s' % (mlist.real_name, mlist.host_name, ext) 153 badfqdnaddr = '%s@%s' % (target, mlist.host_name) 154 # Format the text file nicely 155 print >> fp, fqdnaddr, ((fieldsz - len(target)) * ' '), target 156 print >> fp, badfqdnaddr, ((fieldsz - len(target)) * ' '), target 157 # Finish the text file stanza 158 print >> fp, '# STANZA END:', listname 159 print >> fp
And I fixed apparently broken part of /usr/lib/mailman/Mailman/MailList.py to include the correct address inside the messages:
187 def getListAddress(self, extra=None): 188 #### pavlix@pavlix.net # return '%s-%s@%s' % (self.internal_name(), extra, self.host_name) 189 posting_addr = self.internal_name() 190 try: 191 posting_addr = self.real_name.lower() 192 except: 193 pass 194 if extra is None: 195 return '%s@%s' % (posting_addr, self.host_name) 196 return '%s-%s@%s' % (posting_addr, extra, self.host_name)
Please don't forget that I made these changes to Debian's Mailman package using patches from:
I have just pushed some changes to the <https://code.launchpad.net/~msapiro/mailman/vhost> branch. I don't think this branch ever had the issue you fixed in MailList.py.
It turns out it did have an issue with MTA/Postfix.py caused by the merge of post 2.1.13 changes. I have now fixed that and merged additional 2.1 branch changes, and I think bin/genaliases together with Mailman/MTA/Postfix.py is working properly in the vhost branch at rev 848.
I think a better approach would be to incorporate whatever additional fixes are necessary into the existing <https://code.launchpad.net/~msapiro/mailman/vhost> branch, or for you to publish your changes as an alternative branch.
It sounds like a good idea. I actually tried to download from this branch first, but it didn't work for me (I don't remember the details, but AFAIK even the basic commands like newlist failed).
newlist would have failed after creating a virtual domain list because of the problem with MTA/Postfix.py. Other than that, I think it worked OK, but it is somewhat awkward. To create a virtual domain list you must use
bin/newlist listname@email.domain
and if the list's web domain is not lists.email.domain, you must use
bin/newlist -u web.domain listname@email.domain
This is not explained well in the newlist help text.
I'll try to look at your version history and see what can be done to merge our modifications, when I have a little bit more time.
That would be great.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 6/24/2011 6:06 AM, Pavel Šimerda wrote:
First thing that surprised me is that Mailman doesn't support virtual hosting. The second one was that documentation claimes it does. Even the simplest test, creation of lists with same names under different domains shows 2.x vhost support is simply broken.
As Barry said, please point out where in the documentation it says that Mailman 2.1 supports lists with the same name in different domains.
There are several modified versions of Mailman that claim to support vhosts. Mark Sapiro's version didn't work for me (most commands resulted in errors). It could have been broken by merging upstream code.
If you are saying that it the above branch could have been broken by merging of post 2.1.13 upstream changes, I don't think so, but if it was, I'll try to fix it. I think it's more likely that things are poorly documented, particularly bin/newlist, which if I recall correctly is very unintuitive in the vhost branch.
Please note that the description of this branch says:
If you use this branch and encounter problems and report those problems to mailman-users@python.org, I may fix them, but only if they are easy to fix.
I realize this statement is not highly encouraging, but I am willing to help. If you tell me specifically what the issues are, I will at least look at them.
There is a pretty good resource with patches at koumbit.net (in French):
https://wiki.koumbit.net/VirtualMailman
I tried to apply the 2.1.13 patch to Debian Squeeze's Mailman installation. And it sort of works. You can at least create the mailing lists now, which is good.
By the "2.1.13 patch", do you mean the one from <https://wiki.koumbit.net/VirtualMailman>?
Postfix virtual alias generator doesn't work. Mails are usually sent with wrong list e-mail addresses (the translated ones, not the public ones), so it's rather broken. But sending and recieving mail works.
I would like to know if there's anyone else interested in getting Mailman 2.x to support a feature the documentation already claims to support.
I am willing to put some effort into this, but I don't want to start with a set of patches I've never seen before. The work I've done on the existing branch at <https://code.launchpad.net/~msapiro/mailman/vhost> was done because someone was trying to use the virtual hosting patches from Hans Ulrich Niedermann described at <http://mail.python.org/pipermail/mailman-developers/2006-March/018629.html> and was having difficulty. I fixed all the problems I was made aware of at that time and have subsequently fixed more problems as I was made aware of them. Since I don't actually use that branch, I am unlikely to find problems with it on my own.
I would rather try to fix issues with my existing branch and keep it up with the official 2.1 branch than start over with a different implementation. However, If the <https://wiki.koumbit.net/VirtualMailman> patch is significantly closer to a well documented, working solution, I'd consider helping fix its remaining problems.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Barry Warsaw
-
Mark Sapiro
-
Pavel Šimerda