This website is not maintained anymore. Please visit www.nerdgirl.dkinstead  
This page was last modified: July 27 2010 13:22:12   
Too Cool for Internet Explorer

Mail setup tutorial - Squirrelmail

  1. Preparations
  2. Courier IMAP
  3. Cyrus SASL2
  4. Postfix
  5. Testing and startup
  6. Setting up TLS
  7. Squirrelmail
  8. Spamassassin
Previous Current Next
<< Setting up TLS Squirrelmail Spamassassin >>

This article assumes that you've followed the steps in the previous articles of this tutorial

SquirrelMail is a standards-based webmail package written in PHP4. The main reason that I chose Squirrelmail, is that it uses the IMAP protocol to access Maildir/ folders. The standard setup only includes the basics... Actually it seems a bit doll at first glance. But this is intended since there is a wide range of plugins and styles to choose from. Take a look at squirrelmail.org

Install and configure

Install squirrelmail from ports

cd /usr/ports/mail/squirrelmail/
make install clean distclean

SquirrelMail resides in /usr/local/www/squirrelmail

In order to configurate squirrelmail, run the configure script (SquirrelMail will not work until this has been done).:

cd /usr/local/www/squirrelmail ./configure

A text based interface for your SquirrelMail settings appears. You should as a minimum change the following:

1. Organization Preferences
7.  Provider link          : http://www.domain.tld/
8.  Provider name          : Domain Title

2.  Server Settings
1.  Domain                 : domain.tld

D. Set pre-defined settings for specific IMAP servers
Please select your IMAP server:
    cyrus      = Cyrus IMAP server
    uw         = University of Washington's IMAP server
    exchange   = Microsoft Exchange IMAP server
    courier    = Courier IMAP server
    macosx     = Mac OS X Mailserver
    quit       = Do not change anything
Command >> courier
              imap_server_type = courier
         default_folder_prefix = INBOX.
                  trash_folder = Trash
                   sent_folder = Sent
                  draft_folder = Drafts
            show_prefix_option = false
          default_sub_of_inbox = false
show_contain_subfolders_option = false
            optional_delimiter = .
                 delete_folder = true
Press any key to continue...

If your IMAP server supports the SORT extension and server-side threading, you should enable Allow server thread sort and Allow server-site sorting in "General options" - read more about this here: www.squirrelmail.org/wiki/SquirrelMailPerformance

You have several ways of giving access to squirrelmail. Here's two suggestions:

  • Apache alias
    In /usr/local/etc/apache2/httpd.conf make and alias:
    Alias /squirrelmail/ "/usr/local/www/squirrelmail/"
  • Soft link
    Make a soft link to the squirrelmail directory, from the webpage directory:
    cd /usr/local/www/domain.tld
    ln -s ../squirrelmail squirrelmail

The above means that Squirrelmail can now be reached by typing www.domain.tld/squirrelmail in the browser address line.

Plugins

There is many plugins written for Squirrelmail, which you can use to add extra functionality for your squirrelmail users. The plugins are available from the official squirrelmail homepage (see the top of this page). Some of the plugins are also available from the FreeBSD ports collection (/usr/ports/mail/squirrelmail-[pluginname]-plugin).

Before you go ahead and install any plugins, you must get the pear-DB, which is a database abstraction layer used by many plugins.:

cd /usr/ports/databases/pear-DB/
make install clean distclean

You then have to add the path to pear in php.ini. Locate include_path and edit the value (if the line starts with a ; removed it):

vim /usr/local/etc/php.ini

; UNIX: "/path1:/path2"
include_path = "/usr/local/share/pear"

Restart apache to make it re-read the php.ini configuration.

I recently discovered the plugins in the ports collection, so I have not yet tried to install plugins from ports. Until then I'll keep the description below:

Note that many of the plugins uses the "Compatibility" plugin, which is in the "Miscellaneous" category. I will show you how this plugin is installed, since all plugins is basically installed the same way.

cd /usr/local/www/squirrelmail/plugins/
fetch http://www.squirrelmail.org/plugins/compatibility-1.3.tar.gz
tar xzvf compatibility-1.3.tar.gz
cd ../
./configure
(choose 8 for plugins select the compatibility plugin, save and close)

There is one particular plugin I recommend. If you have the SSL module enabled in Apache, this plugin ensures that the user uses https. It is called "Secure Login" and you'll find it in the "Logging in" category (the ported version is named squirrelmail-secure_login-plugin.


Previous Current Next
<< Setting up TLS Squirrelmail Spamassassin >>