Author Topic: How to install Roundcube for Plesk  (Read 36903 times)

Offline mk.keck

  • Newbie
  • *
  • Posts: 9
How to install Roundcube for Plesk
« on: July 18, 2009, 04:29:16 AM »
Hi all,

some days ago I've successfully installed Roundcube on CentOS 5 with Plesk 9.2.1.

But I find another way to get Roundcube to work with Plesk:

Notice
  • You need Plesk 9.x.x with installed AtMail
  • You need write-access to the folder "/var/www/"
  • You need ftp-access to the folder "/var/www/"
    or you can use something like WinSCP.
  • You need root-access to your server ;D
  • You make this at your own risk!
Preparing RoundCube

  • Download Roundcube
    The 0.3 beate is really stable and has new api for plugins. Perhabs you may also use SVN-Version and keep it updated. But I've not tested.
  • Unpack Roundcube
    into a local folder. Not on your server, because we have to make some changes.
  • RoundCube Database
    First we must create a new database for the Roundcube Webmail.
    • Login into you Plesk-Account as Administrator
    • Click on the "Home" and than on "Database Servers"
    • Click in the server list on the icon "... access this server via DB WebAdmin"

    in the line "Local MySQL server (default for MySQL)".
    PhpMyAdmin should be opend now, If not, please check your popupblocker settings.
  • Create a new database called "roundcube"
  • Browse on your local machine to the folder "/roundcubemail/SQL"
    and oben the file "mysql.initial.sql" with a text-editor like notepad.
  • Click in phpMyAdmin on the "SQL"-tab copy all from the text-editor

into the large textbox.
Click "Go". The Database should be created.
  • Now create a database-user for roundcube.

Click in the left frame on the "Home"-icon and then select in right frame "Privileges".
In the "User overview" click on the icon "Add a new user" and enter follow:
Code: [Select]
[B]Username[/B] (use text field): yourusername
[B]Host[/B]     (Local):          localhost
[B]Password[/B] (use text field): yourpassword
[B]Retype[/B]:                    yourpassword
Click on "Go"-button
  • Setup the "Database-specific privileges"
  • In the drobdown-list "Add privileges on the following database" select the entry "roundcube"
  • Click on "Check all"
  • Click on the "Go"-button

 
