There are several methods of connecting your iPhone to Microsoft Exchange server 2003/2007. I will outline the steps that we took with our Exchange 2003 Server.
Microsoft Exchange 2003:
Before you begin, you must have the latest Service Pack for Exchange (time of writing - SP2). Also, you must open the firewall to allow the configured ports to be used for the IMAP server (default ports are IMAP 143, IMAP SSL 993, SMTP 25)
If you are currently using Outlook Web Access for your Exchange server, chances are you already have a SSL certificate configured. It is highly recommended that you have SSL for Outlook Web Access or IMAP. You can use this certificate to provide SSL communication with the Exchange server over IMAP4.
By default, the IMAP4 Virtual Server is disabled. Most systems administrators are reluctant to enable this service due to security concerns. However, we will be using SSL to secure the traffic as we do with Outlook Web Access.
First thing we need to do is enable the IMAP4 service and set it to automatically start. Then we can start the service (IMAP Virtual Server) in the Exchange System Manager. Once the service has been started, you can make modifications based on your Exchange setup. If you prefer to change the default ports (IMAP4 143, IMAP SSL 993) you can do so in the General tab.
Within the Authentication settings for the IMAP4 VS, you can import a currently used certificate for Outlook Web Access w/SSL. However, be careful with the certificate you import, as the IMAP4 server must be installed on the same server as OWA (ex. webmail.mycompany.com).
Next, we will configure the SMTP Virtual Server to allow outgoing emails from the iPhone device.
Open the properties of the SMTP VS and click on the “Users” button. Next, add the appropriate mobile users who will have an iPhone that will be sending emails. Be careful not to add everyone, as you will open your SMTP server for all the spammers.
Exchange should now be setup as a IMAP4 server using SSL. You can check your settings by connecting to your email server with Outlook using a IMAP profile.
iPhone Setup.
That’s it! Your mailbox will start sync’ng with the Exchange server and you will be able to send and receive emails.