Laptop users who move between their company network and another network, such as a home or a coffeehouse network, may need to connect to different Exchange Server addresses depending on the location. For example, at work I connect Entourage 2004 directly to a back-end Exchange Server but at home I connect it to my company’s Outlook Web Access (OWA) front-end server. Entourage does not give me the ability to store both server addresses and switch between them easily, so I’ve written this AppleScript to do it for me automatically.
Why would I not always use my company’s OWA address? Using the Internet webmail address from inside a company network may result in sluggish activity and long delays sending or receiving mail. Depending on the network topology Entourage may be leaving the company network to go to the Internet and connect to the OWA server, which in turn must connect to the internal Exchange Server that contains the email account. That’s a lot of hops. Connecting directly to the back-end Exchange Server is usually faster.
This is a script in progress and I’m asking you for some input into how it will eventually work and be documented. My goal is to make it easy for anyone to understand and use but since my technical writing skills are from the viewpoint of a technical analyst working in IT I can make a non-techie’s eyes cross in just a few sentences if not careful. Fresh eyes make anything better.
First, how should the script work? I thought of three scenarios for how the end user would interact with the script:
- Each time Entourage is launched ask which server address settings should be used.
- Automatically and silently change the server address settings based on the computer’s IP address.
- Ping each server to see what is available and then to use that server. Then automatically and silently change the server address settings based on the computer’s IP address.
The third scenario is my favorite but after testing it with my own company’s OWA server I found that the server is set not to respond to pings for security reasons. The first or second scenarios may be better.
Next, copy and paste the script code below into a new Script Editor window. The Script Editor application is found in the /Applications/AppleScript folder. I suggest saving the script in your Microsoft User Data folder in your home folder ~/Documents/Microsoft User Data/Scripts with a name like “ExchangeServerSwitcher.scpt”.
10 properties just below the instructions must be specified in the saved script. The first seven describe your company server settings and the last three describe your OWA server. The workNetworkIP property is tricky to describe. It should simply be the first part of your company’s IP address range. If the script detects your computer’s address as 10.1.22.30 then it will compare that to workNetworkIP property and set Entourage to use your company’s back-end Exchange Server. If the script detects your computer’s address as 192.168.1.5 then it will compare that to workNetworkIP property and set Entourage to use your OWA server. The rest of the settings should be fairly straight forward but I’ll document these in detail later.
Finally, create a schedule in Entourage that points to the script. It should execute at Startup and trigger the Run AppleScript action. Click the Script… button to select the saved script. The script is ready to run the next time you launch Entourage. If you’re able to access your Exchange account while connected to your company network and home network and never have to change server settings then it has accomplished its mission.
Please post your comments, problems and suggestions here so that all interested folks can learn from your thoughts or experiences. The final script and documentation will be posted later in the Exchange section of The Entourage Help Page.