Ero sivun ”Roundcube/en” versioiden välillä
(Ak: Uusi sivu: Move Roundcube to your preferred location on your server) |
(Ak: Uusi sivu: List of additional components (plugins/ directory)) |
||
(24 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 22: | Rivi 22: | ||
mv ~/roundcube /var/www | mv ~/roundcube /var/www | ||
− | + | You can also install Roundcube using aptitude (we don't recommend doing it like this). | |
aptitude install roundcube | aptitude install roundcube | ||
− | + | If you do this, the configuration folder will be located in | |
/etc/roundcube | /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 | 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> | <Directory /var/www/roundcube> | ||
Rivi 67: | Rivi 67: | ||
− | + | We block access to the config directory | |
<Directory /var/www/roundcube/config> | <Directory /var/www/roundcube/config> | ||
Options -FollowSymLinks | Options -FollowSymLinks | ||
Rivi 75: | Rivi 75: | ||
</Directory> | </Directory> | ||
− | + | We block access to the temp directory | |
<Directory /var/www/roundcube/temp> | <Directory /var/www/roundcube/temp> | ||
Options -FollowSymLinks | Options -FollowSymLinks | ||
Rivi 83: | Rivi 83: | ||
</Directory> | </Directory> | ||
− | + | We block access to the logs directory | |
<Directory /var/www/roundcube/logs> | <Directory /var/www/roundcube/logs> | ||
Options -FollowSymLinks | Options -FollowSymLinks | ||
Rivi 91: | Rivi 91: | ||
</Directory> | </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 | <?php | ||
/* Local configuration for Roundcube Webmail */ | /* 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'; | $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 - | + | * %n - hostname ($_SERVER['SERVER_NAME']) |
− | * %t - | + | * %t - hostname without the first part |
− | * %d - domain (http domain$_SERVER['HTTP_HOST'] | + | * %d - domain (http domain$_SERVER['HTTP_HOST'] without the first part) |
− | * %s - | + | * %s - domain name after '@' in the login screen |
− | + | For example: %n = mail.domain.tld, %t = domain.tld | |
$config['default_host'] = 'localhost'; | $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 - | + | * %h - Users IMAP host name |
− | * %n - | + | * %n - host name ($_SERVER['SERVER_NAME']) |
− | * %t - | + | * %t - host name without the first part |
− | * %d - domain (http domain$_SERVER['HTTP_HOST'] | + | * %d - domain (http domain$_SERVER['HTTP_HOST'] without the first part) |
− | * %z - IMAP domain (IMAP | + | * %z - IMAP domain (IMAP host name without the first part) |
$config['smtp_server'] = 'localhost'; | $config['smtp_server'] = 'localhost'; | ||
− | + | The service provider's network address where users can get help for Roundcube. Do not link to the roundcube.net website! | |
$config['support_url'] = ''; | $config['support_url'] = ''; | ||
− | + | This key crypts the user's IMAP password when it is saved in the database. Use a minimum of 24 characters. | |
$config['des_key'] = 'H=Mgd81+3Hn+VeKnU?h*bNX!'; | $config['des_key'] = 'H=Mgd81+3Hn+VeKnU?h*bNX!'; | ||
− | + | List of additional components (plugins/ directory) | |
$config['plugins'] = array(); | $config['plugins'] = array(); |
Nykyinen versio 20. elokuuta 2015 kello 08.31
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 - Users IMAP host name
- %n - host name ($_SERVER['SERVER_NAME'])
- %t - host name without the first part
- %d - domain (http domain$_SERVER['HTTP_HOST'] without the first part)
- %z - IMAP domain (IMAP host name without the first part)
$config['smtp_server'] = 'localhost';
The service provider's network address where users can get help for Roundcube. Do not link to the roundcube.net website!
$config['support_url'] = ;
This key crypts the user's IMAP password when it is saved in the database. Use a minimum of 24 characters.
$config['des_key'] = 'H=Mgd81+3Hn+VeKnU?h*bNX!';
List of additional components (plugins/ directory)
$config['plugins'] = array();