Roundcube Community Forum

 

Email for multiple domains

Started by vigour, November 12, 2010, 01:59:06 AM

Previous topic - Next topic

vigour

I am very new to Roundcube and need some help. My company have a single mac mini with latest snow leopard that are hosting 2 domains (2 virtual domains). Lets call them domain1.com and domain2.com

We are using dyndns.org as the dns.

There are three users that needs email. Lets call them Chris, Ben and Percy.

We want to following email addresses.

[email protected]
[email protected]
[email protected]

[email protected]
[email protected]
[email protected]

I installed Mailserve Snow from Cutedgesystems to make things a little easier.

This is how we want it to work

We want to login with email address [email protected], [email protected] and [email protected] at domain1.com/roundcubemail.

We also want to login with email address [email protected], [email protected] and [email protected] at domain2.com/roundcubemail.

The problem right now is that ben for example see the same mailbox when he logs in at domain1.com/roundcubemail and domain2.com/roundcubemail. The same things is happening for chris and percy.

How should Roundcube be configured to work with multiple domains? It's nothing strange about what we want to do, just want our email to work on 2 domains.

Thanks in advance for your help.

SKaero

You just need to have different domains in $rcmail_config['username_domain'] for each copy of RoundCube then it should auto complete with witch ever domain there at.

vigour

Thanks for your answer.

I edited mail.inc.php so the line now is $rcmail_config['username_domain'] = 'domain1.com'; I did the same thing for my other copy of roundcube.

I tried to login with [email protected]/password at domain1.com/roundcubemail and I got Login failed.

SKaero

You should only have to login with "ben" when you set the username_domain but it sounds like you have a dovecot configuration problem.

vigour

I tried to login with ben/password and that also gave me Login failed but...

I also have Squirrelmail installed and I can login with that. And I could login to Roundcube as well before I changed $rcmail_config['username_domain'] = ''; to $rcmail_config['username_domain'] = 'domain1.com';

Ok, can I run some tests to see where my configuration is wrong?

SKaero

Ok, maybe I'm confused on the problem, can you login both ben accounts from ether RoundCube install (with or without username_domain)?

vigour

#6
Yes I can login to both accounts with ben and my password like this.

url = domain1.com/roundcubemail
username = ben
password = password

url = domain2.com/roundcubemail
username = ben
password = password

This will take me to the same mailbox, very strange.

But I can only login if username_domain is like this.

$rcmail_config['username_domain'] = '';

As soon I set username_domain to domain1.com or domain2.com I get Login failed.

SKaero

How do you have the usernames setup in dovecot are you using @.com?

vigour

#8
I will try to explain how the username is set up. First 4 pictures from MailServe.






The manual for MailServe is located here:

MailServe for Snow Leopard

I hope that the pictures and the manual will make it a little clearer. I have talked to the guy that are building MailServe but his support is not very good. As soon I ask something he says, look in the manual.

SKaero

I don't know anything about MailServe and the documentation isn't that great, but to me it looks like its only setup with one account for ben, chris, and percy. It looks like kinda looks like MailServe can only setup/manage one domain worth of email accounts.

vigour

I will show you the answer I got from the creator of MailServe.

Virtual Domains

Ordinarly, even if you receive mail for two domains - domainA.com and domainB.com, [email protected] vill use the same mailbox as [email protected]. But, using the Virtual Domains field, you can make things work a bit differently.

You need to create two separate user account on the server first, say, brendan and beekhim, respectively. Then make sure that the two domains, domainA.com and domainB.com, are listed in the Virtual Domains field. Then you can use the Virtual Domains Alias Mappings field to point [email protected] to brendan's mailbox and [email protected] to beekhim's mailbox, as shown below.


SKaero

That makes sense to me, have you tried setting it up that way?

vigour

Yes I have tried to set it up that way but I am not sure if I am doing it the right way.

Ok, lets start.

I have 2 user accounts on my mac mini. What should I do next?

vigour

#13
A little success.

First let me explain how my mac mini is set up.

We have a mac mini with latest OS X, we are not using Snow Leopard Server, just Snow Leopard. I have two accounts on the mac mini. Lets call them account1 and account2. I have two folders in the sites folder on account1 called domain1.com and domain2.com (virtual domains) I have dyndns.org as my dns server. I have roundcube installed at the following address on account1:

sites/domain1.com/roundcube

And also at this address on account1:

sites/domain2.com/roundcube

If I login to my mail at domain1.com/roundcube I see the same mailbox as domain2.com/roundcube

I now have two user accounts on my mac mini and the first time I sent email to my second email address the mail/devcote folder where created on account2. So far so good. Now I have two mail/devecote folders. One on each account.

But I still have the same mailbox so I am thinking. Must I point my email client to the right mailbox folder? Is that maybe the problem?

When I send email to my second address I do not receive any mail. I am pretty sure the mail is laying there in the mail/devcote folder on account2 just waiting for a mailclient to get it.

So the logical question is, how do I point squirrelmail or roundcube to a specific mailbox?


----------


UPDATE!

I checked inside the folder mail/devcote on account2 and yes, my mail is there. So the question is the same, how do I point roundcube to that folder?