Guide updated on 29th of February 2016

Install roundcubemail webmail interface


Roundcube webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.

More information can be found on http://roundcube.net/

cd /downloads/
tar zxvfp roundcubemail-1.1.4-complete.tar.gz

chown -R root:root /downloads/roundcubemail-1.1.4
mv /downloads/roundcubemail-1.1.4 /var/www/mail/
ln -s /var/www/mail/roundcubemail-1.1.4/ /var/www/mail/webmail
ln -s /var/www/mail/webmail/logs /var/log/webmail
chmod 777 /var/www/mail/webmail/logs/
chmod 777 /var/www/mail/webmail/temp/

Create the needed Database.

The used MySQL_root_password should be the password chosen on pre-step 3. It's should not be the same as the password for roundcubemail (ROUNDCUBEMAILPASSWORD).

It's not a typo, the MySQL_root_password should really be just aside the -p

mysql -pMySQL_root_password

CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost IDENTIFIED BY 'ROUNDCUBEMAILPASSWORD';
quit;

Test your the account you have just created

mysql -uroundcube -pROUNDCUBEMAILPASSWORD
exit;

You should have such response

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1073
Server version: 5.5.44-0+deb8u1 (Debian)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>exit;

Let's configure it

cd /var/www/mail/webmail
mysql -uroundcube -pROUNDCUBEMAILPASSWORD roundcubemail < SQL/mysql.initial.sql

cp /var/www/mail/webmail/config/config.inc.php.sample /var/www/mail/webmail/config/config.inc.php
sed -i s/24ByteDESkey/`makepasswd --char=12`/ /var/www/mail/webmail/config/config.inc.php

Edit the file /var/www/mail/webmail/config/config.inc.php and change the following :

$config['db_dsnw'] = 'mysql://roundcube:ROUNDCUBEMAILPASSWORD@localhost/roundcubemail';

Append the following lines at the end of the same file /var/www/mail/webmail/config/config.inc.php

$config['drafts_mbox'] = 'INBOX.Drafts';
$config['junk_mbox'] = 'INBOX.Junk';
$config['sent_mbox'] = 'INBOX.Sent';
$config['trash_mbox'] = 'INBOX.Trash';
$config['default_folders'] = array('INBOX', 'INBOX.Drafts', 'INBOX.Sent', 'INBOX.Junk', 'INBOX.Trash');
$config['create_default_folders'] = true;

Just a little cleaning ... and use it !

cd /var/www/mail/webmail
rm -rf installer/ SQL/ CHANGELOG INSTALL LICENSE README UPGRADING README.md

Point your browser on http://mailadmin.yourdomain.tld/webmail/ ... and use it!

Your server is functionnal now !

Configure mail client (Outlook 2007 as sample)

Configure other mail client (IOS 6 device as sample)


Users comments
Cameron - 29/11/2016 01:46

Hi Thibs,

Thank-you for your response.

I have another question.  I was looking at pointing my qmr server to a smarthost, but it requires authentication.  I have put the smarthost in "/var/qmail/control/smtproutes", but just wasnt sure where to put the username and password, or do I need to install a patch.

Thx

Cameron.

Thibs - 28/11/2016 13:06

Hi Cameron,

During the christmas holidays, I'll try to update this page with the latest roundcubemail version to check if I got the same issue as you.

I'm running this version in my own install and I'm able to use it

 

Cameron - 21/11/2016 22:19

Hi QMR,

Thank-you for the updated install for Debian 8.

Great Job!!!

The only issue I have come across is roundcubemail.  All has installed ok, but when I try to send an email from within roundcube, it just stays in the queue "To be delivered".  When I use an email client eg: Outlook, it sends no problem.

Not sure what to check.

Thx

Cameron.

David - 10/11/2016 23:42

I am getting a sample roundcube splash page, that does not execute the php. therefore,it does not go to the login page.

Jolebarjo - 14/08/2016 13:34

@Amit vijay

As your comment is very old, i prefere to say that this comment is for future installations.

And thank's to thibs for this, nice work.

