LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-11-2009, 06:07 AM   #1
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Rep: Reputation: 33
Set up Multiple Domains in Single openwebmail


Hi,

How can i setup Multiple / two domains settings in openwebmail. Right now i am using CentOS 5 + sendmail (looking for 2 domains settings in sendmail ) + openwebmail.

Any help would be greatly appreciated.
 
Old 11-14-2009, 07:28 AM   #2
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
How to setup multiple domain settings in openwebmail

Hi,

I have openwebmail install and working fine for single domain...
How i can setup single openwebmail for 3 domains...

cat /etc/mail/local-host-names
sample1.com
sample2.com
sample3.com

I am using sendmail + openwebmail on CentOS 5
 
Old 11-14-2009, 08:21 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by mail4vijay View Post
Hi,

I have openwebmail install and working fine for single domain...
How i can setup single openwebmail for 3 domains...

cat /etc/mail/local-host-names
sample1.com
sample2.com
sample3.com

I am using sendmail + openwebmail on CentOS 5


enter the /var/www/cgi-bin/openwebmail/etc/sites.conf directory and create config files for every domain you use or want to enable for your virtual users...

Example: domain1.com

auth_module auth_vdomain.pl
auth_withdomain yes
mailspooldir /var/spool/virtual/domain1.com/
use_syshomedir no
use_homedirspools no
enable_autoreply no
enable_setforward no
enable_vdomain yes
vdomain_vmpop3_pwdpath /etc/virtual
vdomain_vmpop3_pwdname passwd
vdomain_vmpop3_mailpath /var/spool/virtual


and do the same with domain2.com etc...etc and with all your domains
 
Old 11-15-2009, 03:09 AM   #4
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by centosboy View Post
enter the /var/www/cgi-bin/openwebmail/etc/sites.conf directory and create config files for every domain you use or want to enable for your virtual users...

Example: domain1.com

auth_module auth_vdomain.pl
auth_withdomain yes
mailspooldir /var/spool/virtual/domain1.com/
use_syshomedir no
use_homedirspools no
enable_autoreply no
enable_setforward no
enable_vdomain yes
vdomain_vmpop3_pwdpath /etc/virtual
vdomain_vmpop3_pwdname passwd
vdomain_vmpop3_mailpath /var/spool/virtual


and do the same with domain2.com etc...etc and with all your domains
Thanks for the reply.... I created 3 files per your instructions
like in

Quote:
cd /var/www/cgi-bin/openwebmail/etc/sites.conf
touch sample1.com sample2.com sample.com
and copy your mentioned content to all three with the change in mailspooldir
Quote:
mailspooldir /var/spool/virtual/sample1.com/
mailspooldir /var/spool/virtual/sample2.com
Amailspooldir /var/spool/virtual/sample3.com/
I unable to know how i choose all domain from browser and even i tried to change settings in /var/www/cgi-bin/openwebmail/etc/default/openwebmail.conf
Quote:
enable_domainselectmenu yes
domainselectmenu_list sample1.com,sample2.com,sample3.com
and now it is showing me in the default page of openwebmail in browser , but when i try to login with any unix user with user name and password + domain select i am not able to get in.....

May be i need to setup virtual domain names / virtual users in

/etc/virtual or /var/spool/virtual/sample1.com etc something....

Could you please let me know how to setup these virtual domains / virtual users so that i can able to login with their name and passwords ....

Thanks for your valuable reply ... and looking forward for this solution....
 
Old 11-15-2009, 01:35 PM   #5
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by mail4vijay View Post
Thanks for the reply.... I created 3 files per your instructions
like in


and copy your mentioned content to all three with the change in mailspooldir


I unable to know how i choose all domain from browser and even i tried to change settings in /var/www/cgi-bin/openwebmail/etc/default/openwebmail.conf

and now it is showing me in the default page of openwebmail in browser , but when i try to login with any unix user with user name and password + domain select i am not able to get in.....

May be i need to setup virtual domain names / virtual users in

/etc/virtual or /var/spool/virtual/sample1.com etc something....

Could you please let me know how to setup these virtual domains / virtual users so that i can able to login with their name and passwords ....

