MBF Knowledge Base |
|
SquirrelMail installation:
To set up SquirrelMail the following elements are required:
A PHP enabled web server (Apache 1.3/Apache 2.0 are commonly used).
PHP version 4.1.2 or higher.
Perl installed and running for the initial configuration.
First you need to download the tar-ball from the SquirrelMail website and save it on the machine that runs the web server.
After this step is completed, extract the archive content, copy the contents of the archive into a folder named "webmail" and place this folder in the site root.
An example of the above steps, corresponding to a Linux OS (Debian) and version 1.4.20 of SquirrelMail, would be:
tar -xzvf squirrelmail-1.4.20.tar.gz
mkdir webmail/
cp -Rv squirrelmail-1.4.20/* webmail/
mv webmail/ /var/www/
It is very important to make sure that the contents of this folder are accessible by the user running the web server. The Apache software uses "www-data" by default as the user. Permissions on the contents of the "webmail" folder must give read and write access to this user. Failing to do so will generate access errors while logging into the webmail interface. An example of such an error would be:
For a Linux OS use the following commands:
chown -R www-data:www-data /var/www/webmail/
chmod -R u+rw /var/www/webmail/
At this point, when you access in a web browser the SquirrelMail Webmail using the base address followed by the name of the folder, in this case "webmail" (https://www.mysite.org/webmail), you will get the below message:
If this page is not accessible at all and you get an error you probably have encountered an issue related to access rights. Go back to the previous steps and make sure that everything is configured accordingly and retry.
SquirrelMail Configuration:
Before logging into the Webmail interface, it needs to be set up. The setup procedure depends on the particular setup a company uses. To start this procedure run the "configure" script found in the "webmail" folder.
While configuring SquirrelMail you have to make sure you specify the correct options for the current setup on your AXIGEN Mail Server. The server address for SMTP and IMAP should be set, and port numbers should match those of the respective listeners defined in the AXIGEN configuration. The authentication type is also very important and should never be overlooked.
If you do not have Perl installed or for some reason you cannot run the configuration script, all the changes must be made by editing the configuration file, before logging in for the first time.
Also you should create a data-dir and attachment dir, outside the webtree (e.g. in /var/local/). The data-dir (for user prefs) should be owned by the user the webserver runs as (e.g. www-data). The attachment dir (for uploading files as attachments) should be file mode 0730 and in the same group as the webserver. Examples of the corresponding commands would be:
mkdir -p /var/local/squirrelmail/data /var/local/squirrelmail/attach
chmod -R 0730 /var/local/squirrelmail/
chown -R www-data:www-data /var/local/squirrelmail/
For running the configuration script and setting the minimum required options for integrating SquirrelMail with Axigen follow the below steps:
1) issue the below command to run the configuration script:
/var/www/webmail/./configure
or:
sh /var/www/webmail/configure
2) From the configuration script menu, select 2, in order to access the Server Settings section, and press the return key:
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> 2
You will be presented with the Server settings menu:
Server Settings
General
-------
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP
A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25
Select the required setting, by entering the corresponding character and hit the return key. You must set the proper IMAP and SMTP parameters corresponding to your Axigen service listeners and allowed authentication methods. An example for the IMAP and SMTP server parameters settings can be found below:
IMAP Settings
--------------
4. IMAP Server : mail.example.com
5. IMAP Port : 143
6. Authentication type : cram-md5
7. Secure IMAP (TLS) : false
8. Server software : other
9. Delimiter : detect
SMTP Settings
-------------
4. SMTP Server : mail.example.com
5. SMTP Port : 25
6. POP before SMTP : false
7. SMTP Authentication : none
8. Secure SMTP (TLS) : false
9. Header encryption key :
NOTE: In the above server settings, the mail.example.com is the hostname of the Axigen server station. Replace this and the service ports with the ones you assigned to your Axigen station and corresponding IMAP/SMTP Listeners. You can use the Axigen IMAP/SMTP service IP address instead of the server's hostname.
IMPORTANT: To make sure that the used authentication method is secured, we suggest you set the IMAP Settings -> Authentication type to cram-md5
An important note here would be SquirrelMail's inability to automatically detect the supported authentication types of the AXIGEN Mail Server. This does not however prevent SquirrelMail from correctly connecting while using any of the available authentication methods.
3) Optionally you should set for the Domain name parameter, option 1 in the Server Settings -> General section menu.
Server Settings
General
-------
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP
NOTE: Use "R" to go back to the main menu from any configuration sub-menu.
4) In the main menu section choose 3 to open the Folder settings:
Folder Defaults
1. Default Folder Prefix :
2. Show Folder Prefix Option : false
3. Trash Folder : INBOX.Trash
4. Sent Folder : INBOX.Sent
5. Drafts Folder : INBOX.Drafts
6. By default, move to trash : true
7. By default, save sent messages : true
8. By default, save as draft : true
9. List Special Folders First : true
10. Show Special Folders Color : true
11. Auto Expunge : true
12. Default Sub. of INBOX : true
13. Show 'Contain Sub.' Option : false
14. Default Unseen Notify : 2
15. Default Unseen Type : 1
16. Auto Create Special Folders : true
17. Folder Delete Bypasses Trash : false
18. Enable /NoSelect folder fix : false
Use this section to set the desired behavior for your SquirrelMail Folders.
IMPORTANT: If you wish to use the Axigen mailbox Trash, Sent and Drafts folders you have to set them via the above corresponding 3,4 and 5 menu items. The proper settings for these folder parameters are:
3. Trash Folder : Trash
4. Sent Folder : Sent
5. Drafts Folder : Drafts
NOTE: The folder names should not include the default SquirrelMail "INBOX." prefix.
Return to the main menu using "R".
5) Now you must set the proper paths for the SquirrelMail webmail data and attachment folders, by entering the 4 menu, corresponding to the General Options. By default these are:
1. Data Directory : /var/local/squirrelmail/data/
2. Attachment Directory : /var/local/squirrelmail/attach/
If you previously created these directories and set the proper permissions for them, you can leave these are they are. If not, you must change the path to reflect the proper directories.
6) After returning to the Main Menu (using "R"), type "S" and hit the return key to save your settings. After this quit the SquirrelMail configuration script using Q and hit the return key.
SquirelMail acts as an IMAP client and connects to the AXIGEN Mail Server through this protocol to access e-mail messages. For as long as the web server and AXIGEN are running and the configuration is correct you will not encounter any issues.
To test the SquirrleMail configuration, you can access the below link in your browser:
https://www.mysite.org/webmail/src/configtest.php
You should now be able to access the SquirrelMail login page in your browser using the base address followed by the name of the folder, in our example: "webmail" (https://www.mysite.org/webmail):