how to resolve POP3 connection problems
between Exchange and the iPhone
POP\IMAP connection problems with your iPhone
Like me, you may have found that for no particular reason, POP accounts on your iPhone and their
connectivity to an Exchange Server may have failed. Now, this document may not help all iPhone users with
this problem, but the troubleshooting steps may still be of use.
Here are the relevant details to my scenario in my test lab:
Exchange 2007 Server with POP3 and IMAP services configured
Client Access Server (CAS)
Mailbox Server
iPhone with many mailbox accounts configured for ActiveSync, POP3 and IMAP.
No certificates configured for my Client Access Server
OK. I know that no certificates on my, or for my, CAS is not best practice. But I understand the risks and this
is my test lab.
If your scenario is similar to mine then I hope that this document is useful. To successfully work through this
document, you will need to have administrative access to your Exchange Server. If you don't, then you may
need to enlist the help of your friendly Exchange Administrator.
Your problems will likely have started with the following error messages:
The connection to the server "SERVER NAME" failed
and
The user name or password for "ACCOUNT NAME" is incorrect.
The first error actually gives you no real clue at all. All of my tests in writing this document have indicated that
the iPhone could actually connect to the server.
The second error can often point to a simple problem and a simple resolution so if you get the The user
name or password for "ACCOUNT NAME" is incorrect error then this is often resolved by resetting the
user's password. Take a diversion from this troubleshooting document and take the following steps:
1. Logon to a domain controller, or the Exchange Server
2. Using ADUC, locate the affected user
3. Right click on the user's entry and choose to reset the password
You can reset the password to the same password as before (unless a policy prevents this).
Now try to access the mailbox using the iPhone.
If this works for you then you can leave this document at this point.
Troubleshooting a POP3 Account on the iPhone
You'll no doubt remember this error message:
The first step is to test whether the iPhone can actually connect to the server.
To do this, you'll need to start troubleshooting from the iPhone itself. We will test three areas, as follows:
1. Whether the iPhone can resolve your server name
2. Whether the iPhone can ping your server
3. Whether the iPhone can connect to the server
To do this, you'll need to download some apps to your iPhone.
You will test connectivity using the cellular network. Please turn off WiFi on the iPhone. You might later
need to repeat these tests using WiFi if you want to test connectivity with WiFi enabled - useful if you are at
home or at the office. You might need to test using only WiFi if you are working with an iPod Touch.
Whether the iPhone can resolve your server name
1. On the iPhone, find the free app 'DNS Lookup' from Nettica and install it.
2. Run DNS Lookup (see picture below)
DNS Lookup will use the DNS servers that your iPhone is already configured up for.
3. Enter a Server IP address, or a server name.
This will be the server you already have configured on the iPhone, the Host Name.
If the app is able to resolve your server to an IP address, then the iPhone has passed the first test.
But if the app can't resolve your server name then you should check the following to get the iPhone to pass
this test:
a) Can the iPhone currently browse the internet?
b) Can DNS Lookup resolve a well known address - news.bbc.co.uk?
c) Is the server name or IP address correct?
Whether the iPhone can ping your server
This test may fail if your network (where your Exchange Server is) is set to ignore ping requests. It's worth
performing this test for any information that may be gleaned and for completeness.
1. Find and install Ping Lite to the iPhone. See shot below.
2. Click on the Ping button.
3. In the resultant screen, paste in the IP address you obtained from the previous test and click the 'Start'
button.
Examine the output. If all four packets were received by the server then this is good; it further proves
connectivity between your iPhone and the server. But if all packets fail, then this may simply be because
your IT department has configured their routers not to respond to ping requests. We move on to the final
test.
Whether the iPhone can connect to the server
You'll need a telnet client. A telnet client will allow us to test whether it is possible to connect directly to the
Exchange Server from the iPhone.
1. On the iPhone, find the free MTelnet app and install it.
2. Run MTelnet on the iPhone (see image below)
3. Click on the Menu button to configure a connection.
4. Click on one of the empty connections (see image below).
5. You should see a window like below.
6. Enter a Server IP address, or a server name.
This will be the server you already have configured on the iPhone, the Host Name.
7. Enter 110 as the Server Port.
This is the standard port that POP3 communicates on. There is no need to enter a User, Password, or any
other field.
8. Click Connect.
If you get an error at this stage then the iPhone actually can't reach your server.
Possible reason:
Port 110 is blocked by a firewall or router at the edge of the Exchange Server network.
You will need to verify this yourself if you are responsible for your own network, or by contacting someone
responsible for the network. Most organisations will block ports, leaving open only those that are necessary.
Those ports are then secured using some form of authentication. Port 110 is not normally a common port
that is opened and you might need to negotiate.
But if you do connect at this stage, then you will see a message from the Exchange Server.
You will have proved that the iPhone can indeed connect to the server and that that generic message from
the iPhone - The connection to the server "SERVER NAME" failed - is not quite true.
So, ignoring that error message as such, your next test is to try to log in to the server from your telnet
connection on the iPhone.
Logon to the Exchange Server POP3 service
You'll need to know of two POP3 commands to test logon and they are USER and PASS.
1. Follow the instructions above and connect to your Exchange POP3 server.
You should find yourself at something like the screen below.
2. Tap the keyboard icon and type
USER user_logon_name and tap the return button.
So, if you logon to your computer as SLJACKSON then you know that you'd better type in:
USER SLJACKSON
If, when you tap return, your entry is accepted, then you can move onto Step 3 and try your password.
3. Type in
PASS password and tap the return key, where password is the password for your user.
If on completion of these three steps you are able to login, then there would seem to be nothing wrong, and
all is working between the iPhone and your Exchange Server. Try to delete the Account on the iPhone and
recreate it again, taking care with your user name and password.
But if you get the following error
-ERR Command is not valid in this state
Then this might indicate that the Exchange Server POP3 service is not set to accept passwords in clear
text.
As mentioned before, not having any form of security or authentication for your login process is not 'best
practice'. You would not want to perform this next step, or present this method in your production network if
one of your key aims in life is job security. But for your own personal network, or a test lab, this may well be
acceptable.
To set up Exchange Server 2007's POP3 Service to accept plain text, follow the following steps:
1. On the CAS, start the Exchange Management Shell
2. Type in Set-PopSettings -LoginType PlainTextLogin
3. Restart the Exchange 2007 POP3 service
Repeat the login tests as shown above with Telnet on the iPhone.
You should find that you will not encounter that -ERR message again.
If you can now login successfully using Telnet Lite on the iPhone then you should find that your Mail Account
will now work.
But if you still get an error, it is likely to be this one:
And this time the Apple error message is telling the truth. Of sorts.
I'm not sure why this error occurs. Somewhere, it would seem that the password is possibly cached
somewhere. At a guess, it is cached on the iPhone and this cache perhaps gets corrupted, causing this
error message.
One way that I've found always works to correct this is to reset the password on the server. Follow the steps
below (don't worry, you are nearly there).
1. Logon to a domain controller, or the Exchange Server
2. Using ADUC, locate the affected user
3. Right click on the user's entry and choose to reset the password
You can reset the password to the same password as before (unless a policy prevents this).
You might have to wait for replication to occur, although password changes are usually very quick. Now try to
access the mailbox using the Mail app on the iPhone.
If you are this far, then this last stage should work and all is well.
Your ability to connect to a POP3 Service on an Exchange Server is restored and you'll be able to 'POP'
incoming messages off the server. Problems with sending messages (via SMTP) are outside the scope of
this document.
If this document hasn't quite solved your problem, then hopefully the troubleshooting steps that you have
taken will bring you closer to finding your solution.
Copyright 2010 Cairos Computing Limited
Help Computing is a trading style of Cairos Computing Ltd.
What are we
up to?
We'll write about the
sorts of things we get up
to. It'll be a slightly techy
read, but we'll try our
best to make it readable!
There'll soon be lots of
top tips for the technically
minded too.
Want to know more?
Click the icon above..
Mail connectivity problems are particularly difficult to resolve on the iPhone, especially as the error
messages that are used are not specific. Those error messages seem to be used at almost any point when
an iPhone encounters any difficulties in processing mail.
I couldn't find a generic way to effectively troubleshoot these problems on the web so I thought I'd write my
own. I hope that this is useful to you.
This article will focus on troubleshooting POP3 connections between an iPhone and an Exchange Server,
and two error messages in particular:
The connection to the server "SERVER NAME" failed
and
The user name or password for "ACCOUNT NAME" is incorrect
helpcomputing
If you and your computer are in or around London, we
could help!