Thanks for your valuable reply ... and looking forward for this solution....
set the virtual users in /etc/virtual or the sendmail /etc/mail/virtusertable
 
Old 11-15-2009, 07:51 PM   #6
AuroraZero
Member
 
Registered: Oct 2009
Location: Michigan
Distribution: SlackWare 13.37, Android, Slax, Centos 5.9 Final, Centos 6
Posts: 187

Rep: Reputation: 31
Are you trying to setup different accounts or virtual accounts? This is for virtual domains but it may help some.

Q: How can I use multiple virtual domains with openwebmail?
A: First, you have to decide whether to use real virtual hosting or
just user alias.

1. The User Alias

User alias is much simpler, your system is actually a one domain machine.
You only have to define the user alias in virtusertable.

For example, you have 1 real domain server.com and
2 virtual domain virtual_1.com, virtual_2.com
for your server.

You already have tom and john on this server.
And now you want 2 more tom and john for each virtual domain.

Define the following entries in your virtusertable will make it.

tom@virtual_1.com tom1
tom@virtual_2.com tom2
john@virtual_1.com john1
john@virtual_2.com john2

And how these users are used?

If the user logins as tom and the webmail url is http://virtual_1.com/....
then alias tom@virtual_1.com will be matched, real user tom1 will be used.
If the user logins as tom and the webmail url is http://virtual_2.com/....
then alias tom@virtual_2.com will be matched, real user tom2 will be used.

If the user logins as tom and the webmail url is http://server.com/....
then real user tom will be authenticated.

If the user logins as tom@virtual_1.com, then no matter what the url is,
the alias tom@virtual_1.com will be matched, user tom1 will be used.

In the user alias mapping, users of different virtualdomains are actually
mapped to the real domain and then passed to same authentication module.


2. Real Virtual Hosting

The real virtual hosting means your system is configured to a multiple
domain machine in either smtpd, pop3d, webmail and authentication module.

You will need to use the per domain config file in openwebmail for each
of your virtual domain. These config files will be loaded based on

1. the domainname part in loginname, or
2. the hostname in the url of the webmail

ps: You may need to use the domainname_equiv option to ensure no matter
which domainname is used by user or in URL, they will be mapped to
a consistent one.

For example:

If the user login as tom and the webmail url is http://virtual_1.com/...,
config file for virtual_1.com will be loaded
If the user login as tom and the webmail url is http://virtual_2.com/...,
config file for virtual_2.com will be loaded
If the user logins as tom@virtual_1.com, then no matter what the url is,
config file for virtual_1.com will be loaded

Each domain can have its own set of options in its config file,
including domainname, authentication module, quota limit, mailspooldir ...

A more detailed example is described in the Kevin Ellis's webpage:
"How to setup virtual users on Open WebMail using Postfix & vm-pop3d"
http://www.bluelavalamp.net/owmvirtual/

Q: Could I have configuration file on per user basis?
A: Yes, let us use tom@virtual_1.com as example.

If option auth_withdomain is set to yes,
the user conf is cgi-bin/openwebmail/etc/users.conf/virtual_1.com/tom

If option auth_withdomain is set to no,
the user conf is cgi-bin/openwebmail/etc/users.conf/tom

This is from the open web mail FAQ not from me.
 
Old 11-16-2009, 04:56 AM   #7
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by centosboy View Post
set the virtual users in /etc/virtual or the sendmail /etc/mail/virtusertable
Thanks again for reply....

If i set virutal users in virtusertable in sendmail like below.
Quote:
cat /etc/mail/virtusertable
tom@sample1.com tom1
tom@sample2.com tom2
john@sample3.com john1
Should i need to change the path of vdomain_vmpop3_pwdpath /etc/virtual in per domain file.... to vdomain_vmpop3_pwdpath /etc/mail/virtusertable

I have changed in cgi-bin/openwebmail/etc/default/openwebmail.conf to

