# Surgemail BroadSoft Integration Guide

In general, there is very little specific integration that will be needed, the Broadsoft VOIP system will use surgemail as it's backend storage mechanism and you shouldn't need to concern yourself too much with anything in surgemail.

## Installation

Perform a normal surgemail installation. On windows just download the normal SurgeMail distribution from our website http://netwinsite.com/surgemail/download.htm and run the installer. On unix download, untar, and run the install.sh script, e.g.

       gunzip surgemail_XXX_linux.tar.gz
       tar -xvf surgemail_XXX_linux.tar
      cd mtemp
      ./install.sh

Next add the domain name you wish to host with Broadsoft using the web admin tool
https://your.server:7025
Click on Domain Settings/New
Enter the name of the domain, press save.
Add these settings to ensure the email from the broadworks system is accepted.
G_GATEWAY_ALLOW "ip.address.of.broadworks.server"
G_SPAM_ALLOW "ip.address.of.broadworks.server"

## Provisioning/Creating User Accounts

If the server is not going to be visible to the internet then you can use the automatic account creation features.
For the domain in question set these settings in surgemail.ini (or using the web admin interface)
USER_AUTO_PASS "xxxxCHANGETHIS"
USER_AUTO "TRUE"
These two settings allow surgemail to just create any account that gets a message from the broadsoft server, and then correctly update the password when the first login attempt occurs. SECURITY WARNING: It's essential that if these settings are used the server must NOT be accessable via any other system than the broadworks server.
If you wish the SurgeMail server to be accessed directly by users, then instead you must create the accounts using the web admin interface.
If you have existing accounts on another system then you can use the pop/imap intercept mode settings to automatically create accounts, see the domain level settings old_pophost* and old_imaphost*

## What to do if something goes wrong

Just consult the normal surgemail documentation, a good starting place is the don't panic guide.