WebMail/SurgeMail Integration
WebMail can be integrated with SurgeMail which is the Netwin Ltd mail server.
 
The default installation of SurgeMail will also install WebMail as a free add on package. The installation will use SurgeMail web server, which can be changed after installation. See: Moving WebMail to Another Web Server for more details.
 
SurgeMail is Netwin Ltd mail server. WebMail comes as a package deal with SurgeMail. Installing SurgeMail will also install WebMail using SurgeMail's web server.
 
First I'd best make it clear that SurgeMail and WebMail are separate products. It's just WebMail is packaged with SurgeMail to provide a all in one package. There are features in SurgeMail which also appear in WebMail, like Filtering and Spam options. The reason is that customer who are not using SurgeMail still can use these options.
 
Any feature of SurgeMail is done by the server side. In the case of Filtering and Spam this happens when the email arrives. So even users which are using external mail clients like Pegasus also get the benefit of the filtering and spam options.
 
WebMail features only get actioned when the user logs in and use WebMail. So if the user only uses webmail say once a month, then features like filtering and Spam only happen once a month.
 
Overall, given a choice it's best to use the SurgeMail options as they provide better performance and the ability to also work with other mail cleints.
Overview
The diagram below, shows you an overview of WebMail and the interaction of WebMail with SurgeMail. In this case WebMail interacts with 2 of SurgeMail modules.
 
The 'User Interface' is the main interface to allow users to set up mail server setting like forwarding, filters, spam settings and the like. While 'SurgePlus' is the interface which allows Filestore and Calendar.
 

When a user wishes to change a 'user interface' setting like 'Server filters' or 'Holiday settings', WebMail performs an autologin call to the 'user interface', so that the user does not have to re-enter their username and passwords.
 
The same happens for 'SurgePlus' options like 'Calendar' or 'Filestore'.
 
User Interface Options
Currently, the following are the options that are set up within WebMail templates:
 
Change Passwords This allows the user to change their password.
Filters and Exceptions Use exceptions and filtering rules to organise your incoming mail.
Holiday Settings Setup an "out of the office" autoresponder or have your email forwarded to another account.
SMS Messages Have important email sent to your cell phone as a text message.
Aliases Create and manage other email addresses for this email account.
Friends Settings Verify that Email sent to you is coming from a person, not unwanted advertising (recommended).
Server Spam Settings Hold, Bounce or make spam Vanish before it reaches you.
SPF Settings Change your SPF spam control settings.
Mailbox Settings Create Rules to oganize or archive your email once a day.
Centipaid Charge small amounts to people sending you email. Generally used to stop Unwanted Email.

Each does a autologin to SurgeMail requesting to display the correct page. Once the user has saved the settings, the effects will be happen straight away. For example if you use the 'execption' rules to set up a surgemail filter to say filter all emails from x@test.com to your trash folder. Any EMail which you receive from then on will be placed in the trash folder.
 
In your default WebMail.ini file you should have 11 'netwin_autologin_id' lines which have the number range of 0-2 and 4-11. Below is the list of, the number and where it takes you:
 
0 - Change Password
1 - Friends - Main Options
2 - Holiday Settings
4 - Spam Filtering - Main Options
5 - Centipaid
6 - SMS Messages
7 - Mailbox Settings
8 - Aliases
9 - Exceptions/FIltering
10 - Spam Filtering - Held Messages
11 - Friends - Pending Emails
12 - SFP Settings
13 - Mailbox Settings - Archiving

If you wish to remove a feature all you need to do is comment out the matching 'netwin_autologin_id' for that feature.
SurgePlus Options
Currently the following are the options that are setup within WebMail templates:
 
Calendar This allows the user to view and edit their online calendar.
Filestore This allows your users to use an online file system to store files, images, and documents.

In your default WebMail.ini file you should have 4 'netwin_autologin_id' lines which have the number range of 100-103. Below is the list of the number and where it takes you:
 
100 - SurgePlus main page
101 - SurgePlus Calendar
102 - SurgePlus Filestore
103 - SurgePlus Filestore - Defaults to '/pictures' folder

If you wish to remove a feature all you need to do is comment out the matching 'netwin_autologin_id' for that feature.
SurgeMail Mirrors
SurgeMail support mirroring allowing backup servers and load balancing. This does effect how to setup WebMail on systems which are mirrored.
 
If you plan to load balance webmail across multiple machines you must consider the following the guide lines:
1. WebMail public folders do not work in mirroring mode.
2. If you plan to do any balancing on the webmail machines you MUST ensure that within 1 webmail session the users stays on the 1 machine. Moving between machines will cause utoken error messages.

 
Depending on if you plan to have 1 or more seperate webmail machines and if you are setting up a new system for users, or updating your current system to add a new surgemail mirror will depend on what steps you need to take with webmail setup. See below sub section on how to do this.
 
Only 1 WebMail Machine:
If you have just 1 webmail machine, and do not plan to change this setup, no changes are needed to be done to webmail. But if you plan to later on update the system to have multiple webmail machines you should add these settings to your webmail.ini file:
use_surgemail_xfile true
keep_attach_remote true
If the system is not a new setup then you should also add this setting also:
xfile_upload_default true
This will ensure that webmail current user settings and address books are uploaded to SurgeMail. Once every user has logged in atleast once you can remove this ini setting.
 
Warning: Users which are running close, or over their IMAP quota, might have problems uploading their user settings and address books. If this loks like it could be a problem best to increase the users quota about 20k to ensure the entries are uploaded. You can also decrease this at a later stage.
 
New System Setup:
For a new system setup, where you want to have more than 1 WebMail machines, either running on the main mail server or as seperate machines you will need to do the the following changes to the default setup.
1. Setup SurgeMail to mirror as needed.
2. Ensure each webmail.ini file as these settings:
use_surgemail_xfile true
keep_attach_remote true

Updating a current System for Mirroring:
For a current system setup, where you want to have more than 1 WebMail machines, either running on the main mail server or as seperate machines you will need to do the the following changes to the default setup.
1. Setup SurgeMail to mirror as needed.
2. Ensure each webmail.ini file as these settings:
use_surgemail_xfile true
keep_attach_remote true
xfile_upload_default true
3. Once all users have logged in you can then remove the setting:
xfile_upload_default true
and then start load blancing for your webmail users.

Warning: Users which are running close, or over their IMAP quota, might have problems uploading their user settings and address books. If this loks like it could be a problem best to increase the users quota about 20k to ensure the entries are uploaded. You can also decrease this at a later stage.
Moving WebMail to Another Web Server
When you install SurgeMail it will use SurgeMail's web server. You do not have to use the SurgeMail web server if you do not wish to. In which case you will need to set up WebMail on the other web server.
 
If the web server is stored on the same machine, it is easier to move. All you need to do is copy over the images, CGI and INI to the correct location on your web server. Let's say that your new web server has the following folders:
	/home/httpd/cgi-bin
and	/home/httpd/html

Where the first one is the location where cgi's are run from and the second is the base location for the web path.
 
Then all you do is copy over all the images like this:
mkdir /home/httpd/html/nwimg
mkdir /home/httpd/html/nwimg/mail
cp -rf /usr/local/surgemail/www/nwimg/mail /home/httpd/html/nwimg/mail

Then copy over the webmail.exe and webmail.ini files like this:
 
cp /usr/local/surgemail/scripts/webmail.* /home/httpd/cgi-bin

For a more complicated move than the above it's best that you talk to support-webmail@netwinsite.com