[Quote
enable_domainselectmenu yes
domainselectmenu_list sample1.com,sample2.com,sample3.com
[/Quote]
because of this i can see my domain list in drop-down in the default login page.But i need to know how i can call all the domain file while login for sample1.com ,sample2.com etc... at the time of login..
I am using in httpd the settings below

Alias /webmail "/var/www/cgi-bin/openwebmail/"
and i am using http://192.168.0.1/webmail
Suppose i want to login with tom1 user i will select
Quote:
username:tom1 or tom1@sample1.com
password: real unix password for tom1
Domain : sample1.com (from the drop-down list)
And in this case it should always call to cgi-bin/var/www/openwebmail/sites.conf/sample1.com file with the required settings in this file only that is

mailspooldir /var/spool/virtual/sample1.com/tom ....... and same for all other domains like sample2.com sample3.com ..
So that tom1 should not login in sample2.com or sample3.com and vise versa...and for every virtual users set to their mailspooldir /var/spool/virtual/sample1.com..... and so on...

Please let me know if i missing out any thing or need to change something else....

Thanks again for your prompt reply for sure...
 
Old 11-16-2009, 04:56 AM   #8
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by AuroraZero View Post
Are you trying to setup different accounts or virtual accounts? This is for virtual domains but it may help some.

Q: How can I use multiple virtual domains with openwebmail?
A: First, you have to decide whether to use real virtual hosting or
just user alias.

1. The User Alias

User alias is much simpler, your system is actually a one domain machine.
You only have to define the user alias in virtusertable.

For example, you have 1 real domain server.com and
2 virtual domain virtual_1.com, virtual_2.com
for your server.

You already have tom and john on this server.
And now you want 2 more tom and john for each virtual domain.

Define the following entries in your virtusertable will make it.

tom@virtual_1.com tom1
tom@virtual_2.com tom2
john@virtual_1.com john1
john@virtual_2.com john2

And how these users are used?

If the user logins as tom and the webmail url is http://virtual_1.com/....
then alias tom@virtual_1.com will be matched, real user tom1 will be used.
If the user logins as tom and the webmail url is http://virtual_2.com/....
then alias tom@virtual_2.com will be matched, real user tom2 will be used.

If the user logins as tom and the webmail url is http://server.com/....
then real user tom will be authenticated.

If the user logins as tom@virtual_1.com, then no matter what the url is,
the alias tom@virtual_1.com will be matched, user tom1 will be used.

In the user alias mapping, users of different virtualdomains are actually
mapped to the real domain and then passed to same authentication module.


2. Real Virtual Hosting

The real virtual hosting means your system is configured to a multiple
domain machine in either smtpd, pop3d, webmail and authentication module.

You will need to use the per domain config file in openwebmail for each
of your virtual domain. These config files will be loaded based on

1. the domainname part in loginname, or
2. the hostname in the url of the webmail

ps: You may need to use the domainname_equiv option to ensure no matter
which domainname is used by user or in URL, they will be mapped to
a consistent one.

For example:

If the user login as tom and the webmail url is http://virtual_1.com/...,
config file for virtual_1.com will be loaded
If the user login as tom and the webmail url is http://virtual_2.com/...,
config file for virtual_2.com will be loaded
If the user logins as tom@virtual_1.com, then no matter what the url is,
config file for virtual_1.com will be loaded

Each domain can have its own set of options in its config file,
including domainname, authentication module, quota limit, mailspooldir ...

A more detailed example is described in the Kevin Ellis's webpage:
"How to setup virtual users on Open WebMail using Postfix & vm-pop3d"
http://www.bluelavalamp.net/owmvirtual/

Q: Could I have configuration file on per user basis?
A: Yes, let us use tom@virtual_1.com as example.

If option auth_withdomain is set to yes,
the user conf is cgi-bin/openwebmail/etc/users.conf/virtual_1.com/tom

If option auth_withdomain is set to no,
the user conf is cgi-bin/openwebmail/etc/users.conf/tom

This is from the open web mail FAQ not from me.
Thanks for reply , i will check with my settings and let you know if i see any issue.
 
Old 11-16-2009, 06:27 AM   #9
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by mail4vijay View Post
Thanks again for reply....

If i set virutal users in virtusertable in sendmail like below.


Should i need to change the path of vdomain_vmpop3_pwdpath /etc/virtual in per domain file.... to vdomain_vmpop3_pwdpath /etc/mail/virtusertable

I have changed in cgi-bin/openwebmail/etc/default/openwebmail.conf to

[Quote
enable_domainselectmenu yes
domainselectmenu_list sample1.com,sample2.com,sample3.com
because of this i can see my domain list in drop-down in the default login page.But i need to know how i can call all the domain file while login for sample1.com ,sample2.com etc... at the time of login..
I am using in httpd the settings below

Alias /webmail "/var/www/cgi-bin/openwebmail/"
and i am using http://192.168.0.1/webmail
Suppose i want to login with tom1 user i will select

And in this case it should always call to cgi-bin/var/www/openwebmail/sites.conf/sample1.com file with the required settings in this file only that is

mailspooldir /var/spool/virtual/sample1.com/tom ....... and same for all other domains like sample2.com sample3.com ..
So that tom1 should not login in sample2.com or sample3.com and vise versa...and for every virtual users set to their mailspooldir /var/spool/virtual/sample1.com..... and so on...

Please let me know if i missing out any thing or need to change something else....

Thanks again for your prompt reply for sure...[/QUOTE]



please please please read the docs.
everything you need to know is there


Code:
http://openwebmail.org/openwebmail/doc/readme.txt
 
Old 11-16-2009, 08:48 AM   #10
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
My apologize i asked many questions , i will read this documenst first...
 
Old 11-16-2009, 10:53 AM   #11
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
@ mail4vijay,

Hi there; I have merged your two threads on this subject, as they were very nearly identical. I have also removed the [solved] marker, so that you can re-evaluate the entire thread and decide again if the issue is actually solved, or if you would like further input on this. If the thread is solved, you can mark it [solved] again.

In the future, kindly do not post the same question, albeit slightly rephrased, in more than one location, as it makes it more difficult for others to keep track of the discussion, and to help you.

Best regards,
Sasha
 
Old 11-16-2009, 11:50 AM   #12
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by GrapefruiTgirl View Post
@ mail4vijay,

Hi there; I have merged your two threads on this subject, as they were very nearly identical. I have also removed the [solved] marker, so that you can re-evaluate the entire thread and decide again if the issue is actually solved, or if you would like further input on this. If the thread is solved, you can mark it [solved] again.

In the future, kindly do not post the same question, albeit slightly rephrased, in more than one location, as it makes it more difficult for others to keep track of the discussion, and to help you.

Best regards,
Sasha
Thanks for the input. I will keep this in mind for future reference. I think i want to make this thread open until i will test this per the suggestion given by others...
Thanks again for your help.
 
Old 11-18-2009, 03:52 AM   #13
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by mail4vijay View Post
Thanks for the input. I will keep this in mind for future reference. I think i want to make this thread open until i will test this per the suggestion given by others...
Thanks again for your help.
I have configured virtual domain settings in openwebmail as if now .. but i am stuck at the step "addpasswd"
Quote:

Now we need to create a password for this user. Using the addpasswd script laid out on the vm-pop3d homepage, we'd execute this command:

addpasswd username password >> /etc/virtual/domain/passwd

For our example, if user john wanted the password 'turtle', we'd execute:

addpasswd john turtle >> /etc/virtual/virtualcompany.com/passwd
How to run addpassword script for adding passwd for virtual users?
 
Old 11-19-2009, 03:44 AM   #14
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by mail4vijay View Post
I have configured virtual domain settings in openwebmail as if now .. but i am stuck at the step "addpasswd"


How to run addpassword script for adding passwd for virtual users?
Finally i got this solution.... for this i created addpasswd script which was at vm-pop3d homepage... everything looks good for my now.

Thanks for the all the reply for this post.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple emails accounts(with different from domains) on multiple domains on 1 server locoputo Linux - Server 0 04-12-2009 07:29 PM
how to restrict a user to a single domain in sendmail with multiple domains muralee29477 Linux - Server 2 04-30-2007 02:16 AM
Multiple domains names - Single machine jduckett01 Linux - Networking 3 09-18-2006 06:09 AM
multiple domains on a single m/c for sendmail p_test Linux - Networking 1 04-26-2006 01:45 PM
Can I use a single Samba server for multiple domains? help321 Linux - Software 0 08-11-2004 06:20 AM


All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration