RoundCube Webmail
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

269 lines
10 KiB

20 years ago
16 years ago
16 years ago
20 years ago
20 years ago
20 years ago
  1. INTRODUCTION
  2. ============
  3. This file describes the basic steps to install Roundcube Webmail on your
  4. web server. For additional information, please also consult the project's
  5. wiki page at https://github.com/roundcube/roundcubemail/wiki
  6. REQUIREMENTS
  7. ============
  8. * An IMAP, HTTP and SMTP server
  9. * .htaccess support allowing overrides for DirectoryIndex
  10. * PHP Version 5.4 or greater including:
  11. - PCRE, DOM, JSON, Session, Sockets, OpenSSL, Mbstring (required)
  12. - PHP PDO with driver for either MySQL, PostgreSQL, SQL Server, Oracle or SQLite (required)
  13. - Iconv, Zip, Fileinfo, Intl, Exif (recommended)
  14. - LDAP for LDAP addressbook support (optional)
  15. * PEAR and PEAR packages distributed with Roundcube or external:
  16. - Mail_Mime 1.10.0 or newer
  17. - Net_SMTP 1.7.1 or newer
  18. - Net_Socket 1.0.12 or newer
  19. - Net_IDNA2 0.1.1 or newer
  20. - Auth_SASL 1.0.6 or newer
  21. - Net_Sieve 1.3.2 or newer (for managesieve plugin)
  22. - Crypt_GPG 1.6.0 or newer (for enigma plugin)
  23. - Endroid/QrCode 1.6.0 or newer (https://github.com/endroid/QrCode)
  24. * php.ini options (see .htaccess file):
  25. - error_reporting E_ALL & ~E_NOTICE & ~E_STRICT
  26. - memory_limit > 16MB (increase as suitable to support large attachments)
  27. - file_uploads enabled (for attachment upload features)
  28. - session.auto_start disabled
  29. - suhosin.session.encrypt disabled
  30. - mbstring.func_overload disabled
  31. * A MySQL, PostgreSQL, MS SQL Server (2005 or newer), Oracle database
  32. or SQLite support in PHP - with permission to create tables
  33. * Composer installed either locally or globally (https://getcomposer.org)
  34. INSTALLATION
  35. ============
  36. 1. Decompress and put this folder somewhere inside your document root
  37. 2. In case you don't use the so-called "complete" release package,
  38. you have to install PHP and javascript dependencies.
  39. 2.1. Install PHP dependencies using composer:
  40. - get composer from https://getcomposer.org/download/
  41. - rename the composer.json-dist file into composer.json
  42. - if you want to use LDAP address books, enable the LDAP libraries in your
  43. composer.json file by moving the items from "suggest" to the "require"
  44. section (remove the explanation texts after the version!).
  45. - run `php composer.phar install --no-dev`
  46. 2.2. Install Javascript dependencies by executing `bin/install-jsdeps.sh` script.
  47. 3. Make sure that the following directories (and the files within)
  48. are writable by the webserver
  49. - /temp
  50. - /logs
  51. 4. Create a new database and a database user for Roundcube (see DATABASE SETUP)
  52. 5. Point your browser to http://url-to-roundcube/installer/
  53. 6. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
  54. 7. After creating and testing the configuration, remove the installer directory
  55. 8. Check Known Issues section of this file
  56. CONFIGURATION HINTS
  57. ===================
  58. IMPORTANT! Read all comments in defaults.inc.php, understand them
  59. and configure your installation to be not surprised by default behaviour.
  60. Roundcube writes internal errors to the 'errors' log file located in the logs
  61. directory which can be configured in config/config.inc.php. If you want ordinary
  62. PHP errors to be logged there as well, enable the 'php_value error_log' line
  63. in the .htaccess file and set the path to the log file accordingly.
  64. By default the session_path settings of PHP are not modified by Roundcube.
  65. However if you want to limit the session cookies to the directory where
  66. Roundcube resides you can uncomment and configure the according line
  67. in the .htaccess file.
  68. DATABASE SETUP
  69. ==============
  70. Note: Database for Roundcube must use UTF-8 character set.
  71. Note: See defaults.inc.php file for examples of DSN configuration.
  72. * MySQL
  73. -------
  74. Setting up the mysql database can be done by creating an empty database,
  75. importing the table layout and granting the proper permissions to the
  76. roundcube user. Here is an example of that procedure:
  77. # mysql
  78. > CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
  79. > GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
  80. IDENTIFIED BY 'password';
  81. > quit
  82. # mysql roundcubemail < SQL/mysql.initial.sql
  83. Note 1: 'password' is the master password for the roundcube user. It is strongly
  84. recommended you replace this with a more secure password. Please keep in
  85. mind: You need to specify this password later in 'config/db.inc.php'.
  86. * SQLite
  87. --------
  88. Versions of sqlite database engine older than 3 aren't supported.
  89. Database file and structure is created automatically by Roundcube.
  90. Make sure your configuration points to some file location and that the
  91. webserver can write to the file and the directory containing the file.
  92. * PostgreSQL
  93. ------------
  94. To use Roundcube with PostgreSQL support you have to follow these
  95. simple steps, which have to be done as the postgres system user (or
  96. which ever is the database superuser):
  97. $ createuser -P roundcube
  98. $ createdb -O roundcube -E UNICODE roundcubemail
  99. $ psql -U roundcube -f SQL/postgres.initial.sql roundcubemail
  100. Note: in some system configurations you might need to add '-U postgres' to
  101. createuser and createdb commands.
  102. * Microsoft SQL Server
  103. ----------------------
  104. Language/locale of the database must be set to us_english (1033). More info
  105. on this at https://github.com/roundcube/roundcubemail/issues/4078.
  106. Database cleaning
  107. -----------------
  108. To keep your database slick and clean we recommend to periodically execute
  109. bin/cleandb.sh which finally removes all records that are marked as deleted.
  110. Best solution is to install a cronjob running this script daily.
  111. MANUAL CONFIGURATION
  112. ====================
  113. First of all, copy the sample configuration file config/config.inc.php.sample
  114. to config/config.inc.php and make the necessary adjustments according to your
  115. environment and your needs. More configuration options can be copied from the
  116. config/defaults.inc.php file into your local config.inc.php file as needed.
  117. Read the comments above the individual configuration options to find out what
  118. they do or read https://github.com/roundcube/roundcubemail/wiki/Installation
  119. for even more guidance.
  120. You can also modify the default .htaccess file. This is necessary to
  121. increase the allowed size of file attachments, for example:
  122. php_value upload_max_filesize 2M
  123. SECURE YOUR INSTALLATION
  124. ========================
  125. Access through the webserver to the following directories should be denied:
  126. /config
  127. /temp
  128. /logs
  129. Roundcube uses .htaccess files to protect these directories, so be sure to
  130. allow override of the Limit directives to get them taken into account. The
  131. package also ships a .htaccess file in the root directory which defines some
  132. rewrite rules. In order to properly secure your installation, please enable
  133. mod_rewrite for Apache webserver and double check access to the above listed
  134. directories and their contents is denied.
  135. NOTE: In Apache 2.4, support for .htaccess files has been disabled by
  136. default. Therefore you first need to enable this in your Apache main or
  137. virtual host config by with:
  138. AllowOverride all
  139. UPGRADING
  140. =========
  141. If you already have a previous version of Roundcube installed,
  142. please refer to the instructions in UPGRADING guide.
  143. OPTIMISING
  144. ==========
  145. There are two forms of optimisation here, compression and caching, both aimed
  146. at increasing an end user's experience using Roundcube Webmail. Compression
  147. allows the static web pages to be delivered with less bandwidth. The index.php
  148. of Roundcube Webmail already enables compression on its output. The settings
  149. below allow compression to occur for all static files. Caching sets HTTP
  150. response headers that enable a user's web client to understand what is static
  151. and how to cache it.
  152. The caching directives used are:
  153. * Etags - sets at tag so the client can request is the page has changed
  154. * Cache-control - defines the age of the page and that the page is 'public'
  155. This enables clients to cache javascript files that don't have private
  156. information between sessions even if using HTTPS. It also allows proxies
  157. to share the same cached page between users.
  158. * Expires - provides another hint to increase the lifetime of static pages.
  159. For more information refer to RFC 2616.
  160. Side effects:
  161. -------------
  162. These directives are designed for production use. If you are using this in
  163. a development environment you may get horribly confused if your webclient
  164. is caching stuff that you changed on the server. Disabling the expires
  165. parts below should save you some grief.
  166. If you are changing the skins, it is recommended that you copy content to
  167. a different directory apart from 'default'.
  168. Apache:
  169. -------
  170. To enable these features in apache the following modules need to be enabled:
  171. * mod_deflate
  172. * mod_expires
  173. * mod_headers
  174. The optimisation is already included in the .htaccess file in the top
  175. directory of your installation.
  176. If you are using Apache version 2.2.9 and later, in the .htaccess file
  177. change the 'append' word to 'merge' for a more correct response. Keeping
  178. as 'append' shouldn't cause any problems though changing to merge will
  179. eliminate the possibility of duplicate 'public' headers in Cache-control.
  180. Lighttpd:
  181. ---------
  182. With Lightty the addition of Expire: tags by mod_expire is incompatible with
  183. the addition of "Cache-control: public". Using Cache-control 'public' is
  184. used below as it is assumed to give a better caching result.
  185. Enable modules in server.modules:
  186. "mod_setenv"
  187. "mod_compress"
  188. Mod_compress is a server side cache of compressed files to improve its performance.
  189. $HTTP["host"] == "www.example.com" {
  190. static-file.etags = "enable"
  191. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
  192. etag.use-mtime = "enable"
  193. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
  194. $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
  195. setenv.add-response-header = ( "Cache-Control" => "public, max-age=2592000")
  196. }
  197. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
  198. # set compress.cache-dir to somewhere outside the docroot.
  199. compress.cache-dir = var.statedir + "/cache/compress"
  200. compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
  201. }
  202. KNOWN ISSUES
  203. ============
  204. Installations with uw-imap server should set imap_disabled_caps = array('ESEARCH')
  205. in main configuration file. ESEARCH implementation in this server is broken (#1489184).