How to install Roundcubemail (webmail alternative)

vandal

Verified User
Joined
Oct 22, 2003
Messages
696
Location
Calgary, AB
WARNING: This application is ALPHA software. Use at your own risk

I found roundcube mail while searching projects on freshmeat. Already in Alpha stage is runs very nice, has a great template system and uses xhtml/css 2 (although the xhtml could be strict and much better) the default template is great. It currently lacks a search but that is coming in the future.

http://www.roundcube.net/

So lets get started.
=============================

1) Create a mysql db via direct admin. I called mine admin_webmail (you should all know how to do this!)

2) Download and unpack the package:
Code:
cd /var/www/html

wget [url]http://easynews.dl.sourceforge.net/sourceforge/roundcubemail/roundcube_webmail_0.1-20051007.tar.gz[/url]

tar xvfz roundcube_webmail_0.1-20051007.tar.gz

3) Ensure proper permissions of the folders:

Code:
chown -R root.root roundcubemail

cd roundcubemail

chown -R apache logs temp

4) Import their SQL file:

Code:
cd SQL

//replace the following with the database username and password you created in step 1

mysql -u admin_webmail -p
Enter Password: *******

Once in, import their SQL file:
Code:
use admin_webmail

SOURCE mysql.initial.sql

now the import should be complete.

5) Setup db config variables

Code:
cd ../config/

nano db.inc.php

all you have to do here is change the "$rcmail_config['db_dsnw'] = " config information, mine looks like this:

Code:
$rcmail_config['db_dsnw'] = 'mysql://admin_webmail:myPasswordHere@localhost/admin_webmail';

the format is: mysql://<database user>:<password>@host/database_name

save that file and close it.

6) Setup the application config:

Code:
nano main.inc.php

find this line:

Code:
$rcmail_config['enable_caching'] = TRUE;

Replace with:

Code:
$rcmail_config['enable_caching'] = FALSE;

next find:

Code:
$rcmail_config['default_host'] = '';

replace with:

Code:
$rcmail_config['default_host'] = 'localhost';

7) *optional* you may want to setup an apache alias, you can overwrite your current webmail one with the following:

Edit httpd.conf:

Code:
nano /etc/httpd/conf/httpd.conf

Find this line:

Code:
Alias /webmail /var/www/html/webmail/

Replace with:

Code:
Alias /webmail /var/www/html/roundcubemail/

then restart apache
Code:
/usr/sbin/service httpd restart

You are done!

Login @ http://www.domain.com/webmail/


Questions, Comments, Typos, Suggestions, Praise post here please and I will update this main thread.

Thanks,

Justin
 
Looks pretty good. We'll set it up asap.

Straight forward howto. Everyone should be able to get this running smoothly. I don't see any hard bits ;)
 
is there a way you can add this to the webmail clients in DA control panel?
 
Thanks for the how-to..

Just finished integrating it into our skin.

Can't wait to see where the development of this project takes it. They are off to a great start.
 
finally i installed

but this error msg always occurs when logging in

"Your session is invalid or expired Username"

the login info is 100% correct
 
Possible to add for all users?

Hi, I installed this excellent webmail client in my user area using the site's own instructions and I'm wondering if its possible to install this client for all my users (I'm admin as well as reseller and user)? Can I just do a single install somehow or do I have to install each time a new user is made?
 
Re: Possible to add for all users?

Cutia said:
Hi, I installed this excellent webmail client in my user area using the site's own instructions and I'm wondering if its possible to install this client for all my users (I'm admin as well as reseller and user)? Can I just do a single install somehow or do I have to install each time a new user is made?
Roundcube uses IMAP
so you wont need to add account to it manually
 
Re: Re: Possible to add for all users?

hehachris said:
Roundcube uses IMAP
so you wont need to add account to it manually

Thats not quite what I meant I think. What I want is to be able to install Roundcube once somewhere on my server and for it to be available to all server users, like squirrelmail is.

I want each user on my server to be able to login to www.theirdomain.com/roundcube

Is it possible?
 
Last edited:
Ok, I decided to install as per the instructions above and I get this error on the login page:

PHP:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/roundcubemail/config/main.inc.php:166) in /var/www/html/roundcubemail/program/include/main.inc on line 78

And this on the page if I try and log in:

PHP:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/roundcubemail/config/main.inc.php:166) in /var/www/html/roundcubemail/index.php on line 132

Funny thing is it works perfectly if installed in my normal user account. Any help appreciated.
 
Re: Re: Re: Possible to add for all users?

Cutia said:
Thats not quite what I meant I think. What I want is to be able to install Roundcube once somewhere on my server and for it to be available to all server users, like squirrelmail is.

I want each user on my server to be able to login to www.theirdomain.com/roundcube

Is it possible?
1, install in some where (eg /var/www/html)
2, modify your httpd.conf, add Alias /rcmail /path/to/rcmail
3, restart apache

then all domain.com/rcmail will work
 
1, install in some where (eg /var/www/html)
2, modify your httpd.conf, add Alias /rcmail /path/to/rcmail
3, restart apache

then all domain.com/rcmail will work

Thanks bro, already worked that out but thanks for posting. Help always appreciated. :)

Ok, mostly sorted now... seems as if the CVS version I was using was broken as I installed the standard version off the website and it works fine now.

Only problem I'm getting is each time a user logs in for the first time database errors are printed out, even though the user is still entered correctly into the database. Hopefully this'll get sorted with future versions.
 
Installed, and it's working. Thanks for great howto, and a great tip.

I have an error in the background when browsing mail however:

Warning: fopen(./logs/errors): failed to open stream: No such file or directory in /var/www/html/roundcubemail-0.1-20051021/program/include/bugs.inc on line 67
DB Error in /var/www/html/roundcubemail-0.1-20051021/program/include/rcube_db.inc (129): DB Error: unknown error

Warning: fopen(./logs/errors): failed to open stream: No such file or directory in /var/www/html/roundcubemail-0.1-20051021/program/include/bugs.inc on line 67

I have directory ./logs and the file 'errors' is owned and writable by apache.

...only issue so far, however :)

Edited: Error appears when viewing big mailboxes only. I tested with mailbox with 50 emails, and there was no error.

Note: I have caching turned on
 
Last edited:
Back
Top