This articler covers installation of SquirrelMail on generic Unix or Linux system. It does not cover installation of operating system or tools required to install web server or PHP. Any version numbers used in examples are specific to the time when this documentation is written. If current version numbers differ, make sure that you are not using old, obsolete or vulnerable software. Guide uses UW IMAP server as example. This IMAP server can be used in generic email setup when incoming mail is stored in /var/spool/mail directory. If you are planning to use webmail with big number of users or with bigger mailboxes, consider using different IMAP server and redesign entire email system.
Download required software
You will need:
* Apache - http://httpd.apache.org/download.cgi
* PHP - http://php.net/downloads.php
* UW IMAP - http://www.washington.edu/imap/
* SquirrelMail - http://squirrelmail.org/download.php
# install -d /usr/local/src/downloads
# cd /usr/local/src/downloads
# wget http://some-apache-mirror-server/apache/httpd/httpd-2.0.54.tar.gz
# wget http://some-php-mirror-server/get/php-4.3.11.tar.bz2/from/this/mirror
# wget ftp://ftp.cac.washington.edu/mail/imap.tar.Z
# wget http://some-sourceforge-mirror/some-path/squirrelmail-1.4.5.tar.bz2
Unpack and install apache
# cd /usr/local/src
# tar -xzvf /usr/local/src/downloads/httpd-2.0.54.tar.gz
# cd httpd-2.0.54
# ./configure –prefix=/usr/local/apache –enable-module=so
# make
# make install
Unpack and install php
# cd /usr/local/src
# tar –bzip2 -xvf /usr/local/src/downloads/php-4.3.11.tar.bz2
# cd php-4.3.11
# ./configure –prefix=/usr/local/php \
> –with-apxs2=/usr/local/apache/bin/apxs
# make
# make install
If you configure PHP compilation with –disable-all option, you must add –enable-session and –with-pcre-regex options.
Add PHP support to apache
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
</IfModule>
Restart apache and check if php is working
/usr/local/apache/bin/apachectl graceful
<?php phpinfo(); ?>
Unpack and install imap server
Unpack UW IMAP archive.
# cd /usr/local/src
# tar -xzvf /usr/local/src/downloads/imap.tar.Z
Compile UW IMAP
cd /usr/local/src/imap-<someversion>
make port-name EXTRADRIVERS=” SSLTYPE=unix
Replace port-name with name that matches your system. Check Makefile for possible values. If you haven’t installed OpenSSL libraries and headers, use SSLTYPE=none instead of SSLTYPE=unix.
Install IMAP server binary
strip imapd/imapd
install -d /usr/local/libexec/
cp imapd/imapd /usr/local/libexec/
Enable IMAP server in inetd.conf
imap2 stream tcp nowait root /usr/sbin/tcpd /usr/local/libexec/imapd
Restart inetd
Prepare SquirrelMail directories
# mkdir /usr/local/squirrelmail
# cd /usr/local/squirrelmail
# mkdir data temp
# chgrp nogroup data temp
# chmod 0730 data temp
Unpack SquirrelMail
# cd /usr/local/squirrelmail
# tar –bzip2 -xvf /usr/local/src/downloads/squirrelmail-1.4.5.tar.bz2
# mv squirrelmail-1.4.5 www
Configure SquirrelMail
Start SquirrelMail configuration utility. Configure SquirrelMail with UW preset. Set data and attachment directories.
Configure access to SquirrelMail in Apache
Modify httpd.conf
Alias /squirrelmail /usr/local/squirrelmail/www
<Directory /usr/local/squirrelmail/www>
Options Indexes
AllowOverride none
DirectoryIndex index.php
Order allow,deny
allow from all
</Directory>
Log into SquirrelMail
After you add alias to SquirrelMail in apache configuration and restart apache, you should be able to access SquirrelMail by going to http://your-server/squirrelmail.
- 0 משתמשים שמצאו מאמר זה מועיל