[/LIST]
 
  • Configuration
    • Copy the code below to the new file "/roundcubemail/config/db.inc.php" on your local machine
      <?php

      /**
       * -----------------------------------------------------------------------
       * Configuration file for database access
       * 
       * This file is part of the RoundCube Webmail client
       * Copyright (C) 2005-2009, RoundCube Dev. - Switzerland
       * Licensed under the GNU GPL
       * -----------------------------------------------------------------------
       */

      $rcmail_config = array();

      $rcmail_config['db_dsnw'] = 'mysql://yourusername:yourpassword@localhost/roundcube';
      $rcmail_config['db_dsnr'] = '';

      $rcmail_config['db_max_length'] = 512000;
      $rcmail_config['db_persistent'] = FALSE;

      $rcmail_config['db_table_users'] = 'users';
      $rcmail_config['db_table_identities'] = 'identities';
      $rcmail_config['db_table_contacts'] = 'contacts';
      $rcmail_config['db_table_session'] = 'session';
      $rcmail_config['db_table_cache'] = 'cache';
      $rcmail_config['db_table_messages'] = 'messages';

      $rcmail_config['db_sequence_users'] = 'user_ids';
      $rcmail_config['db_sequence_identities'] = 'identity_ids';
      $rcmail_config['db_sequence_contacts'] = 'contact_ids';
      $rcmail_config['db_sequence_cache'] = 'cache_ids';
      $rcmail_config['db_sequence_messages'] = 'message_ids';
      ?>

    • Copy the code below to the new file "/roundcubemail/config/main.inc.php" on your local machine
      <?php

      /**
       * -----------------------------------------------------------------------
       * Main configuration file
       *
       * This file is part of the RoundCube Webmail client
       * Copyright (C) 2005-2009, RoundCube Dev. - Switzerland
       * Licensed under the GNU GPL
       * -----------------------------------------------------------------------
       */

      $rcmail_config = array();

      $tmp strtolower($_SERVER['HTTP_HOST']);
      $tmp str_replace('www.'''$tmp);
      $tmp str_replace('webmail.'''$tmp);
      $rcmail_config['real_host_name'] = $tmp;
      $rcmail_config['real_mail_host'] = 'mail.' $tmp;
      unset(
      $tmp);

      $rcmail_config['default_host'] = $rcmail_config['real_mail_host'];
      $rcmail_config['default_port'] = 143;

      $rcmail_config['username_domain'] = ''// $rcmail_config['real_host_name'];
      $rcmail_config['mail_domain'] = ''// $rcmail_config['real_host_name'];

      $rcmail_config['smtp_server'] = $rcmail_config['real_mail_host'];
      $rcmail_config['smtp_port'] = 25;
      $rcmail_config['smtp_user'] = '%u';
      $rcmail_config['smtp_pass'] = '%p';
      $rcmail_config['smtp_auth_type'] = '';
      $rcmail_config['smtp_helo_host'] = '';
      $rcmail_config['smtp_log'] = TRUE;

      $rcmail_config['imap_auth_type'] = null;
      $rcmail_config['imap_root']      = null;
      $rcmail_config['imap_delimiter'] = null;

      $rcmail_config['include_host_config'] = FALSE;
      $rcmail_config['sendmail_delay'] = 30;

      $rcmail_config['debug_level'] = 1;
      $rcmail_config['log_dir'] = 'logs/';
      $rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
      $rcmail_config['log_driver'] = 'file';
      $rcmail_config['log_logins'] = FALSE;
      $rcmail_config['syslog_id'] = 'roundcube';
      $rcmail_config['syslog_facility'] = LOG_USER;

      $rcmail_config['temp_dir'] = 'temp/';
      $rcmail_config['plugins_dir'] = 'plugins/';
      $rcmail_config['plugins'] = array(
          
      'emoticons',
          
      'markasjunk'
      );

      $rcmail_config['enable_caching'] = TRUE;
      $rcmail_config['message_cache_lifetime'] = '14d';
      $rcmail_config['list_cols'] = array('subject''from''date''size''flag''attachment');
      $rcmail_config['skin_include_php'] = FALSE;

      $rcmail_config['auto_create_user'] = TRUE;
      $rcmail_config['des_key'] = '9IDJVL8%nf6%RTgOwpyfkuDv';
      $rcmail_config['double_auth'] = FALSE;
      $rcmail_config['ip_check'] = FALSE;
      $rcmail_config['keep_alive'] = 60;
      $rcmail_config['min_keep_alive'] = 60;
      $rcmail_config['session_lifetime'] = 10;
      $rcmail_config['session_domain'] = '.' $rcmail_config['real_host_name'];
      $rcmail_config['virtuser_file'] = '';
      $rcmail_config['virtuser_query'] = '';

      $rcmail_config['language'] = null;
      $rcmail_config['date_short'] = 'D H:i';
      $rcmail_config['date_long'] = 'd.m.Y H:i';
      $rcmail_config['date_today'] = 'H:i';
      $rcmail_config['useragent'] = 'RoundCube Webmail/0.3-beta';
      $rcmail_config['quota_zero_as_unlimited'] = TRUE;
      $rcmail_config['create_default_folders'] = TRUE;
      $rcmail_config['check_all_folders'] = FALSE;
      $rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');
      $rcmail_config['protect_default_folders'] = TRUE;
      $rcmail_config['drafts_mbox'] = 'Drafts';
      $rcmail_config['junk_mbox'] = 'Junk';
      $rcmail_config['sent_mbox'] = 'Sent';
      $rcmail_config['trash_mbox'] = 'Trash';
      $rcmail_config['delete_always'] = FALSE;
      $rcmail_config['default_charset'] = 'ISO-8859-1';
      $rcmail_config['enable_spellcheck'] = TRUE;
      $rcmail_config['spellcheck_engine'] = 'googlie';
      $rcmail_config['spellcheck_languages'] = NULL;
      $rcmail_config['spellcheck_uri'] = '';
      $rcmail_config['address_book_type'] = 'sql';
      $rcmail_config['autocomplete_addressbooks'] = array('sql');
      $rcmail_config['ldap_public'] = array();
      $rcmail_config['dont_override'] = array();

      $rcmail_config['enable_installer'] = FALSE;
      $rcmail_config['generic_message_footer'] = '';
      $rcmail_config['http_received_header'] = FALSE;
      $rcmail_config['http_received_header_encrypt'] = FALSE;

      $rcmail_config['identities_level'] = 0;
      $rcmail_config['mail_header_delimiter'] = NULL;
      $rcmail_config['max_pagesize'] = 500;

      $rcmail_config['mdn_requests'] = 0;
      $rcmail_config['mime_magic'] = '/usr/share/misc/magic';
      $rcmail_config['product_name'] = 'RoundCube WebMail';
      $rcmail_config['skin'] = 'default';

      $rcmail_config['draft_autosave'] = 300;
      $rcmail_config['dst_active'] = (bool)date('I');
      $rcmail_config['flag_for_deletion'] = FALSE;
      $rcmail_config['focus_on_new_message'] = TRUE;
      $rcmail_config['htmleditor'] = TRUE// FALSE;
      $rcmail_config['inline_images'] = TRUE;
      $rcmail_config['logout_expunge'] = FALSE;
      $rcmail_config['logout_purge'] = FALSE;
      $rcmail_config['message_sort_col'] = 'date';
      $rcmail_config['message_sort_order'] = 'DESC';
      $rcmail_config['mime_param_folding'] = 0;
      $rcmail_config['pagesize'] = 50;
      $rcmail_config['prefer_html'] = TRUE;
      $rcmail_config['prettydate'] = FALSE// TRUE;
      $rcmail_config['preview_pane'] = TRUE// FALSE;
      $rcmail_config['read_when_deleted'] = TRUE;
      $rcmail_config['show_images'] = 2// 0;
      $rcmail_config['skip_deleted'] = FALSE;
      $rcmail_config['timezone'] = 'auto';
      ?> 

