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. |
One of the advantages of installing your own copy of SquirrelMail is that you then have access to all of the cool (and more up-to-date) plugins that are available on the SquirrelMail plugins site. Also, your users' preferences, addressbooks and other files are easily accessible to you; this is good if you want to move to another host or change some setting or other for all your users (eg. for a new plugin).
- Download the latest stable version from https://sourceforge.net/project/showfiles.php?group_id=311&package_id=334 or http://www.squirrelmail.org/
- I suggest you make a new subdomain to host your new SquirellMail site. You may have to avoid certain names like TMP, mail, and of course webmail. I chose nutmail.mydomain.com this will also create the folder you will upload to.
OR you can also install it in a normal folder in your domain like www.domain.com/webmail. Here you can name the folder anything you want.
- I suggest you make a new subdomain to host your new SquirellMail site. You may have to avoid certain names like TMP, mail, and of course webmail. I chose nutmail.mydomain.com this will also create the folder you will upload to.
- Create a directory that isn't web accessible (outside of your domain or subdomain directory) and inside that directory create 2 more directories. Name one data and the other attach. Assign them both permissions of 730 (type chmod 730 data and chmod 730 attach.
- Unzip the archive then open your ftp program and send up the all the files to the new folder.
- Once this is done you can try going to your new url, http://nutmail.mydomain.com, or www.domain.com/webmail -you will get an error (ERROR: Config file "config/config.php" not found. You need to configure SquirrelMail before you can use it.), if that happens you are doing great. But we need to fix this to get things running.
- Run the script located at /config/conf.pl by typing ./conf.pl (make sure to get the ./ in there).
- there are two settings that are vital for running your SquirrleMail, 2. Server Settings and 4. General Options.
- Server Settings:
- 1. Domain : This the suffix at the end of your email address. (example: foo@foo.com, foo.com being the domain or sub.foo.com if you are using a subdomain.)
- 2. Invert Time : false (don't touch unless you know what you are doing)
- 3. Sendmail or SMTP : SMTP (leave as SMTP unless you know what you are doing)
- IMAP Settings:
- 4. IMAP Server : This should be mail.foo.com or mail.sub.foo.com if you installed SquirrelMail in a subdomain.
- 5. IMAP Port : 993 (stick with 993)
- 6. Authentication type : login (stick with login)
- 7. Secure IMAP (TLS) : true (I'm not sure about this. TLS gives you some security so turn it on to be on the safe side. It seems to work fine.)
- 8. Server software : other (leave as is unless you know what you're doing)
- 9. Delimiter : detect (leave as is unless you know what you're doing)
- SMTP Settings:
- 4. SMTP Server : This should be mail.foo.com or mail.sub.foo.com if you installed SquirrelMail in a subdomain.
- 5. SMTP Port : 587 (stick with 587)
- 6. POP before SMTP : (leave as is unless you know what you're doing)
- 7. SMTP Authentication : login (with IMAP username and password) (stick with login)
- 8. Secure SMTP (TLS) : false (If you turn this on you will get an error when trying to send messages.)
- 9. Header encryption key : (leave as is unless you know what you're doing)
- General Options:
- 1. Data Directory : /home/(username)/squirrelmail/data/ .
- 2. Attachment Directory : /home/(username)/squirrelmail/attach/ .
- Server Settings:
- An alternate way of making these settings (for advanced users) is to find your local copy of config_default.php and duplicate it, it is inside the config folder. Change the name of the file to "config.php" now lets open this file in a text editor (I like text Wrangeler or type "nano -w config.php" in the command line). Fix the setting however you want and save your changes.
- there are two settings that are vital for running your SquirrleMail, 2. Server Settings and 4. General Options.
- a note on your settings. The mail server should be set to where you want to get mail from. I set up a subdomain called nutmail.mydomain.com but I want to get my mail from my main domain so I set it to mydomain.com and NOT mail.nutmail.mydomain.com.
Now go to your to your mail url (either nutmail.mydomain.com or mydoin.com/webmail) and sign in. Use your full email address like jim@mydomain.com.