# Virtuoso ODS WebMail Installation Guide

## Requirements

To make an ODS WebMail Installation you need:

1. WebMail VAD package: ods_webmail_dav.vad
2. ODS Framework vad package: ods_framework_dav.vad
3. Running Virtuoso Server. (version 3.5 or higher)
4. SMTP Server
5. Mail Drop application

## Installation steps

### Step 1: Building VAD package

1. If you have WebMail VAD package, you can jump to Step 2.
2. To build an WebMail VAD package, you need to have a fresh copy of the WebMail sources from CVS repository and Virtuoso environment installed.
3. In the opensource tree, the path to module is: \virtuoso-opensource\appsrc\ODS-WebMail
4. After cvs update, go to ODS-WebMail directory and run:

    ./make_vad.sh

5. As result should be build ods_webmail_dav.vad and ods_webmail_filesystem.vad packages. You can locate them in the same folder \virtuoso-opensource\appsrc\ODS-WebMail.

### Step 2: Installing the WebMail VAD package

1. If you already have installed the ODS Framework package, you need only to execute either from Conductor Interactive SQL or from ISQL the following line:

    DB.DBA.VAD_INSTALL('/<package_path>/ods_webmail_dav.vad',0);

2. As result, if the installation is successful, should be shown the messages:

      00000    No errors detected, installation complete.
      00000    Now making a final checkpoint.
      00000    Final checkpoint is made.
      00000    SUCCESS

### Step 3: Configuration of receiving mail messages

1. To be able to receive mail using your ODS WebMail account, you need to have the following components:

1. SMTP server (MS SMTP, Sendmail, Qmail, ...)
2. domain name (for example: domain.com)
3. OpenLink Mail Drop program

2. The working schema is:

    Internet-->SMTP Server(*@domain.com)-->Mail Drop App (via odbc)-->Virtuoso DB message

You need to configure a SMTP server to receive messages for your domain name and execute mail_drop application for every incoming mail message to this domain. For reference see the steps below.

#### For Windows installation

1. You can use Windows version of Mail drop program and standard MS SMTP Server. The Mail Drop application included the following files:

1. maildrop.dll
2. odbc_mail.exe
3. odbc_mail.ini
4. register.bat
5. smtpreg.vbs

The files maildrop.dll and odbc_mail.exe you can found in your Virtuoso installation folder.

2. Place the files from above in the Virtuoso Server folder and execute:

    register.bat /register domain.com

3. As result will be registered a rule in your MS SMTP server which means:

"If incoming message is for domain domain.com, then execute odbc_mail.exe"

4. Configure the SMTP server so to add domain.com as alias or as default domain name. This can be done via Internet Information Services Administration:

       Start->Settings->Control Panel->Administrative Tools->Internet Information Services.

### Step 4: Configuring WebMail application

1. Go to http://[host]:[port]/ods
2. Login as dav user (default password is dav)
3. Go to Site Settings->Server Settings and configure domain names list with available domain for user registrations.
4. Check if in the list "Existing Hosted Mail Domains" there is your domain, for ex. domain.com. If not, add it.
5. Logout as user dav.

### Step 5:WebMail UI

1. Go to http://[host]:[port]/ods and register a new user.
2. Go to WebMail and create new instance. In the create instance page you need to provide domain from the list of available domains for your email address.
3. As result you will be redirected to your WebMail Inbox