Roundcube
Roundcube is a free and open source webmail which provides a desktop like user interface. Roundcube is easy to install and configure for instance on a LAMP server. Roundcube requires a web server (for instance Apache2), an SMTP server (for instance Postfix), IMAP (for instance Dovecot) and a database (for instance Mysql).
This manual will work for Roundcube 1.0 and newer versions.
Sisällysluettelo
Installation
apt-get install apache2 php5 php-pear php5-mysql php5-mcrypt php5-intl
Download installation package http://roundcube.net/
wget http://softlayer-ams.dl.sourceforge.net/project/roundcubemail/roundcubemail/1.0.5/roundcubemail-1.0.5.tar.gz
Extract tar package
tar -xjf roundcubemail-1.0.5.tar.gz
Move Roundcube to your preferred location on your server
mv ~/roundcube /var/www
You can also install Roundcube using aptitude (we don't recommend doing it like this).
aptitude install roundcube
If you do this, the configuration folder will be located in
/etc/roundcube
Configuration
Define write privileges for www-data user (web server user) into the /temp and /logs directories.
Configuring Apache
Open the Apache configuration file
nano /etc/apache2/sites-available/default
Add the following lines into the default file. You may need to change the folder path depending on where you installed roundcube.
<Directory /var/www/roundcube> Options +FollowSymLinks # AddDefaultCharset UTF-8 AddType text/x-component .htc <IfModule mod_php5.c> php_flag display_errors Off php_flag log_errors On # php_value error_log logs/errors php_value upload_max_filesize 10M php_value post_max_size 12M php_value memory_limit 64M php_flag zlib.output_compression Off php_flag magic_quotes_gpc Off php_flag magic_quotes_runtime Off php_flag zend.ze1_compatibility_mode Off php_flag suhosin.session.encrypt Off #php_value session.cookie_path / php_flag session.auto_start Off php_value session.gc_maxlifetime 21600 php_value session.gc_divisor 500 php_value session.gc_probability 1 </IfModule>
We block access to the config directory
<Directory /var/www/roundcube/config> Options -FollowSymLinks AllowOverride None Order allow,deny Deny from all </Directory>
We block access to the temp directory
<Directory /var/www/roundcube/temp> Options -FollowSymLinks AllowOverride None Order allow,deny Deny from all </Directory>
We block access to the logs directory
<Directory /var/www/roundcube/logs> Options -FollowSymLinks AllowOverride None Order allow,deny Deny from all </Directory>
Save the changes and restart the Apache2 service.
Configuring Roundcube
Our example configuration is available for download from https://github.com/Taistowiki/roundcube
Create file ~/roundcube/config/config.inc.php and copy the content below into that file. You can also use the installation program which is accessible from http://server_ip/roundcube/installer
<?php /* Local configuration for Roundcube Webmail */
Connecting DSN reading to your database using a writing operator. Written in the form (supports PEAR MDB2): db_provider://user:password@host/database
More examples: http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
Supports Mysql, Pgsql, sqlite, mssql and sqlsrv. Be sure to note that Sqlite uses an absolute path: sqlite:////full/path/to/sqlite.db?mode=0646
$config['db_dsnw'] = 'mysql://roundcube:password@localhost/roundcube';
Define the IMAP server's network address. If you leave this empty, then then you will be prompted for a login server as you try to log in. Using an array function you can get a list of different e-mail servers which you can log on to. For SSL or TLS connections use the prefix ssl:// or tls://
You can use the following variables:
- %n - hostname ($_SERVER['SERVER_NAME'])
- %t - hostname without the first part
- %d - domain (http domain$_SERVER['HTTP_HOST'] without the first part)
- %s - domain name after '@' in the login screen
For example: %n = mail.domain.tld, %t = domain.tld
$config['default_host'] = 'localhost';
Define the SMPT server's network address. When using SSL or TLS connections, use the prefix ssl:// or tls:// . If you leave this empty, PHP mail() function will be used.
You can use the following variables:
- %h - Käyttäjän IMAP isäntänimi
- %n - isäntänimi ($_SERVER['SERVER_NAME'])
- %t - isäntämimi ilman ensimmäistä osaa
- %d - domain (http domain$_SERVER['HTTP_HOST'] ilman esimmäistä osaa)
- %z - IMAP domain (IMAP isäntänimi ilman ensimmäistä osaa)
$config['smtp_server'] = 'localhost';
Palveluntarjoajan verkko-osoite josta tämän palvelunkäyttäjät saavat apua Roundcuben käyttöön. Älä linkkaa roundcube.net verkkosivulle!
$config['support_url'] = ;
Tämä avain kryptaa käyttäjän IMAP salasanan kun tallennetaan tietokantaan. Käytä vähintään 24 merkkiä.
$config['des_key'] = 'H=Mgd81+3Hn+VeKnU?h*bNX!';
Lista lisäosista (plugins/ hakemistosta)
$config['plugins'] = array();