Skip navigation.

Syndicate

Syndicate content

User login

Installing SquirrelMail 1.4.5 in FreeBSD 5.4-Release

I’m in Baghdad now, where my only link to the ‘net is a high-latency satellite. Mozilla Thunderbird can’t hack the delays this introduces, and thus times out when attempting to fetch my IMAP mailbox on ender. Thus, rather than use one of the other shitty IMAP clients, I’ve decided to pull the trigger on SquirrelMail.

I have previously attempted to install RoundCube, but found it a bit too immature at this point, so I’ve decided to go with something tried and true: SquirrelMail.

Fortunately, the FreeBSD ports collection includes SM, and a pre-built package based on 1.4.5 is available. Unfortunately, the pre-built package uses Apache 1.3, while I run Apache 2 on bonzo. This leads to all sorts of fun:

bonzo# pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/squirrelmail-1.4.5_2.tbz
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/squirrelmail-1.4.5_2.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/apache-1.3.34_2.tbz... Done.
pkg_add: package 'apache-1.3.34_2' conflicts with apache-2.0.54_2
pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
pkg_add: pkg_add of dependency 'apache-1.3.34_2' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-4.4.1_3.tbz... Done.
pkg_add: package 'php4-4.4.1_3' conflicts with php5-5.0.4_2
pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
pkg_add: pkg_add of dependency 'php4-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/mhash-0.9.2.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-xml-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-xml-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-session-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-session-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-pcre-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-pcre-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-openssl-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-openssl-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-mhash-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-mhash-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-mbstring-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-mbstring-4.4.1_3' failed!
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/php4-gettext-4.4.1_3.tbz... Done.
pkg_add: could not find package apache-1.3.34_2 !
pkg_add: could not find package php4-4.4.1_3 !
pkg_add: pkg_add of dependency 'php4-gettext-4.4.1_3' failed!

Outstanding. Well, I’m not going back to apache 1.3, and I don’t feel like building from the port, since bonzo’s ports collection is outdated. However, I really don’t want to download the sources from SM and build on FBSD. So, I guess I have no choice but to update the ports tree:

 cvsup -L 2 /root/ports-supfile

Took a while; updated.

Now doing:

 make WITH_DATABASE=1

The WITH_DATABASE enables PEAR support to ensure SM can use MySQL.

That was uneventful. Next up,

 make WITH_DATABASE=1 install

During the build PEAR was installed also, which yielded this:

 To use PEAR you have to add the correct include path into
 your ${LOCALBASE}/etc/php.ini configuration file, like:

 include_path = ".:/usr/local/share/pear"

I’ll have to remember to do that…

Ugh, it’s installing the new PHP 5.1.2. This’ll take a while…

Actually wasn’t bad at all. Final output:

You now need to add an alias to apache's httpd.conf pointing to
/usr/local/www/squirrelmail in order to access SquirrelMail from
your web browser, or create a VirtualHost with DocumentRoot set
to that directory.

For SquirrelMail to work properly you will need to make sure the
following option is set in your php.ini file:
file_uploads = On

If you have problems with SquirrelMail saying "you must login" after
you just have, the following php.ini option may help:
session.auto_start = 1

In order to do your administrative configuration you need to
cd /usr/local/www/squirrelmail && ./configure
SquirrelMail will not work until this has been done.

So, first I’ll add an alias to /usr/local/etc/apache2/httpd.conf

This seemed to do the trick:

 Alias /mail/ "/usr/local/www/squirrelmail/"

Ok, that ‘worked’, inasmuch as I got this response in my browser:

 ERROR: Config file "config/config.php" not found. You need to configure SquirrelMail before you can use it.

And configure it I shall. As per the instructions above, a quick cd /usr/local/www/squirrelmail && ./configure should be just the thing.

The configuration utility has a numbered menu system circa 1980. I’ll just wander through the menus, specifying values for stuff as they make sense to me.

That was easy. I like the Blue Grey theme, with the Verdana 08 custom style sheet. Nice.