How to install and configure Roundcube (webmail)
Posted by Md. Mahidul Hasan on 3:27 AM with 4 comments
How to install and configure Roundcube (webmail)
Install webserver and database:
~# apt-get install apache2 mysql-server php5 php5-mcrypt phpmyadmin -y
Install Roundcube from tar file:
~# mkdir /var/www/webmail/
~# cd /var/www/
~# wget http://sourceforge.net/projects/roundcubemail/files/roundcubemail/0.7/roundcubemail-0.7.tar.gz
~# tar xfz roundcubemail-0.7.tar.gz
~# mv roundcubemail-0.7/* webmail
~# rm roundcubemail-0.7.tar.gz
~# rm -rf roundcubemail-0.7
~# cd webmail
~# chown -R www-data:www-data temp/ logs/
~# mysql -u root -p (enter the given password while installing MYSQL )
CREATE DATABASE roundcubemail;
GRANT ALL PRIVILEGES ON roundcubemail.* TO mithupcs@localhost IDENTIFIED BY 'mithupcs';
FLUSH PRIVILEGES;
For Configuring RoundCube:
Now point your browser to http://172.16.0.1/webmail/installer/ and you will find tow NOT OK responding error
message. Don't worry about NOT AVAILABLE ERROR.(ignore them....) Do as follows.........
~# cd /etc/php5/apache2/conf.d
~# vim suhosin.ini (To change the suhosin entry....)
The error message is [ suhosin.session.encrypt: NOT OK]
Solution:
remove the ( ; ) sign from infront of the line & set its value (off)
Another error message is date.timezone NOT OK.....
Have to change the date.timezone to Asia / Dacca
Solution:
cd /etc/php5/apache2/
vim php.ini
remove the ( ; ) sign from infront of the line & set its value
date.timezone = 'Asia/Dacca'
If everything is okay click
"START INSTALLATION". The installer checks if everything is there. In case you see some red NOT OK
messages, you need to install or enable something. Follow the links to see what has to be done.
If everything checks out fine you are ready to create the configuration files, click "NEXT" to get
there. Get through the form and change the settings according to your needs. Do not forget to enter
the database setting that we made earlier within the "Database Setup" section.
DATABASE SETUP:
Database Server : localhost
Database Name : roundcubemail
Database UserName : mithupcs
Database Password : mithupcs
IMAP Settings:
default_host : localhost
default_port : 143
SMTP Settings:
smtp_server : localhost
When you are finished hit the "CREATE CONFIG" button and you will get two text boxes with the information
for main.inc.php and db.inc.php. Download this two file and paste them into /var/www/webmail/config directory.
Finally click "CONTINUE" and get to the last step of the installation process. Your configuration will
now be verified and tested against your webserver. Click "Initialize database" to create the necessary
tables in your database.
If there are no red NOT OK messages, you can also try to send a mail in order to test the SMTP settings.
Last but not least you have to remove the whole installer directory from the webserver. If this remains
active it can expose the configuration including passwords. We do this with the following command:
Test SMTP Config
Sender : mehedi@mithu.com (Domain should be included...)
Receipent: hasan@mithu.com (Domain should be included...)
Test IMAP Config
Username : mehedi (Only give the user name, not along with domain... )
Password : ******
FINAL TOUCH AFTER COMPLETION OF ROUNDCUBE CONFIG
Don't forget to remove the mail installer forlder after successful roundcube config...
# rm -rf /var/www/webmail/installer
For everyone to be able to access his webmail (under his domain name) you have to create or edit
the file /etc/apache2/conf.d/roundcube.conf and add the alias "/webmail" and some more information
about the directories:
~# vim /etc/apache2/conf.d/roundcube.conf
Copy and paste the following script:
# RoundCube alias and redirect functions
Alias /webmail /var/www/webmail
<Directory /var/www/webmail>
Options +FollowSymLinks
# This is needed to parse /var/www/webmail/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
</Directory>
# Protecting basic directories:
<Directory /var/www/webmail/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webmail/temp>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /var/www/webmail/logs>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
<Location /webmail>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://www.yourdomain.com:8080/webmail/ [L]
</Location>
</IfModule>
</IfModule>
Final TWEAKS
~# vim /var/www/webmail/config/main.inc.php
Give the following values as given below:
[...]
$rcmail_config['message_cache_lifetime'] = '30m';
[...]
$rcmail_config['default_host'] = 'localhost';
[...]
$rcmail_config['smtp_server'] = '%h';
[...]
$rcmail_config['session_lifetime'] = 30;
[...]
$rcmail_config['create_default_folders'] = TRUE;
[...]
Now go to http://yourServerIp/webmail to access the newly created webmail interface.
Trouble Shooting:
Problem: IF WEBSPACE doesn't user MOD-PHP then do the following....
~# vim /etc/apache2/conf.d/roundcube.conf
Submitted by xxs (not registered) on Fri, 2012-01-06 20:07.
~# vim /etc/apache2/conf.d/roundcube.conf
must be
# RoundCube alias and redirect functions
Alias /webmail /var/www/webmail
<Directory /var/www/webmail>
Options +FollowSymLinks
# This is needed to parse /var/www/webmail/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>
# Protecting basic directories:
<Directory /var/www/webmail/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webmail/temp>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /var/www/webmail/logs>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
To make sure it is working if the customer web-space doesn't use mod_php
Install webserver and database:
~# apt-get install apache2 mysql-server php5 php5-mcrypt phpmyadmin -y
Install Roundcube from tar file:
~# mkdir /var/www/webmail/
~# cd /var/www/
~# wget http://sourceforge.net/projects/roundcubemail/files/roundcubemail/0.7/roundcubemail-0.7.tar.gz
~# tar xfz roundcubemail-0.7.tar.gz
~# mv roundcubemail-0.7/* webmail
~# rm roundcubemail-0.7.tar.gz
~# rm -rf roundcubemail-0.7
~# cd webmail
~# chown -R www-data:www-data temp/ logs/
~# mysql -u root -p (enter the given password while installing MYSQL )
CREATE DATABASE roundcubemail;
GRANT ALL PRIVILEGES ON roundcubemail.* TO mithupcs@localhost IDENTIFIED BY 'mithupcs';
FLUSH PRIVILEGES;
For Configuring RoundCube:
Now point your browser to http://172.16.0.1/webmail/installer/ and you will find tow NOT OK responding error
message. Don't worry about NOT AVAILABLE ERROR.(ignore them....) Do as follows.........
~# cd /etc/php5/apache2/conf.d
~# vim suhosin.ini (To change the suhosin entry....)
The error message is [ suhosin.session.encrypt: NOT OK]
Solution:
remove the ( ; ) sign from infront of the line & set its value (off)
Another error message is date.timezone NOT OK.....
Have to change the date.timezone to Asia / Dacca
Solution:
cd /etc/php5/apache2/
vim php.ini
remove the ( ; ) sign from infront of the line & set its value
date.timezone = 'Asia/Dacca'
If everything is okay click
"START INSTALLATION". The installer checks if everything is there. In case you see some red NOT OK
messages, you need to install or enable something. Follow the links to see what has to be done.
If everything checks out fine you are ready to create the configuration files, click "NEXT" to get
there. Get through the form and change the settings according to your needs. Do not forget to enter
the database setting that we made earlier within the "Database Setup" section.
DATABASE SETUP:
Database Server : localhost
Database Name : roundcubemail
Database UserName : mithupcs
Database Password : mithupcs
IMAP Settings:
default_host : localhost
default_port : 143
SMTP Settings:
smtp_server : localhost
When you are finished hit the "CREATE CONFIG" button and you will get two text boxes with the information
for main.inc.php and db.inc.php. Download this two file and paste them into /var/www/webmail/config directory.
Finally click "CONTINUE" and get to the last step of the installation process. Your configuration will
now be verified and tested against your webserver. Click "Initialize database" to create the necessary
tables in your database.
If there are no red NOT OK messages, you can also try to send a mail in order to test the SMTP settings.
Last but not least you have to remove the whole installer directory from the webserver. If this remains
active it can expose the configuration including passwords. We do this with the following command:
Test SMTP Config
Sender : mehedi@mithu.com (Domain should be included...)
Receipent: hasan@mithu.com (Domain should be included...)
Test IMAP Config
Username : mehedi (Only give the user name, not along with domain... )
Password : ******
FINAL TOUCH AFTER COMPLETION OF ROUNDCUBE CONFIG
Don't forget to remove the mail installer forlder after successful roundcube config...
# rm -rf /var/www/webmail/installer
For everyone to be able to access his webmail (under his domain name) you have to create or edit
the file /etc/apache2/conf.d/roundcube.conf and add the alias "/webmail" and some more information
about the directories:
~# vim /etc/apache2/conf.d/roundcube.conf
Copy and paste the following script:
# RoundCube alias and redirect functions
Alias /webmail /var/www/webmail
<Directory /var/www/webmail>
Options +FollowSymLinks
# This is needed to parse /var/www/webmail/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
</Directory>
# Protecting basic directories:
<Directory /var/www/webmail/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webmail/temp>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /var/www/webmail/logs>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
<Location /webmail>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://www.yourdomain.com:8080/webmail/ [L]
</Location>
</IfModule>
</IfModule>
Final TWEAKS
~# vim /var/www/webmail/config/main.inc.php
Give the following values as given below:
[...]
$rcmail_config['message_cache_lifetime'] = '30m';
[...]
$rcmail_config['default_host'] = 'localhost';
[...]
$rcmail_config['smtp_server'] = '%h';
[...]
$rcmail_config['session_lifetime'] = 30;
[...]
$rcmail_config['create_default_folders'] = TRUE;
[...]
Now go to http://yourServerIp/webmail to access the newly created webmail interface.
Trouble Shooting:
Problem: IF WEBSPACE doesn't user MOD-PHP then do the following....
~# vim /etc/apache2/conf.d/roundcube.conf
Submitted by xxs (not registered) on Fri, 2012-01-06 20:07.
~# vim /etc/apache2/conf.d/roundcube.conf
must be
# RoundCube alias and redirect functions
Alias /webmail /var/www/webmail
<Directory /var/www/webmail>
Options +FollowSymLinks
# This is needed to parse /var/www/webmail/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>
# Protecting basic directories:
<Directory /var/www/webmail/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webmail/temp>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /var/www/webmail/logs>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
To make sure it is working if the customer web-space doesn't use mod_php
sok luw~
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteRoundcubeSkins.Com COLORFUL skins for Roundcube Webmail Client !!! Roundcube our skins are compatible for 0.8.x, 0.9.0 and Soon we will be coming up with all our roundcubeskins compatible with 1.0 beta release of roundcube webmail. So keep visiting our site for updates!!
ReplyDeleteMy name is Trisha Nelson, my 18 year old daughter, Tricia was diagnosed with herpes 3 years ago. Since then, we have moved from one hospital to another we tried all kinds of pills, but every effort to get rid of the virus was futile. The bubbles continued to reappear after a few months. My daughter was using 200mg acyclovir pills. 2 tablets every 6 hours and 15g of fusitin cream. and H5 POT. Permanganate with water to be applied twice a day, but all still do not show results. So, I was on the internet a few months ago, to look for other ways to save my only son. Only then did I come across a comment about the dr James herbal treatment and decided to give it a try. I contacted him and he prepared some herbs and sent them, along with guidance on how to use them via the DHL courier service. my daughter used it as directed by dr James and in less than 14 days, my daughter recovered her health. You should contact dr James today directly at his email address for any type of health problem; lupus disease, mouth ulcer, mouth cancer, body pain, fever, hepatitis ABC, syphilis, diarrhea, HIV / AIDS, Huntington's disease, back acne, chronic kidney failure, addison's disease, chronic pain, Crohn's pain, cystic fibrosis, fibromyalgia, inflammatory Bowel disease, fungal nail disease, Lyme disease, Celia disease, Lymphoma, Major depression, Malignant melanoma, Mania, Melorheostosis, Meniere's disease, Mucopolysaccharidosis, Multiple sclerosis, Muscular dystrophy, Rheumatoid arthritis Alzheimer's disease, parkinson's disease, vaginal cancer, epilepsy Anxiety Disorders, Autoimmune Disease, Back Pain, Back Sprain, Bipolar Disorder, Brain Tumor, Malignant, Bruxism, Bulimia, Cervical Disc Disease, Cardiovascular Disease, Neoplasms , chronic respiratory disease, mental and behavioral disorder, Cystic Fibrosis, Hypertension, Diabetes, Asthma, Inflammatory Media autoimmune arthritis ed. chronic kidney disease, inflammatory joint disease, impotence, alcohol spectrum feta, dysthymic disorder, eczema, tuberculosis, chronic fatigue syndrome, constipation, inflammatory bowel disease. and many more; contact him at drjamesherbalmix@gmail.com./ also at +2348152855846
ReplyDelete