How to setup Exchange and what settings to enter into your iPhone to be able to use IMAP.

A great chunk of this was lifted directly from a Blog post by Wilson???. I have updated a few items and added some that were part of the comments on that post, but it is almost all Wilson??. You can see his original post here:
http://blog.monkeykit.com/2007/08/31/how-to-setup-imap4-exchange-2003-email-to-sync-with-your-iphone/

Here is what you need:

Exchange 2003 SP2 setup and fully functional.
Administrator access to both Front-end and Back-end servers
Firewall Administrator Access to your incoming firewall
And an iPhone with Wifi access (for initial sync and testing)
Setup Exchange 2003 for IMAP4 (incoming emails to your iPhone)

Go into Exchange System Manager. Expand to Administrative Groups –> GroupName –> Servers –> Exchange_server_2003 –> Protocols –> IMAP4.
Create a new IMAP4 Virtual Server. New –> IMAP4 Virtual Server…
Give it a name
Assign IP to “AllUnassigned“
A new IMAP4 Server should be assigned in the right pane. Right click on it, and go into properties.
Leave General tab as is. (unless you want to change the default TCP ports of 143 and SSL port of 993)
In Access tab, click on “Authentication…” button. Check the “Requires SSL/TLS encryption” button. Otherwise, you need to check box it. Otherwise your password will be going thru cleartext!!
Okay, and get out of this window.
Repeat the same steps on your backend server if you have one.
Setup Exchange 2003 for SMTP (outgoing emails from your iPhone)

Go into Exchange System Manager. Expand to Administrative Groups –> GroupName –> Servers –> Exchange_server_2003 –> Protocols –> SMTP.
Create a new SMTP Virtual Server. New –> SMTP Virtual Server…
Give it a name
Assign IP to “AllUnassigned“
A new SMTP Server should be assigned in the right pane. Right click on it, and go into properties.
Leave General tab as is. (unless you wnat to change the default TCP port of 25)
In Access tab, click on “Authentication…” button. It should look like below
Iphone Exchange 2003 Authentication window
Click on the “Users” button and add the appropriate mobile users who will have an iPhone that will be sending. Make sure you only include those you want to be able to send. !!!Otherwise, you will have a nice open SMTP server for all the spammers to spam if you put “everyone”!!! Click OK and OK when you are done with the users and Authentication.
Skip Messages Tab
Click on “Delivery tab” and on “Advanced” button
If this Exchange server you are setting up is a front-end server, you will want to fill the Smart host field with your Back-end Server or whatever server processes your outgoing SMTP requests. If your Back-end server has an IP address of 172.16.62.5, put the IP address in a square bracket. Ie. [172.16.62.5] Click on OK when you are done.
You do not need to do this on your back-end server if your back-end server is sending the outgoing emails.
Firewall:
Depending on what firewall you have: Cisco Pix, Nokia checkpoint, etc. you’ll need to open the following TCP ports to the front-end Exchange server to the world.

IMAP4 (ie 143)
SMTP (ie. 25)
SSL IMAP4 (ie.993)
Exchange Services:

You need to set “Microsoft Exchange IMAP4″ Service to Automatic and Start the service.
You need to set “Microsoft Exchange SMTP” Service to Automatic and Start the service. (if it isn’t already)
Apple iPhone:
These are the settings that I recently placed into a iPhone 3G running iOS v??:

IMAP Account Information
Name: Karl Blogenfield
Address: KBlogenfield@giveaway.org
Description: Giveaway Exchange Mail

Incoming Mail Server
Host Name: mail.giveaway.org
User Name: KBlogenfield (this is the Windows User Name)
Password: login password that you use to log into your computer

Outgoing Mail Server
SMTP: mail.rdiinc.org
Host Name: mail.giveaway.org
User Name: KBlogenfield (this is the Windows User Name)
Password: login password that you use to log into your computer
Use SSL: On
Authentication: NTLM
Server Port: 25

Advanced Button
Incoming Settings Section:
Use SSL: On
Authentication: NTLM
IMAP Path Prefix: /
Server Port: 993

On older iPhones you may need to set the interval for expunging messages that have been deleted. Tap Settings > Mail, select the IMAP/Exchange account, tap Advanced, then select the purge interval from the “Deleted Messages” group.

Setting up Exchange 2003 via IMAP on an iPhone
Tagged on: