Integration of RoundCube with VirtualMin

13 posts / 0 new
Last post
#1 Wed, 02/24/2010 - 21:11

Integration of RoundCube with VirtualMin

Ok, I'm not sure about this one. I've created a virtual server, and installed RoundCube into the Public_Html folder in the home directory.

Roundcube loads fine, no errors that I can see yet, but I can't log into anything.

For example: I have redirected the mail login format for my main domain to user@domain, created a test user and then went to mail.domain.tld which loaded RoundCube Fine.

Entered test@domain.tld for user name, entered password, but RoundCube gives me a login failed message, which tells me that it's not catching the user info from VirtualMin.

Any suggestions?

Wed, 02/24/2010 - 21:18


Does it work from another client, such as Usermin or even Outlook/Thunderbird or so?

Ie, does the user work at all, or is it definitely an issue with RoundCube?

You may want to take a peek in the mail logs to see if any errors are showing up in it, as well as the user's Apache log in $HOME/logs/error_log for some clues.


Wed, 02/24/2010 - 21:51

Usermin works fine. I can log in perfectly with it.

Nothing in the $home logs, nothing in the mail logs, but the RoundCube error log gave me this: (Email Address is blanked out for security purposes)

[24-Feb-2010 20:52:56 -0600]: IMAP Error: Authentication for xxxxxx failed (LOGIN): "a001 NO Authentication failed." in /home/webmail/public_httml/program/include/rcube_imap.php on line 141 (POST /?_task=&_action=login)

[24-Feb-2010 21:02:54 -0600]: PHP Error: Acces denied for new user xxxxxx. 'auto_create_user' is disabled in /home/webmail/public_html/program/include/rcmail.php on line 552 (POST /?_task=&_action=login)

Wed, 02/24/2010 - 22:00


Ah, sounds like you may need to tweak the RoundCube config a bit... take a peek at the "Auto create user" section on the RoundCube config site:

Essentially, it sounds like you may need to set auto_create_user parameter to "true".


Thu, 02/25/2010 - 01:50 (Reply to #4)

I want to install roundcube , and access from something like that http://webmail.domain.tld http://webmail.domain1.tld or using https but for that I need public ip for each virtual host, is out of the question for now.

Roundcube database it is only one or I must have a database for each virtual domain?

It is ok to create webmail.domain.tld in Create Virtual server!?

DNS server on my virtualmin it is disable, because I'm using nameserver form another sourse, and because my internet ip it is dynamic.

Thu, 02/25/2010 - 09:35

Personally, what I'd do is setup RoundCube once, for a central domain on your server.

Then, I'd make it so that any user browsing to gets redirected to

At that point, you only have to have one dedicated IP address, and only one RoundCube install to manage.

You can setup redirects like the above by going into System Settings -> Server Templates -> Default -> Apache Website, and tweak the "URL for webmail redirect" setting.


Thu, 02/25/2010 - 10:46

That did the trick. Make sure auto_create_user is set to "TRUE" in PATH_TO_ROUNDCUBE/config/, and then in your Apache Website settings, put the URL to the installation of roundcube and it does the trick

I'm going to lay it out real quick here and hope that someone can use this info

Create a virtual service for your webmail, let's call it "mail.domain.tld" (which will create a /home/mail directory.)

Install RoundCube in /home/mail/public_html

Configure your RoundCube install, MAKING SURE that auto_create_user is set to "TRUE" (this is in config/

Log onto VirtualMin as your superuser account

go to System Settings -> Server Temlpates -> Default (or the template you want to change) and use the dropdown box to select "Apache Webserver"

On the Apache Webserver Config page, change the radio box under URL for webmail redirect to the second one (text box) and enter the absolute url to the webmail installation (in our case, http://mail.domain.tld)

THIS IS IMPORTANT (This is what messed me up) Leave the Redirect webmail.domain to Usermin radio box to YES. I don't know why, but for some reason, if you make it No, your Roundcube Installation will NOT work



Now, whenever your clients want to access webmail, they go to webmail.theirdomain.tld and it will redirect to the webmail.domain.tld alias you set up. They log in with their login information and presto! It's working

One thing I did was to change the username format to login@domain. Most people are used to doing things that way, and it makes it easier. There are proabably about 50 different schools of thought on this option, so weigh your choices before you make that decision.

Hope this helps

Fri, 02/26/2010 - 06:46

Fisrt I want to thanq you for yours reply. This day's I will do more testing, and came up with the results. But I am not just yet decide on which platform to use for virtualmin.

Fri, 02/26/2010 - 14:25

What solution is better: install roundcube in a new virtual server webmail.domain.tld or in subserver webmail for The diference between these two sitaution is in the first one I have to create an adminstrator user, and in the second one, administrator user for become an admin for subserver webmin.

Fri, 02/26/2010 - 18:17

On every virtual server created when I tr to acces from internet, system give me 403 error

Sun, 02/28/2010 - 02:29

What I did was to create a webmail.mydomain.tld And in the VirtualMin Apache Website settings under server templates, redirect webmail.theirdomain.tld to webmail.mydomain.tld

As far as the 403 goes. Did you make sure you installed RoundCube in the ROOT folder of your Virtual Server? (/home/mydomain/public_html)

The tarball from RoundCube will put it in it's OWN folder (/home/mydomain/public_html/roundcube) and you won't be able to access it that way, you'd have to use webmail.mydomain.tld/roundcube

Sun, 02/28/2010 - 17:49

Thank you PsyberMind, you are right but now I have a problem with setting up correct permisions for my site.

Wed, 10/20/2010 - 10:57

Thanks, PsyberMind. This should almost be in a Getting Started for anyone who's hosting. It seems pretty strategic.

I think that you may have had a little error in your "Create a virtual service for your webmail, let's call it "mail.domain.tld" (which will create a /home/mail directory.)" - I think it's like /home/yourusername/domains/mail.yourdomain.tld - at least, that's where I ended up to check on the auto_create_user setting.

Thanks for the write-up.

Best, Ken

Topic locked