Great Circle Associates Majordomo-Users
(February 2001)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Virtual Hosting
From: Dan Liston <dliston @ netscape . com>
Organization: iPlanet eCommerce Solutions, A Sun|Netscape Alliance
Date: Wed, 28 Feb 2001 22:44:20 -0600
To: Tom Rawson <trawson @ jpsoft . com>
Cc: majordomo-users @ GreatCircle . COM
References: <3A9D3D9C.11341.2599BDB9@localhost>

Here is something I sent out last April. (with a couple
slight modifications)  Perhaps this message can even serve
as a cut & paste boiler plate.

If I have domain.net hosting domain1.com and domain2.org ...

My majordomo home directory is /usr/majordomo.  
(This is the location of wrapper and the perl scripts.)

My lists, files (archives), digest_work, and filter 
directories are all subdirectories of /var/majordomo/domain#.

I have separate majordomo.cf files for each domain defining 
$whereami and the deeper subdirectory locations for lists, 
archives, and digests. 

The host domain admin is still responsible for all changes
and additions to the virtusertable and aliases file(s).

In case of word wrap, all new lines begin with #

#Majordomo.cf modifications
#
#I add $virtdir variable
#$virtdir = "/var/majordomo/domain";
#$whereami = "domain.net";
#       $homedir = "/usr/majordomo";
#$listdir = "$virtdir/lists";
#$digest_work_dir = "$virtdir/digest";
#$log = "$virtdir/Log";
#$filedir = "$virtdir/archive";
#$filedir_suffix = "";
#$majordomo_request = 1; # my preference
#$max_which_hits = 1; # my preference again
#$TMPDIR = $ENV{'TMPDIR'} || "/var/tmp"; # my pref

If these settings were all in your default majordomo.cf 
for your primary domain, you could copy it to each 
virtdomain directory and only have to edit the top two 
variables ($virtdir and $whereami) any time you add 
another domain.  In otherwords, for domain1.com I just 
change $virtdir to /var/majordomo/domain1, and $whereami 
to domain1.com.  All the rest stays the same.  For 
domain2.org, change $virtdir to /var/majordomo/domain2
nad $whereami to domain2.org.
Each of these /var/majordomo directories must be set up
with a majordomo.cf, and directories called lists, filters,
digest, and archive.  The digest and list directories
each get subdirectories named after each majordomo list
hosted for the virtual domain.

Assuming sendmail is configured to support virtual domains
and each hosted domain is listed in sendmail.cw,

#Virtusertable entries for test list in each domain;
#
#test@domain1.com               domain1-test
#owner-test@domain1.com         owner-domain1-test
#test-owner@domain1.com         domain1-test-owner
#test-request@domain1.com       domain1-test-request
#test-approval@domain1.com      domain1-test-approval
#test-digest@domain1.com        domain1-test-digest
#owner-test-digest@domain1.com  owner-domain1-test-digest
#test-digest-owner@domain1.com  domain1-test-digest-owner
#test-digest-request@domain1.com domain1-test-digest-request
#test-digest-approval@domain1.com domain1-test-digest-approval
#
#test@domain2.org               domain2-test
#owner-test@domain2.org         owner-domain2-test
#test-owner@domain2.org         domain2-test-owner
#test-request@domain2.org       domain2-test-request
#test-approval@domain2.org      domain2-test-approval
#test-digest@domain2.org        domain2-test-digest
#owner-test-digest@domain2.org  owner-domain2-test-digest
#test-digest-owner@domain2.org  domain2-test-digest-owner
#test-digest-request@domain2.org domain2-test-digest-request
#test-digest-approval@domain2.org domain2-test-digest-approval

