Sep 22, 2020 
Support Center » Knowledgebase » VisNetic MailServer » How to Run VisNetic WebMail under IIS
 How to Run VisNetic WebMail under IIS
Solution This scenario is useful in several situations:

• administrator has only one IP and wants to run both IIS and WebMail on port 80
• administrator wants to have a backup solution
• some administrators are very experienced with administration of IIS and want to use it with VisNetic WebMail

VisNetic WebMail was not designed for IIS so we cannot guarantee full functionality under IIS. After numerous tests and with the help of our customers, we discovered that with the changes described below all features should work. We do NOT officially support this configuration and can NOT offer support for configuring Webmail with IIS, configure at your own risk.

The following description was done on a test machine with IIS 6.0 and VisNetic MailServer 8.3. It should also work with older versions of VisNetic Webmail and of course with older versions of IIS.

Step-by-step description:

1. Editing the WebMail files to be compatible with IIS.

A. Create a config.html

Create (or open) the config.html with a text editor. The file should be in the \VisNetic MailServer\html\mail\ folder by default. Insert line

for example

Attention: there must not be a CRLF after ?> otherwise attachments will not be displayed correctly

B. Editing fastlog.html file (only for VisNetic WebMail versions prior to version 8.3)

Open the fastlog.html file in VisNetic MailServer\html\mail\ in any text editor and replace this block:

2. Create the Virtual Directory on IIS for WebMail

Start IIS from Control Panel -- Administrative Tools and click Internet Information Services (IIS) Manager. List the Default Web Site tree, by click righting and select (or the Action menu) -- New -- Virtual Directory.

The Virtual Directory Creation Wizard will welcome you. Click Next and in the dialog fill in the Alias. That is the name under which you want to call the virtual directory and how the users will access the WebMail interface under IIS. Let's call it 'WebMail'.

The next dialog wants you to specify the path to the directory where the html files are stored. Default is C:\Program files\\VisNetic MailServer\HTML\Mail\. If you installed VisNetic MailServer to another directory you will have to choose the appropriate path.
Click next and now the permissions definition is requested. Check Read, Run and Execute permissions.
Continue by clicking Next and the Finish button to end the Virtual Directory specification.

3. Set the properties for newly created Virtual Directory

After finishing step 1, a new item will appear in the tree. Right-click on it and choose Properties.
In the default Virtual Directory tab click on the Configuration button. Then click on the Add button in the Mappings tab.
Browse for the php.exe file that is in the C:\Program Files\\VisNetic MailServer\PHP\ directory and which should be the interpreter for html files. Fill in the extension .html. The path to the executable should be quoted with "", and confirm by pressing OK. Then once more click OK to return back to the Properties dialog.

After that, choose the Documents tab. Here you have to add a new default document type. Click Add and fill the 'index.html' in the shown dialog
Finish it by clicking OK and move the newly created type to the top of the file types list by clicking on the Move Up button.
Choose the Directory Security tab and click the Edit button for Anonymous access and authentication control section. Copy the Username, which is in the Anonymous access sub-section.

4. Assign the appropriate rights for Username

The final step is to set the correct permissions for this Username, which is used for Anonymous Access to the following folders:

• ..\VisNetic MailServer\WebMail\users
• ..\VisNetic MailServer\WebMail\config
• ..\VisNetic MailServer\WebMail\sessions
• ..\VisNetic MailServer\temp
• ..\VisNetic MailServer\html\temp
• ..\VisNetic MailServer\Mail
• Windows\temp (this is needed for attachments in Webmail - they would otherwise be truncated if this is not set)

By default the installation path to VisNetic MailServer is:

C:\Program Files\\VisNetic MailServer\

The procedure for setting the rights is shown only for the first directory. The others are the same.

Go to ..\VisNetic MailServer\WebMail folder, right-click on the Users directory and choose Properties. Choose the Security tab.
Click Add button and paste the Username which you copied in the Directory Security tab in IIS Settings.
Click OK and check the Read and Write permissions for that user.
Do the same for other folders listed above.

5. Create a new extension for PHP.EXE

Return to IIS Manager and create new extension for the php.exe (WebMail PHP). From the tree select 'Web Service Extensions' -- from the right panel click right and select 'Add a new Web service extension and add (browse) for ..\VisNeic MailServer\php\php.exe and allow it (enable the checkbox 'Set extension status to Allowed').

For older versions of IIS, you do not have to create new extension for PHP.EXE

6. Change default port and start the service

Now you need to start the IIS web service and optionally change the default IIS port (if you want simultaneous web services – VisNetic Webmail, IIS, Apache,...). Go to the IIS Manager, in the tree choose 'Web Sites' and with right mouse button click choose 'Properties'. Change the TCP port to different port, for example 801.

To start the service simply right-click the Default Web site and press 'Start'

7. Log on to VisNetic WebMail using IIS

Log on to VisNetic WebMail using the following URL format:

http://your_IP:801/WebMail or http://your_domain:801/WebMail.

Additional Tips:

Allow Virtual Hosts customization (which is not possible under IIS even after all the changes above)

1. Create Virtual Directories under IIS corresponding with your Virtual Hosts. All of them should get the data from html\mail\ folder.
2. Edit html\mail\include.html file and the last line below:

Allow attachments more than 2 MB

Edit wmi.ini file, which is in the ..\VisNetic MailServer\PHP\ folder. Find line:

upload_max_filesize = 2M

and change the number according to your needs.

Try adjusting this value if your attachments are not working properly.

Change the temp folder for uploading files

By default, WebMail uses Windows system temp folder. It is recommended to change it to the WebMail temp folder, which is in html\temp.

Edit the wmi.ini file and find this line:

;upload_tmp_dir =

delete the semi-colon from the beginning of this line and fill in your path to html\temp folder in your. Do not forget to assign permissions to that folder as described in step 4.

If you change the temp directory, please note that this new temp must have the name "temp" so for example webmail/temp/ or html/temp/, etc... (it is for increased security of WebMail)

Article Details
Article ID: 498
Created On: Jan 06, 2006 10:35 AM

 This answer was helpful  This answer was not helpful

 Login [Lost Password] 
Remember Me:
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | News | Downloads