For Roundcunbe you have to edit the file

> /var/www/mail/webmail/plugins/password/config.inc.php

in this file be sure to have the options :

> $config['password_driver'] = 'sql';

> $config['password_db_dsn'] = 'mysql://vpopmailuser:YOUR_VPOPMAIL_PASSWORD@localhost/vpopmail';

Andthen, complete de line as you see below.

> $rcmail_config['password_query'] = 'UPDATE vpopmail SET pw_passwd=ENCRYPT(%p,concat("$1$",right(md5(rand()), 8 ),"$")),pw_clear_passwd=%p where pw_name=%l and pw_domain=%d';

And that's it, your Roundcube should be able to change the users passwords

And also, don't forget to activate the plugin in the file :

> /var/www/mail/webmail/config/config.inc.php

// List of active plugins (in plugins/ directory)
$config['plugins'] = array( 'password',);

You should have more options, but this is the one to activate the password changing in Roundcube.

I don't think you need this any more, but for other user's who could need, hope it will be useful.

Cheers.

Amit vijay - 05/11/2014 07:53 I am not able to change password in roundcube. I already add password plugin in it but it not works.IT ives error: Couldn't save password. pl help on this.
Thibs - 03/09/2014 21:28

Merci Mathis ! Je corrige

Mathis victor - 03/09/2014 11:16

Petite coquille de dossier vers la fin :

"cd var/www/mail/webmail"

Il manque le / devant var.

Stefouimet - 25/06/2013 17:21

I used Debian Squeeze and followed your QMail install instructions with Roundcube.

I have a curious problem after some days running Roundcube and courier-imap started together.

If I don't use roundcube, my courier-imap runs great (ios, android, software emails clients) in imaps and imap.

But if I have 3-5 users using RoundCube AND some others use software emails clients in imap and/or imaps, after some time (12 hours, 1 day, never the same time) the courier-imap continue to run again but the connections is unavailable (timeout strange). Well no imap and imaps must going to connect! I make a restart of the service of courier-XYZ (pop, imap, etc) the connection is timeout again. The only solution is to reboot the server, not great at all!

i don't know where is the problem... roundcube crash courier-imap? Or other thing? It's not the courier-imap because if I don't use roundcube we don't have this strange problem. And the Courier service doesn't crash, just a strange timeout (kind of "no connection failed")...

Thibs - 25/01/2012 10:21

@Tokie:

This is the typical usage :

1° Configure the server to accept the domain thanks to

http://mailadmin.yourdomain.tld/cgi-bin/vqadmin/vqadmin.cgi

2° Create the e-mail account

http://mailadmin.yourdomain.tld/cgi-bin/qmailadmin

Master account : postmaster

Domain : your_just_configured_domain

Password : your_just_set_password

3° Connect on http://mailadmin.yourdomain.tld/webmail/

Login : account@domain (as created in qmailadmin)

Password : XXXX (as created in qmailadmin)


Tokie - 24/01/2012 16:48

Hi Thibs and thanks for your guide.

I don't understand how to use webmail (roundcube) for qmail??

If I create new user in vqmail and but don't exist in rc!!

How must set up installer's rc??

Tks you

Tokie

Mrreaper - 04/12/2011 20:51

When I try to send a mail via Roundcube webmail. it sent with the following address www-data@Myservername.Mydomain.tls and not with my mail addres. how can i fix it?

Dbrandib - 28/11/2011 00:59

Hi,

 

after following all the guide, everything is working fine in my server. Despite, I am trying to process emails with php script. To do that I have created a .qmail file with pipe command but seems to do not work. Could be some process stoping the process? What I am doing wrong?

Thanks in advanced


Color Coded Qmail Installation Key
  Regular Black Text     Qmail installation notes and summaries by the author.
  Bold Black Text     Commands to be run by you, the installer.
  Bold/Regular Red Text    Vital and/or critical information.
  Regular Blue text     Denotes helpful tips and hints or hyperlinks.
  Regular Orange Text     Command line output.
  Bold/Regular green text     Denotes the contents of a file or script.