Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th March 2011, 07:41
Romoku Romoku is offline
Junior Member
 
Join Date: Jun 2010
Posts: 14
Thanks: 4
Thanked 9 Times in 3 Posts
Default HOWTO: Replace Squirrelmail for Roundcube on ISPConfig 3 for Debian Lenny

After seeing the tutorial for squeeze I said, "I must have it!"

So I did it.

First thing is: I didn't really care about the whole SSL thing from 8omas's guide. I find it annoying when I http://mydomain.tld:8080 and an error 400 pops "please go to https://hostname.mydomain.tld:8080" since hostname.mydomain.tld is internal, but I will need to fix it somehow.

I also found that one cannot do a simple [apache] rewrite rule to solve this problem since port 8080 is listening over SSL which means one cannot have two listeners on the same port.

Either way to the good part.

First of all roundcube isn't part of the lenny repository, so we are gonna build it from scratch.

Italics mean a command.
# means do this with privileges (root, sudo, etc..)

Step 0: Uninstall squirrelmail (#apt-get remove squirrelmail)

Step 1: Lets get roundcube!

$ cd /tmp
$ wget this
$ tar xvf roundcubemail-0.5.1.tar.gz
$ mv roundcubemail-0.5.1 roundcube
# chown -R www-data:www-data roundcube
# chmod g+w roundcube/temp
# chmod g+w roundcube/logs
# mv roundcube /usr/share

Step 2: Lets make a mysql database!

# mysql -u root -p
mysql> CREATE DATABASE roundcubemail;
mysql> GRANT ALL PRIVILEGES ON roundcubemail.* TO username@localhost IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> exit;

Step 3: Lets mod apache!

# cd /etc/apache2/sites-available
# touch roundcube.conf
# nano roundcube.conf

Step 4: Copy paste Initial Config!

Code:
Alias /webmail /usr/share/roundcube

<Directory /usr/share/roundcube>
  Options Indexes FollowSymLinks
  AllowOverride None
  DirectoryIndex index.php
  Order Allow,Deny
  Allow from all
</Directory>
<Directory /usr/share/roundcube/*>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/config>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/temp>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/logs>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/skins>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/installer>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/bin>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/SQL>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/program>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/plugins>
  Allow from all
</Directory>
Step 5: Lets link it!
# cd ..
# ln sites-available/roundcube.conf sites-enabled/000-roundcube
# /etc/init.d/apache2 reload

Step 6: Lets install it!

Go to http://yourdomain.tld/webmail/installer
Run the setup:

Use your mail server's IP address for the IMAP host.

Type in MySQL info.

Configure any additional options to your current config.

Now you will be prompted to download the main.inc.php and db.inc.php.

Either try to wget them from your SSH or throw them on Mediafire or any other file hosting service with direct download links.

Step 6: test the config!

# cd /usr/share/roundcube/config
# wget www.urltofile.tld/main.inc.php
# wget www.urltofile.tld/db.inc.php

Step 6.A.: From Step 3 in the setup make sure your config passes!

Step 7: Now lets clean it up!

# cd /usr/share/roundcube
# rm -r installer/
# cd /etc/apache2
# rm sites-enabled/000-roundcube
# mv sites-available/roundcube.conf sites-available/roundcube.conf.old ((Or just remove it))
# touch sites-available/roundcube.conf
# ln sites-available/roundcube.conf sites-enabled/000-roundcube
# nano sites-available/roundcube.conf

Code:
Alias /webmail /usr/share/roundcube

<Directory /usr/share/roundcube>
  Options Indexes FollowSymLinks
  AllowOverride None
  DirectoryIndex index.php
  Order Allow,Deny
  Allow from all
</Directory>
<Directory /usr/share/roundcube/*>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/config>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/temp>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/logs>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/skins>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/bin>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/SQL>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/program>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/plugins>
  Allow from all
</Directory>
# /etc/init.d/apache2 reload

Step 8: ???

Step 9: Profit! You now have roundcube.

Last edited by Romoku; 16th March 2011 at 20:22.
Reply With Quote
The Following 7 Users Say Thank You to Romoku For This Useful Post:
brainz (23rd September 2011), bruno_floyd (15th December 2011), falko (8th March 2011), GaryKeeling (20th June 2011), HyperAtom (12th June 2011), myicare (3rd April 2011), Toucan (16th March 2011)
Sponsored Links
  #2  
Old 16th March 2011, 18:51
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 479
Thanks: 78
Thanked 41 Times in 34 Posts
Default

Thanks - worked well for me. The only addition I would make is, assuming I hadn't done anything wrong, is the installer didn't start up from the root directory of roundcube. I had to changed:

Code:
Go to http://yourdomain.tld/webmail
to

Code:
Go to http://yourdomain.tld/webmail/installer
Thanks
Reply With Quote
The Following User Says Thank You to Toucan For This Useful Post:
Romoku (16th March 2011)
  #3  
Old 18th July 2011, 08:40
metaldrummer metaldrummer is offline
Senior Member
 
Join Date: Dec 2006
Posts: 108
Thanks: 18
Thanked 1 Time in 1 Post
Question

Hi:
Thanks por this how to.

When go to http://ns.mydomain.nn/webmail (host name of server) is ok... but when go to http://www.clientwebhosting.nn/webmail show error 500

This is error.log from apache in client site.

Quote:
[Mon Jul 18 01:29:13 2011] [error] [client 190.110.155.89] PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/share/roundcube/index.php) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/tmp:/var/www/clientwebhosting.nn/web:/srv/www/clientwebhosting.nn/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in Unknown on line 0
[Mon Jul 18 01:29:13 2011] [error] [client 190.110.155.89] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
[Mon Jul 18 01:29:13 2011] [error] [client 190.110.155.89] PHP Fatal error: Unknown: Failed opening required '/usr/share/roundcube/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
Any can help me?
Regards
Reply With Quote
  #4  
Old 18th July 2011, 13:35
neobcn neobcn is offline
Junior Member
 
Join Date: Feb 2011
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Romoku View Post
After seeing the tutorial for squeeze I said, "I must have it!"

So I did it.

First thing is: I didn't really care about the whole SSL thing from 8omas's guide. I find it annoying when I http://mydomain.tld:8080 and an error 400 pops "please go to https://hostname.mydomain.tld:8080" since hostname.mydomain.tld is internal, but I will need to fix it somehow.

I also found that one cannot do a simple [apache] rewrite rule to solve this problem since port 8080 is listening over SSL which means one cannot have two listeners on the same port.

Either way to the good part.

First of all roundcube isn't part of the lenny repository, so we are gonna build it from scratch.

Italics mean a command.
# means do this with privileges (root, sudo, etc..)

Step 0: Uninstall squirrelmail (#apt-get remove squirrelmail)

Step 1: Lets get roundcube!

$ cd /tmp
$ wget this
$ tar xvf roundcubemail-0.5.1.tar.gz
$ mv roundcubemail-0.5.1 roundcube
# chown -R www-data:www-data roundcube
# chmod g+w roundcube/temp
# chmod g+w roundcube/logs
# mv roundcube /usr/share

Step 2: Lets make a mysql database!

# mysql -u root -p
mysql> CREATE DATABASE roundcubemail;
mysql> GRANT ALL PRIVILEGES ON roundcubemail.* TO username@localhost IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> exit;

Step 3: Lets mod apache!

# cd /etc/apache2/sites-available
# touch roundcube.conf
# nano roundcube.conf

Step 4: Copy paste Initial Config!

Code:
Alias /webmail /usr/share/roundcube

<Directory /usr/share/roundcube>
  Options Indexes FollowSymLinks
  AllowOverride None
  DirectoryIndex index.php
  Order Allow,Deny
  Allow from all
</Directory>
<Directory /usr/share/roundcube/*>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/config>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/temp>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/logs>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/skins>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/installer>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/bin>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/SQL>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/program>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/plugins>
  Allow from all
</Directory>
Step 5: Lets link it!
# cd ..
# ln sites-available/roundcube.conf sites-enabled/000-roundcube
# /etc/init.d/apache2 reload

Step 6: Lets install it!

Go to http://yourdomain.tld/webmail/installer
Run the setup:

Use your mail server's IP address for the IMAP host.

Type in MySQL info.

Configure any additional options to your current config.

Now you will be prompted to download the main.inc.php and db.inc.php.

Either try to wget them from your SSH or throw them on Mediafire or any other file hosting service with direct download links.

Step 6: test the config!

# cd /usr/share/roundcube/config
# wget www.urltofile.tld/main.inc.php
# wget www.urltofile.tld/db.inc.php

Step 6.A.: From Step 3 in the setup make sure your config passes!

Step 7: Now lets clean it up!

# cd /usr/share/roundcube
# rm -r installer/
# cd /etc/apache2
# rm sites-enabled/000-roundcube
# mv sites-available/roundcube.conf sites-available/roundcube.conf.old ((Or just remove it))
# touch sites-available/roundcube.conf
# ln sites-available/roundcube.conf sites-enabled/000-roundcube
# nano sites-available/roundcube.conf

Code:
Alias /webmail /usr/share/roundcube

<Directory /usr/share/roundcube>
  Options Indexes FollowSymLinks
  AllowOverride None
  DirectoryIndex index.php
  Order Allow,Deny
  Allow from all
</Directory>
<Directory /usr/share/roundcube/*>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/config>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/temp>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/logs>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/skins>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/bin>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/SQL>
  Deny from all
</Directory>
<Directory /usr/share/roundcube/program>
  Allow from all
</Directory>
<Directory /usr/share/roundcube/plugins>
  Allow from all
</Directory>
# /etc/init.d/apache2 reload

Step 8: ???

Step 9: Profit! You now have roundcube.

Any issue, i install roundcube in DEBIAN & , with the debian repository with :

apt-get roundcube , i need install the last version, i uninstall my install roundcube aptg-get remove roundcube.

My question is: your guide for install roundcube the last version is fcuntion in debian 6??

other question , my pane is in https port 8443 , what hapen for this isntalltion?

thx
Reply With Quote
  #5  
Old 31st December 2011, 17:30
djkoelkast djkoelkast is offline
Member
 
Join Date: Sep 2006
Posts: 63
Thanks: 1
Thanked 1 Time in 1 Post
 
Default

Thanks for the howto, I used the latest version of roundcube. It works as long as I use the intenal IP of the server

http://192.168.x.x/webmail > works fine
but
http://www.domain.tld/webmmail gives me a download called "webmail". It actually is the php index page of roundcube. How can I solve this?
Reply With Quote
Reply

Bookmarks

Tags
debian lenny, howto, ispconfig 3, roundcube

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Squirrelmail with ISPConfig 3 dpicella Installation/Configuration 15 7th January 2011 05:30
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 15:31
ISPConfig installation into multiple OpenVZ containers letezo Installation/Configuration 11 3rd March 2009 23:47
How to install OpenOficeOrg 3.0.0 in Ubuntu 8.04 ernesthagger HOWTO-Related Questions 43 23rd December 2008 15:42
Howto enable apache server-status for ISPConfig chillifire Installation/Configuration 2 21st December 2008 06:26


All times are GMT +2. The time now is 11:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.