Uploading Roundcube

  • Rename your orgininal folder on your server:
    /var/www/atmail into /var/www/atmail.org (or something else)
  • Create a clean new folder /var/www/atmail
  • Copy all files from your local folder /roundcubemail/ to the
    remote folder /var/www/atmail.
Plesk Setting
Select for your mail-address as WebMail "AtMail".

ATTENTION
Perhabs your Roundcube (because it is stored in folder /var/www/atmail/) would be overwritten, if you make a Plesk-Update. Please make
a backup before you update Plesk.
« Last Edit: August 28, 2009, 06:41:35 AM by mk.keck »
Replace AtMail or Horde with Roundcube on Servers with installed Plesk 9.x.

Offline wskeggs

  • Newbie
  • *
  • Posts: 4
Probem with this approach
« Reply #1 on: September 05, 2009, 07:19:59 AM »
Hi,

I implemented your approach and it works nicely for certain domains. I find I can only login with emails already created in plesk that I have used previously with atmail. Others just dont login, I get the following errors in the error log:

PHP Notice:  Authentication for sales failed (LOGIN): "a001 NO Login failed." in /var/www/atmail/program/include/bugs.incs on line 86, referer: http://domain.com/


This error from time to time:
PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /var/www/atmail/program/lib/imap.inc on line 260

