Virtual Domains on a large system in DMail, CWMail and NetAuth overview
> Thank you for your prompt reply. In your response, can you also give me some
> indication of how NetWin handles multiple virtual domains? We are planning to give
> our users the choice of up to 3 domain names.
Netwin's products have good support for multiple virtual domains. If anything, it can be a little confusing because of all the options available.
Firstly, note that if you just want to allow the user to use all of 3 addresses, e.g.
tam@domain1.co.nz
tam@domain2.co.nz
tam@domain3.co.nz
i.e. all of those addresses are valid and are the same user,
then you should add domain2.co.nz and domain3.co.nz as 'domain aliases' of domain1.co.nz, rather than as full virtual domains.
E.g. ,
host_domain domain.co.nz
host_domain domain2.co.nz
host_domain domain3.co.nz
in dmail.conf
and in CWMail,
no extra settings would be needed. You would only have to ensure that the different URLs reach the same CWMail cgi.
Given that you do want separate virtual domains, i.e. where the same username is
re-used on each of the vdomains, then these are also easily added.
Virtual Domains in DMail:
In dmail.conf you add your main domain with a host_domain setting,
host_domain main_domain.co.nz
(you probably have already done this)
and then add the other domains as virtual domains with vdomain settings,
vdomain a b vdomain1.co.nz c
where a,b and c are specific values for that domain. Most importantly, the vdomain line sets a separate mail spool directory for each domain, so that the mail is kept completely separate.
The DMail manual has details on the vdomain setting in section 8.
Virtual Domains in CWMail and NetAuth:
In CWMail and NetAuth, the settings which you currently have in their ini files are all for your 'main domain'.
You can choose to run separate CGIs for each virtual domain, or you can add 'vhost-vend' sections to their ini files for the virtual domains.
The vhost sections allow you to simplify maintenance for the vdomains. They
are sections of the ini file which allow you to specify any 'over rides' of the main domain for the virtual domain.
So long as you use the vhost sections to separate out the stored mail and folders for each domain, it is easy to split to separate CGIs on separate web servers at a later date if you want to.
In order to keep the stored mail separate, you must specify a unique workarea setting
for each vhost section.
Also, you should use the domain name for the pophost setting rather than an ip address. The pophost setting is used to form the user's directory name, so in
general it should not be changed once you have added users (although it
can be done). Using the domain name means that you can change the
DNS record for that domain later to point to a different box without upsetting CWMail.
Also, if you use a subdomain for the pophost setting, e.g.,
mail1.vdom1.co.nz
rather than just,
vdom1.co.nz
, you can easily make separate domains use totally separate pop servers at a later date as an easy way of distributing load.
E.g. here is a simplified cwmail.ini file showing a main domain and two virtual domains (all sharing the same set of templates) which will be easy to separate out at a later stage if needed:
#******************
pophost main_domain.co.nz
domain main_domain.co.nz
workarea /usr/local/cwmail/main_domain/
templates /usr/local/cwmail/tpl/
vhost www.vdom1.co.nz
domain vdom1.co.nz
pophost vdom1.co.nz
workarea /usr/local/cwmail/vdom1/
vhost www.vdom2.co.nz
domain vdom2.co.nz
pophost vdom2.co.nz
workarea /usr/local/cwmail/vdom2/
vend
#******************
NetAuth's vhost sections are just like CWMail's. Here are the links to both of the manuals, which have full details,
http://www.netwinsite.com/dmailweb/cwmail.htm
http://www.netwinsite.com/netauth/netauth.htm