Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail can't connect to SMTP server for IMAP accounts

Hi all -


I'm running Mail 8.0 under Mac OS 10.10. Mail was running fine under Mavericks but since I upgraded to Yosemite it is having major problems.


I have a bunch of IMAP accounts on the servers at Dreamhost. I can connect to these accounts some of the time, but most of the time I have the dreaded exclamation point in a triangle. I cannot send outgoing messages either. Rebooting doesn't help. Reinstalling Yosemite doesn't help. If I switch to an old Mavericks partition it works fine.


The Connection Doctor says "Could not connect to this SMTP server" and all the Detail Window shows is "INITIATING CONNECTION Nov 01 17:46:30.270 host:mail.domain.com -- port:143 -- socket:0x0 -- thread:0x6080010689c0".


I've seen similar problems reported elsewhere and have tried the cited solutions, including

(1) unchecking "Automatically detect and maintain account settings" for both the Account and the outgoing server list

(2) checking "Allow insecure authentication"

(3) unchecking "Use SSL"

(4) editing ~/Library/Mail/V2/MailData/Accounts.plist (with emacs) and setting UserAllowsInsecureAuthentication to true.

None of these does any good.


If I go to Terminal and type "telnet mail.domain.com 25" I get:


Trying IP address...

Connected to mail.domain.com.

Escape character is '^]'.

but no welcome message, and the server does not repond to HELO or EHLO. It times out with "Connection closed by foreign host."

It seems pretty clear there is a major problem with Mail in Yosemite.

Fortunately, some of the time when I reboot and leave it for a while, it works, but 90% of the time it's down, even with reboots. This is a major drag.

-Scott

Mac Pro, OS X Yosemite (10.10)

Posted on Nov 1, 2014 6:04 PM

Reply
13 replies

Nov 1, 2014 11:04 PM in response to musQaria

Here is a follow-up with data from the Console. There are two errors relating to Mail which are showing up.


There are a bunch of these:


11/1/14 10:46:53.633 PM Mail[554]: No worthy mechs found


and a bunch of these:


11/1/14 10:46:55.195 PM Mail[554]: [IMAP] Got Error Domain=MCMailErrorDomain Code=1030 "The IMAP command “AUTHENTICATE” failed with server error: Authentication failed.." UserInfo=0x600000a6c1c0 {NSLocalizedDescription=The IMAP command “AUTHENTICATE” failed with server error: Authentication failed..} for operation IMAPClientAuthenticateOperation "AUTHENTICATE", EXECUTING <0x6280002a6f60> (4.6 AUTHENTICATE PLAIN *****

)


-Scott

Nov 2, 2014 12:02 AM in response to musQaria

Port 25 is not considered a secure port.You need to use different settings to connect in a more secure manner.

  • "Incoming Mail Server Info", "Mail Server": "mail.example.com", "User Name": enter full email address
  • Under the "Advanced" tab, "IMAP Path Prefix" is "INBOX", "Use SSL" is checked, and the port is "993". "Authentication" should be "Password". "Automatically detect and maintain account settings" should be unchecked.
  • Outgoing Mail Server Info", use {"SMTP Server": "mail.example.com", "User Name": enter full email address
  • "Edit SMTP Server List…use SSL port "587", password authentication, and the full email address for the username and the appropriate password.

Nov 2, 2014 1:52 AM in response to dianeoforegon

Thanks for the response. I only used port 25 for testing with telnet on the command line. It's not part of the email configuration. Everything is already exactly how you are advising it to be, with the exception of the outgoing SMTP port which is set to port 465 (SSL). As I am writing this, my email is working completely. I will hope that the problem has somehow gone away permanently, but previous periods of correct functioning have been followed by periods of exclamation points in triangles. Still, my fingers are crossed.


-Scott

Nov 2, 2014 8:07 AM in response to musQaria

This this to fix repeated password requests....


Open Keychain Access in Applications/Utilities

Search for your Dreamhost accounts. There should be two entries (incoming, outgoing) for each account.

It's not uncommon to find old entries. You might want to delete all and start clean.The Keychain isn't smart and will keep all old entries when you add/change a password.

While you are in the Keychain run Keychain First Aid, Under Keychain Access in the Menu bar.

Open Mail

Open Connection Doctor.

If you see red for the account, enter the password again.


If you continue to have problems, delete the account then add it back.

Nov 12, 2014 2:09 PM in response to musQaria

So the problem I described 10 days ago continues. Fortunately, I have discovered a work-around.


If I leave Apple Mail running after a short while it stops being able to connect to my Dreamhost SMTP servers, as I have described. If I quit Mail and leave it for a while, it can connect again. Not sure just how long it takes; if I restart Mail right away it still can't connect, even if I reboot. It has to sit for 15 minutes or whatever before it can connect again.


So now it's a mild annoyance rather than a continuing problem.

Nov 13, 2014 7:42 PM in response to dianeoforegon

I had the precise issue in the original post: could not send email despite multiple SMPT settings.


I went into Keychain and eliminated all references to the accounts I was experiencing difficulties with, restarted, opened Mail, and was prompted to enter my password twice (once for incoming, once for outgoing).


Problem solved.


Apparently Keychain corruption/confusion was the culprit in my case.


Thanks Diane for the pointer. I was pulling out what was left of my hair.

Jul 21, 2015 3:38 AM in response to musQaria

Like musQaria this caused me hours of frustration. I tried all the tricks, such as deleting the keychain passwords, removing the certificates then accepting then again and so forth. Connection doctor simply times out. I used the setting on the dreamhost wiki.


Eventually we resolved it.


I am convinced the problem was cause by dreahnost blocking my IP address.

This probably happened because we had several OSX devices whit the same accounts on our home network, some of them were old and had not had the email password updated. After several failed attempts to login DH would block our public IP. While I don't have a fixed IP the problem would go away when our IPS issued our modem a new IP but appear again if some one opend up mail on an old ipod on the network that had a bad mail account setup or we were re-issued with an already blocked IP


Eventually after some time all the IP addresses in my ISPs modem pool were blocked and we almost always were issued the same IP by the ISP


I only discovered this after re-creating the account from scratch on a new device then being lucky enough to get a new IP after restarting the modem. It seemed that the login error response from DH would only be given for a short time after the IP was first blocked after that it would simple fail to connect and time out with no error message.


We had 10 different OSX mail devices each with 1 or 2 mail accounts on them used by different family members.


DH took around 24h to respond and did so by email so we had no easy way of communicating whit them and were with out email for about 5 days.

eventually we found an old ipod touch with mail setup on it that was probably responsible for all the failed stmp login attempts.


Quite frustrating.

May 13, 2016 5:36 PM in response to dianeoforegon

This was the first helpful answer I have found after searching everywhere. I posted a question over in El Capitan/mail. I get emails from Google about somebody trying to access my account. I look in the logs at that time and see

[IMAP] Got Error Domain=MCMailErrorDomain Code=1030 "The IMAP command “AUTHENTICATE” failed with server error: (#AUTH903) Missing 'user' field in the provided XOAuth2 authentication payload." Then XOAUTH2 requires user.


I'll try the settings and see what happens.

Mail can't connect to SMTP server for IMAP accounts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.