This error when composing messages:
PHP Warning:  file_exists() [function.file-exists]: open_basedir restrict in effect. File(/dev/random) is not within the allowed path(s): (/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp) in /var/www/atmail/program/lib/Auth/SASL/DigestMD5.php on line 184, referer: http://domain.com/?_task=mail&_id=8199187144aa1abe6bd16d&_action=compose

Does the atmail configuration in the httpd conf.d folder need to be modified for roundcube?

Edit: By the way I am running plesk 9.2.1 on centos 5 and I am using the .3 stable of roundcube.
« Last Edit: September 05, 2009, 07:21:09 AM by wskeggs »

Offline wskeggs

  • Newbie
  • *
  • Posts: 4
Issue resolved
« Reply #2 on: September 20, 2009, 01:40:52 AM »
Appears as though this has been resolved with the latest svn trunk

Offline adamas

  • Newbie
  • *
  • Posts: 8
How to install Roundcube for Plesk
« Reply #3 on: January 02, 2011, 10:23:57 AM »
hi, keck

why at my server box still error..

so, like this

Checking PHP version
Version:  OK(PHP 5.2.6-1+lenny9 detected)
Checking PHP extensions

The following modules/extensions are required to run RoundCube:
PCRE:  OK
DOM:  OK
Session:  OK
XML:  OK
JSON:  OK

The next couple of extensions are optional and recommended to get the best performance:
FileInfo:  NOT AVAILABLE(See PHP: Fileinfo - Manual)
Libiconv:  OK
Multibyte:  OK
OpenSSL:  OK
Mcrypt:  OK
Checking available databases

Check which of the supported extensions are installed. At least one of them is required.
MySQL:  OK
MySQLi:  OK
PostgreSQL:  NOT AVAILABLE(Not installed)
SQLite (v2):  NOT AVAILABLE(Not installed)
Check for required 3rd party libs

This also checks if the include path is set correctly.
PEAR:  OK

Warning: include_once(MDB2.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/psa-horde/new/installer/utils.php on line 41

Warning: include_once() [function.include]: Failed opening 'MDB2.php' for inclusion (include_path='/usr/share/psa-horde:/usr/share/psa-horde/lib:/usr/share/psa-pear:.') in /usr/share/psa-horde/new/installer/utils.php on line 41
MDB2:  NOT OK(Failed to load MDB2.php; See MDB2)
Net_SMTP:  OK
Mail_mime:  OK
Checking php.ini/.htaccess settings

The following settings are required to run RoundCube:
file_uploads:  OK
session.auto_start:  OK
zend.ze1_compatibility_mode:  OK
mbstring.func_overload:  OK
suhosin.session.encrypt:  OK

The following settings are optional and recommended:
date.timezone:  NOT OK(Could be set)

Sorry but your webserver does not meet the requirements for RoundCube!
Please install the missing modules or fix the php.ini settings according to the above check results.
Hint: only checks showing NOT OK need to be fixed.

can you help me,,, please urgent

thanks

rr

Offline mk.keck

  • Newbie
  • *
  • Posts: 9
How to install Roundcube for Plesk
« Reply #4 on: March 24, 2011, 07:13:02 AM »
Hi adams,

you've tried to install roundcube in PSA-Horde.
That's not a good solution.

This threat explains how to setup roundcube as a replacement for AtMail.

Please take a look here:http://www.roundcubeforum.net/general-discussion/1588-setup-roundcube-plesk-2.html#post20057
That threat explains the replaycemtn for Horde ;)

Regards
Michael
« Last Edit: March 24, 2011, 07:14:53 AM by mk.keck »
Replace AtMail or Horde with Roundcube on Servers with installed Plesk 9.x.

Offline global_kevin

  • Newbie
  • *
  • Posts: 5
How to install Roundcube for Plesk
« Reply #5 on: July 06, 2011, 05:09:16 AM »
Hey mc.keck, you may be just the guy i'm looking for

