string typo
[squirrelmail.git] / INSTALL
d68a3926 1Installing SquirrelMail
3b3d853f 4Table of Contents:
46f33521 5 0. (QUICK!) Quick install guide
3b3d853f 6 1. (PHP4) Configure your webserver to work with PHP4
7 2. (IMAP) Setting up IMAP (not covered)
8 3. (INSTALL) Obtaining and installing SquirrelMail
9 4. (RUN) Running SquirrelMail
10 5. (CHARSETS) Russian Charsets
46f33521 11 6. (LOCALES) Translations of SquirrelMail
c650b678 12 7. (PLUGINS) Installation of included plugins
3b3d853f 13
17cec454 17
46f33521 18Each of these steps is covered in detail below.
17cec454 19
46f33521 20- Install webserver and PHP4 (at least 4.1.0).
21- Install IMAP server (see docs of that server).
22- Unpack the SquirrelMail package in a web-accessible location.
23- Select a data-dir and attachment dir, outside the webtree (e.g. in /var).
24 The data-dir (for user prefs) should be owned by the user the webserver
512d4b31 25 runs as (e.g. www-data). The attachment dir (for uploading files as
46f33521 26 attachments) should be file mode 0730 and in the same group as the
27 webserver.
28- Run config/ from the command line. Use the D option to load
29 predefined options for specific IMAP servers, and edit at least the
30 Server Settings and General Options (datadir).
31- Browse to
32 to test your configuration for common errors.
33- Browse to to log in.
2a32fc83 34
1067414d 35
17cec454 38
46f33521 39 If your webserver does not already have PHP you must configure it
40 to work with PHP. You need at least PHP v4.1.0. SquirrelMail uses
41 the standard suffix .php for all PHP4 files.
598294a7 42
46f33521 43 You can find PHP at See the documentation that
44 comes with PHP for instructions how to set it up.
17cec454 45
512d4b31 46 The PHP IMAP extension is NOT necessary at all (but won't harm)!
46f33521 47 Below is a list of optional PHP extensions:
17cec454 48
46f33521 49 --with-ldap Required for LDAP addressbooks
50 --with-mhash Will improve charset decoding if present
51 --with-mysql For MySQL storage of preferences or addressbooks
52 --with-openssl When you want to use encrypted IMAP connections (TLS)
598294a7 53
46f33521 54 If you're going to use LDAP in the addressbook, you must compile PHP
55 with the LDAP extension. Include the MHASH extension to improve
56 performance in character set decoding.
17cec454 57
46f33521 58 If you want your users to attach files to their mails, make sure
59 File Uploads in php.ini is set to On.
17cec454 60
17cec454 61
46f33521 65 This depends a lot on the server your choose. See the documentation
66 that comes with your server.
598294a7 67
46f33521 68 If you're concerned about people accessing it directly, you can
69 limit access to only the IP of the webserver.
17cec454 71
ef1932a4 75 SquirrelMail is constantly being improved. Therefore you should always
46f33521 76 get the newest version around. Look at
ef1932a4 77 to see what it is. If you want to be bleeding edge you might want to
78 consider using the latest CVS version (with the latest and most
46f33521 79 fashionable bugs).
17cec454 80
81a. Download SquirrelMail
83 Get SquirrelMail from the address above if you do not have it or are
84 uncertain if you have the newest version. Untar (again tar xvfz
85 filename.tgz) SquirrelMail in a directory that is readable for your
86 webserver.
88b. Setting up directories
90 SquirrelMail uses two directories to store user configuration and
91 attachments that are about to be sent. You might want to have these
92 directories outside of your web tree.
94 The data directory is used for storing user preferences, like
95 signature, name and theme. When unpacking the sources this directory
b731cd83 96 is created as data/ in your SquirrelMail directory. This directory
17cec454 97 must be writable by the webserver. If your webserver is running as
b731cd83 98 the user "nobody" you can fix this by running:
65b14f90 99
390372b4 100 $ chown -R nobody data
101 $ chgrp -R nobody data
4bc627ae 102
103 Keep in mind that with different installations, the web server could
598294a7 104 typically run as userid/groupid of nobody/nobody, nobody/nogroup,
105 apache/apache or www-data/www-data. The best way to find out is to read
ff65039a 106 the web server's configuration file.
4bc627ae 107
17cec454 108 There also needs to be a directory where attachments are stored
109 before they are sent. Since personal mail is stored in this
110 directory you might want to be a bit careful about how you set it
111 up. It should be owned by another user than the webserver is running
112 as (root might be a good choice) and the webserver should have write
113 and execute permissions on the directory, but should not have read
114 permissions. You could do this by running these commands (still
115 granted that the webserver is running as nobody/nobody)
390372b4 117 $ cd /var/some/place
118 $ mkdir SomeDirectory
119 $ chgrp -R nobody SomeDirectory
120 $ chmod 730 SomeDirectory
17cec454 121
122 If you trust all the users on you system not to read mail they are
123 not supposed to read change the last line to chmod 777 SomeDirectory
598294a7 124 or simply use /tmp as you attachments directory.
126 If a user is aborting a mail but has uploaded some attachments to it
127 the files will be lying around in this directory forever if you do not
390372b4 128 remove them. To fix this, it is recommended to create a cron job that
129 deletes everything in the attachment directory. Something similar
4bc627ae 130 to the following will be good enough:
390372b4 131
132 $ cd /var/attach/directory
133 $ rm -f *
598294a7 134
4bc627ae 135 However, this will delete attachments that are currently in use by people
136 sending email when the cron job runs. You can either (1) make sure that
137 the cron job runs at an obscure hour and hope that nobody gets upset, or
138 (2) you can run a modified version of the commands above. Check out the
139 man pages for other commands such as 'find' or 'tmpreaper'.
598294a7 140
4bc627ae 141 One sample script you could set up that would erase all attachments, but
142 wouldn't erase preferences, address books, or the like (just in case your
598294a7 143 attachment directory is the same as your data directory) might look like
4bc627ae 144 this:
598294a7 145
4bc627ae 146 $ rm `find /var/attach/directory -atime +2 | grep -v "\." | grep -v _`
598294a7 147
4bc627ae 148 Remember to be careful with whatever method you do use, and to test out
149 the command before it potentially wipes out everyone's preferences.
17cec454 150
151c. Setting up SquirrelMail
cbd6543c 153 There are two ways to configure SquirrelMail. In the config/ directory,
be8e07f8 154 there is a perl script called that will aid you in the
390372b4 155 configuration process. This is the recommended way of handling
be8e07f8 156 the config.
390372b4 158 You can also copy the config/config_default.php file to config/config.php
be8e07f8 159 and edit that manually.
65b14f90 160
cbd6543c 161 After you've created a configuration, you can use your webbrowser to
13721b47 162 browse to http://your-squirrelmail-location/src/configtest.php.
cbd6543c 163 This will perform some basic checks on your config to make sure
164 everything works like it should.
65b14f90 169
429f8906 170 Point your browser at the URL at which SquirrelMail is installed. A
598294a7 171 possible example of this is:
429f8906 172
598294a7 173
3d8fe250 174 It should be pretty straight forward to use. Some more documentation
429f8906 175 might show up one day or another.
8c086db6 176
181 For information on how to make SquirrelMail work with Russian
77180a75 182 Apache, see the russian_apache.txt in the doc/ subdirectory.
2481e3c1 183
46f33521 184
2481e3c1 1856. TRANSLATIONS
598294a7 188 In order to use translated versions of SquirrelMail, you need
2481e3c1 189 to download and install locale packages that contain translations
598294a7 190 that you want to use with SquirrelMail.
2481e3c1 192 Locale packages can be downloaded from SquirrelMail SourceForge
193 project page.
598294a7 194
2481e3c1 195
598294a7 196
512d4b31 197 Each translation contains an install script that copies the required files
198 into their appropriate locations. If you can't run that script, you can
199 extract the contents of translation packages into your SquirrelMail
200 directory.
598294a7 201
512d4b31 202 NOTE No.1: *-src.tar.gz, *-src.tar.bz2 and * archives do not contain
203 compiled translation files. You will need to run the compilelocales script
2481e3c1 204 in order to get all gettext binary translations.
598294a7 205
2481e3c1 206 NOTE No.2: You might need to restart your webserver before using translations.
207 If you can't do that, install your translations _before_ you use SquirrelMail.
c650b678 208
512d4b31 212 The SquirrelMail package includes some standard plugins. These plugins can be
213 enabled in the SquirrelMail configuration script.
c650b678 214
215 Included plugins can use additional configuration files:
216 * change_password
217 configuration file is required. Without it plugin defaults to invalid
218 backend. See plugins/change_password/README
219 * filters, fortune, mail_fetch, newmail, translate
220 configuration files are optional. See README files in plugin directories.
221 * squirrelspell
222 configuration is stored in plugins/squirrelspell/sqspell_config.php
223 Default configuration might not work on your server.
224 * administrator
225 plugin must be setup correctly in order to detect administrative user.
226 See plugins/administrator/INSTALL