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.
Download the source-code.
Read the installation guide.
# cd /srv/www/vhosts # mkdir -p webmail.example.com/httpsdocs # cd /srv/www/vhosts/webmail.example.com/httpsdocs/ # cp -R <path to roundcube unzipped dir>/* . # chcon -R -t httpd_sys_rw_content_t * # cd .. # chown -R apache:apache # cd /etc/httpd/conf/vhosts.d/ # cp vhosts.con webmail.example.com.conf # vi webmail.example.com.conf // Edit this file for your needs.
The vhosts.conf template is used and must be changed to your needs. Start with replacing example.com to your domain.
Also remove the first and second virtualhost.
<VirtualHost *:80> ServerName example.com .... <VirtualHost *:443> ServerName example.com
We keep the third and fourth virualhost.
After you configure the server you need to restart the webserver.
# httpd -t # systemctl restart httpd
Create a database with any name you want and grant privileges to a separate database user. It's recommended not to use an existing user or root.
With MySQL you can set up the database by issuing the following commands:
Use:
username: roundcube
password: make one up.
# cd /srv/www/vhosts/mail.example.com/httpsdocs/ # mariadb -u root -p MariaDB [(none)]> MariaDB [(none)]> create database roundcube character set utf8 collate utf8_general_ci; MariaDB [(none)]> grant all privileges on roundcube.* to username@localhost identified by 'password'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> mariadb roundcube < SQL/mysql.initial.sql MariaDB [(none)]> use roundcube; Database changed MariaDB [roundcube]> show tables; +---------------------+ | Tables_in_roundcube | +---------------------+ | cache | | cache_index | | cache_messages | | cache_shared | | cache_thread | | collected_addresses | | contactgroupmembers | | contactgroups | | contacts | | dictionary | | filestore | | identities | | responses | | searches | | session | | system | | users | +---------------------+ 17 rows in set (0.000 sec) MariaDB [roundcube]> quit #
You need TLS for this.
Use your wildcard certificate or make one with lets-encrypt.
Now can we start with the Roundcube configuratiom.
Open your browser and go to https://webmail.example.com/installer.
This wil check for dependencies. Everything must be OK. If not add the missing items. You must see your installed SQL server.
You need to restart php-fpm and httpd after adding missing php modules.
Set the necessary values.
Testing if every thing works. If not go back to step 2. SMTP might be tricky to get running.
When every thing works, you can open a new tab and login with your email address as user and password.
When every thing works you need to remove the installer.
# cd /srv/www/vhosts/webmail.example.com/httpsdocs/ # rm -fR installer/
The IMAP server allows authentication on port 143, so for localhost use no problem.
The SMTP server only allow mail send ove ports 465 and 587. These must use authentication. Port 25 is only used for receiving email. Also ehlo is mandatory.
// IMAP $config['imap_host'] = 'localhost:143'; // SMTP $config['smtp_host'] = 'ssl://smtp.example.com:465'; $config['smtp_helo_host'] = 'webmail.example.com'; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p';
The key directory must be outside the website tree.
# cd /srv/www/vhosts/webmail.example.com/ # mkdir keys # chown apache:apache keys # tree -d -L 1 . ├── httpsdocs └── keys
# cd /srv/www/vhosts/webmail.example.com/httpsdocs/config # vi config.inc.php // REQUIRED! Keys directory for all users. // Must be writeable by PHP process, and not in the web server document root $config['enigma_pgp_homedir'] = '/srv/www/vhosts/webmail.example.com/keys'; // List of active plugins (in plugins/ directory) $config['plugins'] = [ 'archive', 'carddav', 'enigma', 'vcard_attachments', 'zipdownload', ];
Carddav is used to add contacts to the server. You need nextcloud or any competable service.
Running Carddav server like cloud.example.com or externals.
Logout from Roundcube.
Download the sourcecode. Installation manual is doc/INSTALL.md.
You need composer. If not already installed:
# dnf install composer
# cd /srv/www/vhosts/webmail.example.com/httpsdocs/config # vi config.inc.php // List of active plugins (in plugins/ directory) $config['plugins'] = [ 'archive', 'carddav', 'enigma', 'vcard_attachments', 'zipdownload', ];
# cd # unzip /path/to/rcmcarddav-master.zip # cd /srv/www/vhosts/mail.example.com/httpsdocs/ # sudo -u apache composer require --update-no-dev -o "roundcube/carddav:*"
You can find you contacts on Contacts.