Installing your own SquirrelMail

From DreamHost
Jump to: navigation, search

Overview

The instructions provided in this article or section are considered advanced.

You are expected to be knowledgeable in the UNIX shell.
Support for these instructions is not available from DreamHost tech support.
Server changes performed by DreamHost may break your modifications. You, as the user, are responsible for troubleshooting and resolving issues with your customizations.

The instructions provided in this article or section require shell access unless otherwise stated.

You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X.
Your account must be configured for shell access in the Control Panel.
More information may be available on the article's talk page.


SquirrelMail is the default mail interface that comes with your domain and hosting service with DreamHost. The application provided by DreamHost is limited regarding the available customizations, however you are able to install your own version of SquirrelMail which allows you to customize the program as you like.

Note2 icon.png Note: If you have anti-spam filters enabled, you won’t be able to access the default ‘Junk_Mail’ folder through the custom install of SquirrelMail like you can with the default install by DreamHost. You can change the ‘quarantine to IMAP’ location or access it via the mailboxes subdomain instead.


Important security note

If you’re creating a custom installation on a shared server, you must use insecure ports. This is because the secure SMTP ports are not open by default and you have no access to open them. Visit the following article for further information:

If you require your custom installation to be secure, you must purchase an SSL Certificate and open the necessary ports on your VPS or Dedicated server. DreamHost support is also unable to assist with this.

Installing SquirrelMail

This guide explains how to install a SquirrelMail into a subdirectory. If you wish to install into a subdomain instead, such as mywebmail.example.com, you must first create the subdomain. View Adding Domains & Subdomains for full instructions.

  1. Download the SquirrelMail application as a .zip file directly from SquirrelMail.
    Note2 icon.png Note: This guide is based on SquirrelMail version 1.4.22.


  2. Log into your server via FTP and upload the tar.gz file that you just downloaded into your site’s web directory.
    Note2 icon.png Notes:
    • This guide uses a subdirectory instead of a sub-domain. If you're using a subdirectory, avoid folder names that are already taken such as ‘/tmp’.
    • If using a subdomain, avoid using subdomain names like ‘mail.’ or ‘webmail.’ since that is already applied to your domain.


  3. After uploading the installation file, decompress it. For example, you can run the following command via SSH:
    tar xvfz squirrelmail-webmail-1.4.22.tar.gz
    This creates a new folder named /squirrelmail-webmail-1.4.22 in your domain’s directory.
  4. Rename this folder:
    mv squirrelmail-webmail-1.4.22 SqurrelMail
    If set up properly, when you visit example.com/SquirrelMail it shows the following error before the webmail interface setup is complete:
    ERROR: Config file "config/config.php" not found. You need to configure SquirrelMail before you can use it.
  5. Log into your server via SSH.
  6. Navigate to your /example.com/SquirrelMail directory.
  7. Run the following command:
    ./config/conf.pl
    The following menu options appear:
    01 SquirrelMail.fw.png

Server Settings menu

  1. Type in the number 2 (Server Settings) and then click ‘Enter’.
    The following menu options appear:
    03 SquirrelMail.fw.png
    • Domain: Enter the domain name that the install is configured to use. If you are using a subdomain, enter the subdomain name for this section.
    • Invert Time: You can keep this set to ‘false’ by default.
    • Sendmail or SMTP: This should be set to SMTP by default and kept that way.
  2. Type in the letter A (Update IMAP Settings) and then click 'Enter':
    The following IMAP options appear:
    04 SquirrelMail.fw.png
    • IMAP Server: This is the host server the program is connecting to via IMAP for incoming mail. This example uses mail.example.com.
    • IMAP Port: This defaults to 143 for standard IMAP. You must keep this as-is for a shared installation. View the important security note section above.
    • Authentication type: This authenticates your user upon login. Keep this as is.
    • Secure IMAP (TLS): Keep this set to false as secure ports are not set up on the web server by default. View the SquirrelMail Security article for further details.
    • Secure software: This is set to ‘other’ and can be left as is.
    • Delimiter: This is set to ‘detect’ by default and can be left as is.
  3. Type in the letter B (Update SMTP Settings) and then click 'Enter':
    The following SMTP options appear:
    05 SquirrelMail.fw.png
    • SMTP Server: The mail server for incoming should be the same as outgoing. We can use the same mail host server as IMAP:
    mail.example.com
    • SMTP Port: By default, Port 25 appears. This port is often blocked by major ISPs, so it is suggested to use the alternate Port 587 instead.
    • POP before SMTP: This is set to ‘false’ and can be left as is.
    • SMTP Authentication: Opt to check for an option and select ‘login’ once the selection comes up.
    • Secure SMTP (TLS): You must manually configure your VPS or Dedicated server to support secure ports. If you’re on a shared server, keep this as ‘false’.
    • Header encryption key: You can keep this blank.
    Note2 icon.png Note: This setup does not support SSL, so you cannot use Port 993 for IMAP or Port 465 for SMTP. This results in a ‘Connection dropped by IMAP connection’ error, so make sure you have port settings correctly configured as noted above.


  4. Proceed to the General Options menu section to finish the setup.

General Options menu

The General Options menu is the only remaining menu you must complete in order to finish the setup of SquirrelMail so it can be used on your domain.

  1. Return to the main menu, type in the number 4 (General Options), and then click ‘Enter’.
    The following menu options appear:
    06 SquirrelMail.fw.png
    Note2 icon.png Note: Only the necessary settings are discussed in the following to get the install to work.


    • Data Directory: This is the directory path where the files are stored:
    /home/exampleuser/example.com/SquirrelMail/data/
    Make sure that the ‘/data/ folder is created there as the path shows.
    • Attachment Directory: This is where the attachments are stored for the mail:
    /home/exampleuser/example.com/SquirrelMail/attach/
    Make sure the ‘attach’ folder exists within the install.
  2. Once you finish entering these settings, save the changes you made to the config file.
  3. Refresh the webmail page with the error on it and it should now load the login page for SquirrelMail.
    • You’ll need to enter the full email address (username and domain) with which you use to log in.

See Also