Add information about online documentation
[squirrelmail.git] / doc / INSTALL
d68a3926 1Installing SquirrelMail
a009670c 4NOTE! More thorough and possibly up-to-date information about how
5to install, use and maintain SquirrelMail is available in our online
6documentation here:
3b3d853f 11Table of Contents:
46f33521 12 0. (QUICK!) Quick install guide
238d4cfc 13 1. (PHP) Configure your webserver to work with PHP
3b3d853f 14 2. (IMAP) Setting up IMAP (not covered)
15 3. (INSTALL) Obtaining and installing SquirrelMail
16 4. (RUN) Running SquirrelMail
17 5. (CHARSETS) Russian Charsets
46f33521 18 6. (LOCALES) Translations of SquirrelMail
c650b678 19 7. (PLUGINS) Installation of included plugins
3b3d853f 20
17cec454 24
46f33521 25Each of these steps is covered in detail below.
17cec454 26
238d4cfc 27- Install webserver and PHP (at least 4.1.0).
46f33521 28- Install IMAP server (see docs of that server).
29- Unpack the SquirrelMail package in a web-accessible location.
30- Select a data-dir and attachment dir, outside the webtree (e.g. in /var).
31 The data-dir (for user prefs) should be owned by the user the webserver
512d4b31 32 runs as (e.g. www-data). The attachment dir (for uploading files as
46f33521 33 attachments) should be file mode 0730 and in the same group as the
34 webserver.
35- Run config/ from the command line. Use the D option to load
36 predefined options for specific IMAP servers, and edit at least the
37 Server Settings and General Options (datadir).
a3bb5005 38- Browse to
46f33521 39 to test your configuration for common errors.
a3bb5005 40- Browse to to log in.
2a32fc83 41
1067414d 42
17cec454 45
46f33521 46 If your webserver does not already have PHP you must configure it
47 to work with PHP. You need at least PHP v4.1.0. SquirrelMail uses
238d4cfc 48 the standard suffix .php for all PHP files.
598294a7 49
a3bb5005 50 You can find PHP at See the documentation that
46f33521 51 comes with PHP for instructions how to set it up.
17cec454 52
512d4b31 53 The PHP IMAP extension is NOT necessary at all (but won't harm)!
46f33521 54 Below is a list of optional PHP extensions:
17cec454 55
0dc92cda 56 --with-ldap
57 Required for LDAP addressbooks
bee552c7 58
0dc92cda 59 --with-pear and --with-mysql
bee552c7 60 For MySQL storage of preferences or addressbooks. You will need PHP
1131d10f 61 compiled with --with-pgsql option, if you want to use PostgreSQL instead
bee552c7 62 of MySQL. You will need PHP with appropriate database extension, if you
1131d10f 63 want to use any other database.
0dc92cda 64
65 --with-openssl
66 Required for encrypted IMAP or SMTP connections (TLS)
68 --with-mcrypt
69 Can be used by SquirrelSpell plugin for encryption of personal
70 dictionaries
72 --with-iconv or --with-recode
73 Can be used by Eastern charset decoding functions
75 --enable-mbstring
bee552c7 76 Required for Japanese translation. Optional for translations that
0dc92cda 77 use non-ISO-8859-1 charset
17cec454 78
962a6686 79 It is highly advised to NOT turn on register_globals, as this can lead
80 to security holes. If you must use register_globals for some applications,
81 turn it on locally for only those directories, or turn it off for the
82 SquirrelMail folder.
46f33521 83 If you want your users to attach files to their mails, make sure
84 File Uploads in php.ini is set to On.
17cec454 85
17cec454 86
46f33521 90 This depends a lot on the server your choose. See the documentation
91 that comes with your server.
598294a7 92
46f33521 93 If you're concerned about people accessing it directly, you can
94 limit access to only the IP of the webserver.
17cec454 96
ef1932a4 100 SquirrelMail is constantly being improved. Therefore you should always
a3bb5005 101 get the newest version around. Look at
ef1932a4 102 to see what it is. If you want to be bleeding edge you might want to
8fea605c 103 consider using the latest SVN version (with the latest and most
46f33521 104 fashionable bugs).
17cec454 105
106a. Download SquirrelMail
108 Get SquirrelMail from the address above if you do not have it or are
109 uncertain if you have the newest version. Untar (again tar xvfz
110 filename.tgz) SquirrelMail in a directory that is readable for your
111 webserver.
113b. Setting up directories
115 SquirrelMail uses two directories to store user configuration and
116 attachments that are about to be sent. You might want to have these
117 directories outside of your web tree.
119 The data directory is used for storing user preferences, like
368ab966 120 signature, name and theme. You need to create this directory yourself.
121 Recommended location is under /var, for example:
122 /var/local/squirrelmail/data
123 This directory must be writable by the webserver. If your webserver is
124 running as the user "nobody" and group "nobody" you can fix this by
125 running:
65b14f90 126
e71e5745 127 $ chown -R nobody:nobody /var/local/squirrelmail/data
4bc627ae 128
129 Keep in mind that with different installations, the web server could
598294a7 130 typically run as userid/groupid of nobody/nobody, nobody/nogroup,
131 apache/apache or www-data/www-data. The best way to find out is to read
ff65039a 132 the web server's configuration file.
4bc627ae 133
17cec454 134 There also needs to be a directory where attachments are stored
135 before they are sent. Since personal mail is stored in this
136 directory you might want to be a bit careful about how you set it
137 up. It should be owned by another user than the webserver is running
e71e5745 138 as (root might be a good choice) and the webserver should have directory
139 write and execute permissions, but should not have read
17cec454 140 permissions. You could do this by running these commands (still
e71e5745 141 granted that the webserver is running as nobody/nobody):
17cec454 142
e71e5745 143 $ cd /var/local/squirrelmail/
144 $ mkdir attach
145 $ chgrp -R nobody attach
146 $ chmod 730 attach
17cec454 147
e71e5745 148 If you trust all the users at your system not to read mail they are
368ab966 149 not supposed to read, you can simply use /tmp as you attachments
150 directory.
598294a7 151
152 If a user is aborting a mail but has uploaded some attachments to it
153 the files will be lying around in this directory forever if you do not
390372b4 154 remove them. To fix this, it is recommended to create a cron job that
155 deletes everything in the attachment directory. Something similar
4bc627ae 156 to the following will be good enough:
390372b4 157
1e532e26 158 $ cd /var/local/squirrelmail/attach && rm -f *
598294a7 159
4bc627ae 160 However, this will delete attachments that are currently in use by people
161 sending email when the cron job runs. You can either (1) make sure that
162 the cron job runs at an obscure hour and hope that nobody gets upset, or
163 (2) you can run a modified version of the commands above. Check out the
164 man pages for other commands such as 'find' or 'tmpreaper'.
598294a7 165
4bc627ae 166 One sample script you could set up that would erase all attachments, but
167 wouldn't erase preferences, address books, or the like (just in case your
598294a7 168 attachment directory is the same as your data directory) might look like
4bc627ae 169 this:
598294a7 170
1e532e26 171 $ find /var/local/squirrelmail/attach -type f -atime +2 -exec rm {} \;
598294a7 172
4bc627ae 173 Remember to be careful with whatever method you do use, and to test out
174 the command before it potentially wipes out everyone's preferences.
17cec454 175
176c. Setting up SquirrelMail
86bb50f8 178 There are three ways to configure SquirrelMail. In the config/ directory,
be8e07f8 179 there is a perl script called that will aid you in the
390372b4 180 configuration process. This is the recommended way of handling
be8e07f8 181 the config.
86bb50f8 183 There's also a plugin called 'administrator' for the webinterface but you'll
184 have to be able to at least log in to SquirrelMail first.
390372b4 186 You can also copy the config/config_default.php file to config/config.php
be8e07f8 187 and edit that manually.
65b14f90 188
cbd6543c 189 After you've created a configuration, you can use your webbrowser to
13721b47 190 browse to http://your-squirrelmail-location/src/configtest.php.
e71e5745 191 This will perform some basic checks on your configuration to make sure
cbd6543c 192 everything works like it should.
65b14f90 197
429f8906 198 Point your browser at the URL at which SquirrelMail is installed. A
598294a7 199 possible example of this is:
a3bb5005 200
598294a7 201
3d8fe250 202 It should be pretty straight forward to use. Some more documentation
429f8906 203 might show up one day or another.
8c086db6 204
209 For information on how to make SquirrelMail work with Russian
77180a75 210 Apache, see the russian_apache.txt in the doc/ subdirectory.
2481e3c1 211
46f33521 212
2481e3c1 2136. TRANSLATIONS
598294a7 216 In order to use translated versions of SquirrelMail, you need
2481e3c1 217 to download and install locale packages that contain translations
598294a7 218 that you want to use with SquirrelMail.
2481e3c1 220 Locale packages can be downloaded from SquirrelMail SourceForge
221 project page.
598294a7 222
bee552c7 223
598294a7 224
512d4b31 225 Each translation contains an install script that copies the required files
226 into their appropriate locations. If you can't run that script, you can
86bb50f8 227 extract the contents of a translation package into your SquirrelMail
512d4b31 228 directory.
598294a7 229
512d4b31 230 NOTE No.1: *-src.tar.gz, *-src.tar.bz2 and * archives do not contain
86bb50f8 231 compiled translation files. You will need to run the "compilelocales" script
2481e3c1 232 in order to get all gettext binary translations.
598294a7 233
2481e3c1 234 NOTE No.2: You might need to restart your webserver before using translations.
235 If you can't do that, install your translations _before_ you use SquirrelMail.
c650b678 236
bee552c7 237
c650b678 2387. PLUGINS
bee552c7 241 The SquirrelMail package includes some standard plugins. These plugins can be
512d4b31 242 enabled in the SquirrelMail configuration script.
c650b678 243
244 Included plugins can use additional configuration files:
245 * change_password
246 configuration file is required. Without it plugin defaults to invalid
247 backend. See plugins/change_password/README
248 * filters, fortune, mail_fetch, newmail, translate
249 configuration files are optional. See README files in plugin directories.
250 * squirrelspell
251 configuration is stored in plugins/squirrelspell/sqspell_config.php
e71e5745 252 The default configuration might not work at your server.
c650b678 253 * administrator
bee552c7 254 plugin must be setup correctly in order to detect administrative user.
c650b678 255 See plugins/administrator/INSTALL