I have been running roundcube through plesk using the old Atmail swap and now i find my self needing both (fussy users).

1. I have a tested, version of roundcube 0.5.3 sitting in var/www/roundcube.
2. I also have added roundcube to the webmails table in the plesk (psa) database. so can now choose it from the list.

I'm left with the last pice of the puzzle missing.

When i go to webmail.domain.com that i've set the webmail as 'Roundcube'. I currently get nothing.

so why no redirect even though i've stated the 'docroot' field in the webmails table as ar/www/roundcube.


Anyone got any ideas?

Offline global_kevin

  • Newbie
  • *
  • Posts: 5
How to install Roundcube for Plesk
« Reply #6 on: July 07, 2011, 06:16:23 AM »
I've now found the folder /ect/psa-webmail/roundcube

I edited the roundcube.conf file, as to contain the correct Docroot path.

After a reboot, still no redirect.

Stangely there is a roundcube_vhost.conf file in the folder, none of the other webmail clients have one.
So how did it get there?

I try removing it but still no joy.


Any help would be much appreciated.

Offline mk.keck

  • Newbie
  • *
  • Posts: 9
Updated: Installing Roundcube on Plesk 10.x
« Reply #7 on: August 07, 2011, 06:35:17 AM »
With the Update of Plesk Panel to version 10.x there may be some problems with the solution in my first post.
  • Please prepare Roundcube as described in my post
  • Rename file called /var/www/atmail/index.html to /var/www/atmail/index.html.org
  • Rename file called /var/www/atmail/index.php to /var/www/atmail/index.php.org
  • Create a new file  /var/www/atmail/index.php:
    <?php

    /** 
     * Setup here your URI to your Roundcube installation 
     * 
     * Example 1: 
     *     $roundcube = 'http://webmail.yourserver.com/'; 
     * Example 2: 
     *     $roundcube = 'http://yourserver.com/webmail/'; 
     */ 
    $roundcube 'http://yourserver.com/webmail/'

    header('Location: ' $roundcube); 
    exit(); 
     
    ?>

  • If you have a domain name:

Then make a new folder in your /var/www/vhosts/yourserver.com/httpdocs of the domain called webmail and copy all files and directories from Roundcube folder into it.
If you want webmail.yourdomain.com instead of youserver.com/webmail/ please make a new subdomain called webmail and link it into the folder /var/www/vhosts/yourserver.com/httpdocs/webmail.
[/LIST]This should work on Plesk 10.x (perhabs on older versions to) and with Roundcube versions 0.3.x and newer.
I've tried to use the new feature in Plesk Planel 10.x to set an own thirdparty webmail. But without any chance to get it worked. So, please use the solution I've described here. The other solution with Horde is more difficult and makes more problems, since Plesk version 10.x.
Replace AtMail or Horde with Roundcube on Servers with installed Plesk 9.x.

Offline mk.keck

  • Newbie
  • *
  • Posts: 9
Updated: Installing Roundcube on Plesk 10.x
« Reply #8 on: August 07, 2011, 06:37:21 AM »
With the Update of Plesk Panel to version 10.x there may be some problems with the solution in my http://www.roundcubeforum.net/general-discussion/5034-how-install-roundcube-plesk.html" target="_blank">first post.
  1. Please prepare Roundcube as described in my http://www.roundcubeforum.net/general-discussion/5034-how-install-roundcube-plesk.html" target="_blank">post
  2. Rename file called /var/www/atmail/index.html to /var/www/atmail/index.html.org
  3. Rename file called /var/www/atmail/index.php to /var/www/atmail/index.php.org
  4. Create a new file  /var/www/atmail/index.php:

    <?php



    /** 

     * Setup here your URI to your Roundcube installation 

     * 

     * Example 1: 

     *     $roundcube = 'http://webmail.yourserver.com/'; 

     * Example 2: 

     *     $roundcube = 'http://yourserver.com/webmail/'; 

     */ 

    $roundcube 'http://yourserver.com/webmail/'



    header('Location: ' $roundcube); 

    exit(); 

     

    ?>
  5. If you have a domain name:

    Then make a new folder in your /var/www/vhosts/yourserver.com/httpdocs of the domain called webmail and copy all files and directories from Roundcube folder into it.

    If you want webmail.yourdomain.com instead of youserver.com/webmail/ please make a new subdomain called webmail and link it into the folder /var/www/vhosts/yourserver.com/httpdocs/webmail.
