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