Installing your own SquirrelMail
|The instructions provided in this article or section are considered advanced.|
You are expected to be knowledgeable in the UNIX shell.
|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.
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.
|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.
This guide explains how to install 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.
- Download the SquirrelMail application as a .zip file directly from SquirrelMail.
Note: This guide is based on SquirrelMail version 1.4.22.
- Log into your server via FTP and upload the tar.gz file that you just downloaded into your site’s web directory.
- 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.
- 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.
- Log into your server via SSH.
- Navigate to your /example.com/SquirrelMail directory.
- Run the following command:
- The following menu options appear:
- Type in the number 2 (Server Settings) and then click ‘Enter’.
- 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.
- Type in the letter A (Update IMAP Settings) and then click 'Enter':
- 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.
- Type in the letter B (Update SMTP Settings) and then click 'Enter':
- SMTP Server: The mail server for incoming should be the same as outgoing. You can use the same mail host server as IMAP:
- 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.
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.
- Proceed to the General Options menu section to finish the setup.
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.
- Return to the main menu, type in the number 4 (General Options), and then click ‘Enter’.
- The following menu options appear:
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:
- 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:
- Make sure the ‘attach’ folder exists within the install.
- Once you finish entering these settings, save the changes you made to the config file.
- 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.