#alias file entries for test lists (match RHS virtusertable)
#
#domain1-test: "|/usr/majordomo/wrapper resend -C /var/majordomo/domain1/majordomo.cf -l test -h domain1.com domain1-test-outgoing,nobody"
#owner-domain1-test: whoever@domain1.com,
#domain1-test-owner: owner-domain1-test
#domain1-test-request: "|/usr/majordomo/wrapper majordomo -C /var/majordomo/domain1/majordomo.cf -l test"
#domain1-test-approval: owner-domain1-test
#domain1-test-outgoing: :include:/var/majordomo/domain1/lists/test,domain1-test-digestify,domain1-test-archiver
#domain1-test-archiver: "|/usr/majordomo/wrapper archive2.pl -f /var/majordomo/domain1/archive/test/test -a -M"
#domain1-test-digestify: "|/usr/majordomo/wrapper digest -r -C -c /var/majordomo/domain1/majordomo.cf -l test-digest domain1-test-digest-outgoing,nobody"
#domain1-test-digest: domain1-test
#owner-domain1-test-digest: owner-domain1-test
#domain1-test-digest-owner: owner-domain1-test
#domain1-test-digest-request: "|/usr/majordomo/wrapper majordomo -C /var/majordomo/domain1/majordomo.cf -l test-digest"
#domain1-test-digest-approval: owner-domain1-test
#
#domain2-test: "|/usr/majordomo/wrapper resend -C /var/majordomo/domain2/majordomo.cf -l test -h domain2.org domain2-test-outgoing,nobody"
#owner-domain2-test: whoever@domain2.org,
#domain2-test-owner: owner-domain2-test
#domain2-test-request: "|/usr/majordomo/wrapper majordomo -C /var/majordomo/domain2/majordomo.cf -l test"
#domain2-test-approval: owner-domain2-test
#domain2-test-outgoing: :include:/var/majordomo/domain2/lists/test,test-domain2-digestify,test-domain2-archiver
#domain2-test-archiver: "|/usr/majordomo/wrapper archive2.pl -f /var/majordomo/domain2/archive/test/test -a -M"
#domain2-test-digestify: "|/usr/majordomo/wrapper digest -r -C -c /var/majordomo/domain2/majordomo.cf -l test-digest domain2-test-digest-outgoing"
#domain2-test-digest: domain2-test
#owner-domain2-test-digest: owner-domain2-test
#domain2-test-digest-owner: owner-domain2-test
#domain2-test-digest-request: "|/usr/majordomo/wrapper majordomo -C /var/majordomo/domain2/majordomo.cf -l test-digest"
#domain2-test-digest-approval: owner-domain2-test

It should be noted to majordomo/list owners that their 
.config files should always use the 
resend_host = domain#.tld

One instance of wrapper will support all of the above.

I hope this helps shine light on things,
Dan Liston

Tom Rawson wrote:
> 
> Dan Liston wrote:
> 
> > What you are trying to do must be done in sendmail first, and majordomo
> > second.  In sendmail you need to utilize the virtusertable for each list
> > being hosted, and in majordomo you need separate majordomo.cf files for
> > each domain.  I would recommend separate list directories for each domain
> > too.
> 
> Thanks Dan.
> 
> Sendmail is all set ... on this provider's system we use a file called
> virtmaps but I believe it is the same as what you describe as
> virtusertable.  The format is similar to aliases, but no colons and no
> more than one address on the right hand side.  Eg:
> 
>         name1@domain.com   mailbox
>         name2@domain.com   outside_name@otherdomain.com
>        domain.com                catch-all_mailbox
> 
> This is already set up and working.
> 
> I would be happy to use separate Lists directories and agree that I need
> to use separate majordomo.cf files.  The issue is with wrapper -- it
> assumes one majordomo.cf file and I can't seem to recompile it properly --
> .I get a huge (58K) output file from the compile.  Once it is selectable I
> can easily do whatever I want with the directories.  Do you have any
> thoughts on that?  Anyone else?



References:
Indexed By Date Previous: virtual hosting, wrong addresser
From: chris@netborders.com
Next: Re: MajorDomo and MS Outlook
From: Dan Liston <dliston@netscape.com>
Indexed By Thread Previous: Re: Virtual Hosting, Modifying Wrapper
From: "Tom Rawson" <trawson@jpsoft.com>
Next: postmodern problems
From: "D. Liston" <dliston@netscape.com>

Google
 
Search Internet Search www.greatcircle.com