updated some documentation, fixed minor bugs in MIME decoding, made
[squirrelmail.git] / INSTALL
CommitLineData
3b3d853f 1Table of Contents:
2 1. (PHP4) Configure your webserver to work with PHP4
3 2. (IMAP) Setting up IMAP (not covered)
4 3. (INSTALL) Obtaining and installing SquirrelMail
5 4. (RUN) Running SquirrelMail
6 5. (CHARSETS) Russian Charsets
7
8
9
10
17cec454 111. CONFIGURE YOUR WEBSERVER TO WORK WITH PHP4
12---------------------------------------------
f8f9bed9 13
17cec454 14 If your webserver does not already have PHP4 you must configure it
15 to work with PHP4. SquirrelMail uses the standard suffix .php for
16 all PHP4 files. This is a quick and dirty guide to installing PHP4
17 to run as CGI under Apache. How you end up doing this is up to you
18 (your mileage may vary).
9b57e848 19
17cec454 20a. Obtaining and compiling PHP4
f8f9bed9 21
17cec454 22 Point your favorite webserver at http://www.php.net/version4/ and
23 download the source. Untar (tar xvfz filename-you-downloaded.tgz)
24 the source, cd into the directory and run configure. To make PHP4
25 work with SquirrelMail a commandline like this should do:
f8f9bed9 26
17cec454 27 ./configure --enable-track-vars --enable-force-cgi-redirect --with-gettext
f8ba9180 28
17cec454 29 If you have a database like MySQL you might want to add something
30 like --with-mysql to get database functionality.
31
45c0a3a3 32 If you're going to use LDAP in the addressbook, you must compile PHP4
33 with --with-ldap (see the PHP4 docs for more information).
34
17cec454 35 Run make to build the binary file. This will generate a binary file
36 called "php". Move this file into a CGI-directory.
37
38 You might also want to read the INSTALL file in the PHP-distribution
39 :-)
40
2a32fc83 41b. Changing php.ini
42
43 PHP defaults to look for php.ini (PHP's configuration file) in
44 /usr/local/lib. However, for security reasons, it is suggested
45 that the location of this file is changed to someplace else. This
46 can be done at configure time with the configuration directive
47 --with-config-file-path=PATH.
48
a167feaf 49 Edit the php.ini file and make sure session.use_cookies is 1. Also
50 be sure to change the session.save_path to someplace that can only
51 be read and written to by the webserver. session.save_path is the
2a32fc83 52 location that PHP's session data will be written to.
53
a167feaf 54 SECURITY WARNING - If a user has access to write PHP scripts on your
55 system and knows the location where PHP stores session data, he
56 could get a listing of the sessions being used and then read a given
57 session's data with his own PHP script. Caution should be used when
58 setting up permissions and locations of php.ini and the session data.
2a32fc83 59
60c. Setting up .php files to use PHP4
17cec454 61
62 You need to create a .htaccess file in you SquirrelMail directory
63 that looks something like this:
64
65 AddType application/php4script .php
66 Action application/php4script /cgi-bin/php
67
68 You could also add these lines to your Apache configuration file.
69
2a32fc83 70d. Running into trouble
17cec454 71
72 Setting up Apache with PHP4 can be a non-trivial task. Read the PHP4
73 and Apache documentation carefully if you run into trouble. If you
74 have an experienced system administrator around ask her/him to help
75 you.
76
772. SETTING UP IMAP
78------------------
79
80 This is not covered here :-/
81
823. OBTAINING AND INSTALLING SQUIRRELMAIL
83----------------------------------------
84
85 SquirrelMail is still under development. Therefore you should always
86 get the newest version around. Look at
429f8906 87 http://www.squirrelmail.org/index.php3?page=5 to see what it
17cec454 88 is. If you want to be bleeding edge you might want to consider using
89 the latest CVS version (with the latest and most fashionable of
90 bugs).
91
92a. Download SquirrelMail
93
94 Get SquirrelMail from the address above if you do not have it or are
95 uncertain if you have the newest version. Untar (again tar xvfz
96 filename.tgz) SquirrelMail in a directory that is readable for your
97 webserver.
98
99b. Setting up directories
100
101 SquirrelMail uses two directories to store user configuration and
102 attachments that are about to be sent. You might want to have these
103 directories outside of your web tree.
104
105 The data directory is used for storing user preferences, like
106 signature, name and theme. When unpacking the sources this directory
107 is created as data/ in you SquirrelMail directory. This directory
108 must be writable by the webserver. If your webserver is running as
109 the user nobody you can fix this by running:
65b14f90 110
33daaa7d 111 chown -R nobody data
112 chgrp -R nobody data
17cec454 113
114 There also needs to be a directory where attachments are stored
115 before they are sent. Since personal mail is stored in this
116 directory you might want to be a bit careful about how you set it
117 up. It should be owned by another user than the webserver is running
118 as (root might be a good choice) and the webserver should have write
119 and execute permissions on the directory, but should not have read
120 permissions. You could do this by running these commands (still
121 granted that the webserver is running as nobody/nobody)
122
123 cd /var/some/place
124 mkdir SomeDirectory
125 chgrp -R nobody SomeDirectory
126 chmod 730 SomeDirectory
127
128 If you trust all the users on you system not to read mail they are
129 not supposed to read change the last line to chmod 777 SomeDirectory
130 or simply use /tmp as you attachments directory. If a user is
131 aborting a mail but has uploaded som attachments to it the files
132 will be lying around in this directory forever if you do not remove
133 them.
134
135c. Setting up SquirrelMail
136
be8e07f8 137 There are two ways to configure Squirrelmail. In the config/ directory,
138 there is a perl script called conf.pl that will aid you in the
139 configuration process. This is the most recommended way of handling
140 the config.
141
142 You can also copy the config/config_default.php file to config.php
143 and edit that manually.
65b14f90 144
17cec454 1454. RUNNING SQUIRRELMAIL
146-----------------------
65b14f90 147
429f8906 148 Point your browser at the URL at which SquirrelMail is installed. A
149 possible example of this is:
150 http://www.yourdomain.com/squirrelmail
151
152 It should be pretty stright forward to use. Some more documentation
153 might show up one day or another.
8c086db6 154
155
1565. RUSSIAN CHARSETS
157-------------------
158
159 For information on how to make SquirrelMail work with Russian
160 Apache, see the README.russian_apache in the doc/ subdirectory.