This should work on Plesk 10.x (perhabs on older versions to) and with Roundcube versions 0.3.x and newer.

I've tried to use the new feature in Plesk Planel 10.x to set an own thirdparty webmail. But without any chance to get it worked. So, please use the solution I've described here. The other solution with Horde is more difficult and makes more problems, since Plesk version 10.x.
Replace AtMail or Horde with Roundcube on Servers with installed Plesk 9.x.

Offline Coloseo

  • Newbie
  • *
  • Posts: 1
How to install Roundcube for Plesk
« Reply #9 on: September 14, 2011, 02:06:56 PM »
There is another way to install RoundCube functionally.

1. Prepare "RoundCube Webmail" like mk.keck describes it later in this topic.
2. Upload "roundCube Webmail" not to "/var/www/atmail" and don't change Atmails-Folder, but upload it into your websites "httpddocs"-folder
3. Open Plesk and go to "Server"-Tab and then click on "Settings"
4. Open the "Webmail"-settings in the "mail"-section and then click "Register Webmail" and enter the datas of your roundcube (adress to the folder with roundCube)
5. Save the new settings and enter the "E-Mail"-section of Plesk (where the e-mailadresses are listened) and click "change settings" and change the Webmailapplication from "Horde" or "AtMail" to your RoundCube-Installation (You'll see the name you've given to roundcube when registering it to Plesk).
6. Use normally your webmail.
« Last Edit: September 14, 2011, 02:09:37 PM by Coloseo »

Offline did_vmonroig

  • Newbie
  • *
  • Posts: 2
How to install Roundcube for Plesk
« Reply #10 on: October 20, 2011, 04:37:40 AM »
Quote from: Coloseo;36570
There is another way to install RoundCube functionally.

1. Prepare "RoundCube Webmail" like mk.keck describes it later in this topic.
2. Upload "roundCube Webmail" not to "/var/www/atmail" and don't change Atmails-Folder, but upload it into your websites "httpddocs"-folder
3. Open Plesk and go to "Server"-Tab and then click on "Settings"
4. Open the "Webmail"-settings in the "mail"-section and then click "Register Webmail" and enter the datas of your roundcube (adress to the folder with roundCube)
5. Save the new settings and enter the "E-Mail"-section of Plesk (where the e-mailadresses are listened) and click "change settings" and change the Webmailapplication from "Horde" or "AtMail" to your RoundCube-Installation (You'll see the name you've given to roundcube when registering it to Plesk).
6. Use normally your webmail.


I've a problem in step 4: Plesk asks for an URL, not folder. I'm using Plesk 10.3 for Linux.

pridtenpe

  • Guest
« Last Edit: October 20, 2011, 05:42:25 AM by pridtenpe »

Offline did_vmonroig

  • Newbie
  • *
  • Posts: 2
How to install Roundcube for Plesk
« Reply #12 on: October 26, 2011, 06:09:10 AM »
Well, finally we managed to use Rouncube with Plesk 10, basically by uninstalling Atmail and Horde, and configuring Roundcube directly in Apache. Process is explained here in german, and here in spanish.

By the way, we have developed a plugin and drivers for existing plugins to integrate password change, vacation message and forwarding, and you can find them here: Lapiz Corto | Roundcube and Plesk 10 integration.

chuongdong

  • Guest
How to install Roundcube for Plesk
« Reply #13 on: October 28, 2011, 04:59:06 AM »