[Mailman-Developers] Mailman 2.x Virtual Hosting
Mark Sapiro
mark at msapiro.net
Sun Jul 10 02:41:03 CEST 2011
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 at 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 at 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
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 at email.domain
and if the list's web domain is not lists.email.domain, you must use
bin/newlist -u web.domain listname at 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 at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Developers
mailing list