I run an email server (CommuniGate Pro) under Red Hat Linux for our organization of about 200 employees. Many of our employees use their phones (iPhones 5 or later), to get their email. Some use IMAP and some use the Exchange option on the phone; CommuniGate provides for Exchange-like mode with an AirSync service. Our organization has a contract to use a regional cell carrier - it is not one of the "big three", but I will call it "OurTel" in this post.
The issue that continues to come up: a user gets a new iPhone from OurTel. They add a new account under IMAP with their account information (account, password, mail server, SMTP server).. The mail server and SMTP server are the same server. The iPhone verifies the mail server (download) but gives an error about failing to connect to the SMTP server (remember they are one & the same, as are the credentials). Going ahead and finishing adding the account, the user can download email from the server, but cannot send.
Repeat the same setup adding an account as an Exchange account. Same errors.
Now for the strange part - let's assume we were adding this account (and getting errors) while the phone is operating under the OurTel cellular 4G LTE service. We switch the phone out of cellular data mode and run the phone with a WiFi connection. Add the account again with the Exchange option (assume we have been deleting the account after each SMTP error/fail). The account adds flawlessly (& quickly) under WiFi. The user can send and receive. There have been no changes to the account or server, only switching to WiFi instead of running across the cell network. Switch the cellular data service back on, get off of the wireless network and back to LTE. The phone sends and receives email without a problem. It continues to work unless there is an update to the IOS or the account password changes etc. Then the SMTP error occurs again and the same routine for getting the account to work.
What makes this stranger is that we do not see the same problem occur on AT&T's network when setting up an account instead of the regional provider (OurTel). I cannot confirm that it happens every single time a new account is added on an iPhone on OurTel's network, but it has NEVER happened with an AT&T iPhone.
I will also add that if the user has a Gmail or Yahoo! email account, they never have problems getting those accounts to send & receive on OurTel's network. You can see why I am having a hard time trying to figure out where the problem is!
our email server's Internet connection is on AT&T's network.
port 587 is used for SMTP.
SSL is on
How do I go about diagnosing this? I can understand doing a packet capture on a PC while it is connecting to the server, but how do you do this with an iPhone? I am not even sure where to look - is it the phone, the carrier, our server, or something else?