# mkdir /var/www/roundcube
# cd /var/www/roundcube
# wget roundcube install from http://roundcube.net/download
# tar -xvzf roundcubemail-version.tar.gz
# chown -R apache.apache logs temp
# chmod 777 logs temp
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> create database roundcubedb;
mysql> grant all privileges on roundcubedb.* to roundcubeuser@localhost identified by 'PASSWORD';
mysql> FLUSH PRIVILEGES;
mysql> exit
# mysql roundcubedb < SQL/mysql.initial.sql -uadmin -p`cat /etc/psa/.psa.shadow`
# cp config/db.inc.php.dist config/db.inc.php
# cp config/main.inc.php.dist config/main.inc.php
# vi config/db.inc.php
:/db_dsnw
$rcmail_config['db_dsnw'] = 'mysql://roundcubeuser:PASSWORD@localhost/roundcubedb';
# vi /etc/httpd/conf.d/roundcube.conf (or /etc/apache2/conf.d/roundcube.conf)
ServerName webmail
ServerAlias webmail.*
DocumentRoot /var/www/roundcube
<Directory "/var/www/roundcube">
# vi config/main.inc.php
$rcmail_config['default_host'] = NULL; to $rcmail_config['default_host'] = 'localhost';
//$rcmail_config['create_default_folders'] = false;
$rcmail_config['create_default_folders'] = true;
# vi config/main.inc.php:/enable_installer
$rcmail_config['enable_installer'] = true;
# cp plugins/password/config.inc.php.dist plugins/password/config.inc.php
# vi plugins/password/config.inc.php
Change first line to $rcmail_config['password_driver'] = 'poppassd';
:wq
# vi config/main.inc.php
(find plugin):/'plugins'
Change it to $rcmail_config['plugins'] = array('password')
Now when you login, go to settings. You can now update the password!
Set the following so emails always used Html not plain text
# vi config/main.inc.php
:/htmleditor
// 0 - never, 1 - always, 2 - on reply to HTML message only
$rcmail_config['htmleditor'] = 1;
# vi main.inc.php
:/imap_auth_type
$rcmail_config['imap_auth_type'] = plain;
# vi /etc/php.ini
:/date.timezone = "xxxxxx"
where xxxxxx is an aproprate timezone.
I updated mine to date.timezone = "Chicago" and my settings page now works
//$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['drafts_mbox'] = 'INBOX.Drafts';
//$rcmail_config['junk_mbox'] = 'Junk';
$rcmail_config['drafts_mbox'] = 'INBOX.Junk';
//$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['drafts_mbox'] = 'INBOX.Sent';
//$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['drafts_mbox'] = 'INBOX.Trash';
//$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
$rcmail_config['default_imap_folders'] = array('INBOX', 'INBOX.Drafts', 'INBOX.Sent', 'INBOX.Junk', 'INBOX.Trash')
Setting up the httpd conf for roundcube, i prefer doing it this way rather then removing AtMail or Horde. You can set it up as a default webmail(depending on what you have setup) I have a domain i use for testing/domain alias which you can add to the Webmail URL to Home>Tools & Settings>Webmail Services>Register Additional Webmail (enter the URL)
# vi /etc/httpd/conf.d/roundcube.conf
ServerName webmail
ServerAlias roundcube.*
DocumentRoot /var/www/roundcube
<Directory "/var/www/roundcube">
If you want roundcube to be default webmail. go into plesk and disable both horde and Atmail. Then update the above to
# vi /etc/httpd/conf.d/roundcube.conf
ServerName webmail
ServerAlias webmail.*
DocumentRoot /var/www/roundcube
<Directory "/var/www/roundcube">
If this step is done, you dont need to add the DNS below.
However you do need a httpd restart for this to take affect
If you want to add dns records to all the domains on your hosting you can run this script
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Ns -e "select name from domains" | xargs -I {} /usr/local/psa/bin/./dns --add {} -a roundcube -ip SERVER_IP
Also add an entry into your plesk DNS template, so any newly added domains will have this dns record automatically. Now you should be able to using roundcube on any domain with the "http://roundcube.domain.com"
Also i have setup, when this was not setup any resolving/wildcard dns would display roundcube
vi /etc/httpd/conf.d/default.conf
ServerName default
ServerAlias default.*
DocumentRoot /var/www/vhosts/default/htdocs
<Directory "/var/www/vhosts/default/htdocs">
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
INSERT INTO `psa`.`Webmails` (`id`, `product_id`, `name`, `version`, `release`, `docroot`, `enabled`) VALUES ('3', 'roundcube', 'Roundcube', '0.8.6', 'Release 0.8.6', '/var/www/roundcube', 'true');
(This is a little buggy, it has worked on some of my servers.. On others roundcube shows over the top of both atmail and horde, which isnt too bad really)