Fwd: Re: [Mailman-Users] Virtual Domains

Chuck Dale bug at aphid.net
Fri Jul 21 18:12:41 CEST 2000


Here are the excellent virtual domain instructions from David Sexton.

Someone should make a web page about this - (no not me! ;? )

Considering that it is so popular and all..

Chuck

----- Forwarded message from David Sexton <david.sexton at sapphire.net> -----

Date: Wed, 08 Mar 2000 15:48:07 +0000
From: David Sexton <david.sexton at sapphire.net>
Subject: Re: [Mailman-Users] Virtual Domains
To: mailman-users at python.org

"Sergio A. Murillo" wrote:
> 
> I've been trying to configure Mailman to work with a virtual domain on a web
> server with serveral virtual domains. I read  William R. Dickson sugestion
> of installing a copy of mailman for each of the virtual domains.
> How do i do this?/?? I've been traying all week now and still no luck...

        This is the way I have it done (I'm not 100% certain of the
        security/reliability of this but it has worked so far):

        I have one user set-up purely for mailman and mailman is
        installed in that user's directory & web space. All the
        administration for the lists are done through this one URL
        (although it may be possible to put wrappers around this).

        Onto the 'meat'...

        I'm assuming that you have set up the mail aliases and virtual
        user table in the following manner:-

        virtusertable:

        <list-name>@<domain>            list-<list-name>
        <list-name>-admin@<domain>      list-<list-name>-admin
        <list-name>-request@<domain>    list-<list-name>-request
        <list-name>-owner@<domain>      list-<list-name>-admin

        aliases:

        list-<list-name>:               "|wrapper post <list-name>"
        list-<list-name>-admin:         "|wrapper mailowner <list-name>"
        list-<list-name>-request:       "|wrapper mailcmd <list-name>"

        To change the domain of the list, you would go into the admin
        screen and change the host name of the list. This will allow you
        to successfully set-up & use list1 at domain1.com &
        list2 at domain2.com.

        Is this perfect? No.

        This would work until you needed two lists of the same 'name'
        eg: announce at domain1.com and announce at domain2.com

        A workaround for this is to embed the domain name into the list
        name and create lists like the following:- domain1-com-announce
        & domain2-com-announce

        This now looks really clunky as the list would be at
        domain1-com-announce at domain1.com etc.

        But .. if you mangle the entries in virtusertable, incoming mail
        works ....

        virtusertable announce at domain1.com
        list-domain1-com-announce announce at domain2.com
        list-domain2-com-announce .. do a similar thing for the request
        & admin etc.  addresses.

        aliases list-domain1-com-announce:      "|wrapper post
        domain1-com-announce" list-domain2-com-announce:      "|wrapper
        post domain2-com-announce" <etc. etc>

        Now we're *almost* there. The addresses that mailman puts into
        messages it sends out will contain the full list name
        (domain2-com-announce at domain2) , not the short version you want.
        Back in the mailman admin screens, there is a field that in the
        public name of a list. It seems to indicate that mailman will
        use this name when generating addresses but changing this only
        does half the job.

        I've hacked around a bit with MailList.py and got much better
        reults.  If you apply the attached patch and change the 'public
        name' for the lists, it should work.

        ** NOTE ** I have very little experience of Python (I'm a perler
        at heart) and almost no appreciation of the structure of Mailman
        so I cannot guarrantee that these changes will not foul
        everything up. The docs say that you should not change the
        public name of a list and, although it is working so far, I am
        not totally sure of the implications of this.

        Hope this helps,

        Dave

--- MailList.py	Sat Oct 30 02:11:48 1999
+++ /home/sites/home/users/admin/MailList.py	Thu Feb  3 08:55:24 2000
@@ -117,7 +117,7 @@
                 self.members[string.lower(addr)] = addr
 
     def GetAdminEmail(self):
-        return '%s-admin@%s' % (self._internal_name, self.host_name)
+        return '%s-admin@%s' % (string.lower(self.real_name), self.host_name)
 
     def GetMemberAdminEmail(self, member):
         """Usually the member addr, but modified for umbrella lists.
@@ -159,15 +159,15 @@
         return None
 
     def GetRequestEmail(self):
-	return '%s-request@%s' % (self._internal_name, self.host_name)
+	return '%s-request@%s' % (string.lower(self.real_name), self.host_name)
 
     def GetListEmail(self):
-	return '%s@%s' % (self._internal_name, self.host_name)
+	return '%s@%s' % (string.lower(self.real_name), self.host_name)
 
     def GetListIdentifier(self):
         """Return the unique (RFC draft-chandhok-listid-02) identifier."""
         return ("%s <%s.%s>" %
-                (self.description, self._internal_name, self.host_name))
+                (self.description, string.lower(self.real_name), self.host_name))
 
     def GetRelativeScriptURL(self, script_name):
 	prefix = '../' * Utils.GetNestingLevel()


----- End forwarded message -----

               [ charles hamilton dale <bug at aphid.net> ]




More information about the Mailman-Users mailing list