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