Apple Event: May 7th at 7 am PT

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

10.10.4 Mail SMTP problem

Hi,


I know, that there are other discussions regarding Apple Mail not sending mails via SMTP. Most of these SMTP-servers do not use a strong DH key (logjam). But my problem is different.


I'm using a self operated mail server with dovecot (and dovecot SALS) and postfix. The server already uses strong DH keys and strong encryption. TLSv1.0 is available, but not v1.1 or higher.


Actually I had no problems before 10.10.4. The problems started after I upgraded to 10.10.4.


I use a payed Google Apps account in combination with my own SMTP server for sending mails. So Google Apps IMAP for incoming, my own SMTP server for sending mails.


I tried changing the configuration, but it simply does not work. Apple Mail connects, but sends no password.


The servers mail.log says simply:


Jul 13 10:09:21 aldur postfix/smtpd[28176]: warning: unknown[x.x.x.x]: SASL LOGIN authentication aborted

The connection log says (garion is my MacBook):

Jul 13 10:09:47 garion Mail[1346] <Debug>: Connected: <MFSMTPConnection: 0x60000057a580> (Connected) account: A{SMTP - 534CDE8D-59E7-4698-8A0E-ABF14A273AB5}

hostname: hostname.domain.de, port: 465, security layer: kCFStreamSocketSecurityLevelTLSv1_0

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] >> EHLO (19 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-hostname.domain.de

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-PIPELINING

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-SIZE 110000000

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-VRF

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-ETRN

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-AUTH PLAIN LOGIN

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-AUTH=PLAIN LOGIN

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-ENHANCEDSTATUSCODES

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250-8BITMIME

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 250 DSN

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] >> AUTH (5 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 334 (12 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] >> (12 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 334 (12 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] >> * (0 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 501 5.7.0 (22 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] >> QUIT (0 additional bytes)

Jul 13 10:09:47 garion Mail[1346] <Debug>: [0x60000057a580] << 220 (28 additional bytes)


Interessting are the bold lines. Apple Mail successfully connects to my SMTP server via TLSv1.0. It sends the EHLO and starts AUTH (first bold line). Thre server responds "give my your login name" (second bold line). Mail responds "here it is" (third bold line, 12 Byte BASE64 encoded login name). Then servers asks "ok, now give me your password" (fourth bold line). And Apple Mail respons with 0 bytes, so an empty password.


But the password is correctly set. It's stored in keychain, too.


My first solution was to use Airmail 2 and wait until a solution may be discovered (I upgraded to 10.10.4 when it was released). But up to now, there is no fix...


The problem is clearly Apple Mail, because other clients do not have any problems. Even the local postfix on my MacBook works. I configured the local postfix on my MacBook to forward all e-mails to my SMTP server, using PLAIN authentication. This works without problems.


Currently I configured Apple Mail to send mails through the local postfix (which forwards them to my SMTP server...).


But this can't be the final solution, as Apple Mail should be able to do it, too.


Currently I'm out of ideas... Maybe someone else can help.


Best regards,

Eike Hoffmann

MacBook Pro (Retina, 13-inch, Late 2013), OS X Yosemite (10.10.4), null

Posted on Jul 13, 2015 1:32 AM

Reply
70 replies

Aug 19, 2015 9:20 AM in response to giovi73

I'm trying to decypher your instructions now.


When you added your e-mail address to


<key>CanonicalEmailAddress</key>
<string>e-mail@address.com</string>

does this mean that you authenticate with your address and if I authenticate to my smtp-server with my username for my imap-account, I should insert that there?

Or my adress to that account? Or my main mail address which is just a forward? What is this CanonicalEmailAddress and what's it used for?

Aug 19, 2015 12:11 PM in response to Toke Lahti

I inserted one of my email address: this email address has nothing to do with the SMTP authentication (for the tag CanonicalEmailAddress I mean). So here you must not insert the username of your SMTP server authentication.

The SMTP authentication reference is on the bottom of the code I posted.

When you will use the Mail.app after you changed settings of the .plist file, you will be asked to insert the password for the SMTP server.

Hope it works for you.

Aug 20, 2015 6:36 AM in response to giovi73

Actually, it didn't work.

Maybe sandboxing has something to do with it, but the settings keeps changing back.

Or maybe Mail pulls them from "Internet Accounts", which pulls them from iCloud.

AFAIK, the first thing to make this work, would be take Automatic settings off and for me it stays grayed out and chekcked.


I'm beginning to believe that the problem is how Mail mixes IMAP and SMTP settings, when they have same username & password, but the IMAP settings are pulled from "Internet Accounts" to Mail.


Since I guess removing account does not remove local or on-server mails (I have over 100k), I've wasted enough time with this and try deleting accounts.

Made a backup of Library's Mail folder anyway...


Btw,

I have port number in .plist as "string" and some other differencies than yours. Does this hint that .plist is corrupted and that's why I can't change my settings and Mail pulls them from some unknown backup version?

You didn't have "SecurityLayerType" in your .plist and hence didn't remove it either?



ps. Posting small characters in a binary picture isn't the most readable way...

Aug 20, 2015 7:23 AM in response to Toke Lahti

ATTENTION!

I tried to make a new smtp server entry one more time. Noticed that it worked when I made it, tested with connection doctor.


So, when Mail makes first contact to smtp server, it sends the Login right. After that first time, Mail sends *.


Not sure if the problem is about pulling the right Login from Internet Accounts or from Keychain...

Is smtp settings hidden in somewhere deep in Internet account's .plist or else?


before "new settings":

Aug 20 17:17:52 TokesMacPro31.local Mail[6107] <Debug>: [0x610000376980] >> AUTH (5 additional bytes)

Aug 20 17:17:52 TokesMacPro31.local Mail[6107] <Debug>: [0x610000376980] << 334 (12 additional bytes)

Aug 20 17:17:52 TokesMacPro31.local Mail[6107] <Debug>: [0x610000376980] >> * (0 additional bytes)

Aug 20 17:17:52 TokesMacPro31.local Mail[6107] <Debug>: [0x610000376980] << 501 5.7.0 (22 additional bytes)

Aug 20 17:17:52 TokesMacPro31.local Mail[6107] <Debug>: [0x610000376980] >> QUIT (0 additional bytes)

Aug 20 17:17:53 TokesMacPro31.local Mail[6107] <Debug>: [0x610000376980] << 220 (37 additional bytes)


first time after "new settings":

Aug 20 17:17:54 TokesMacPro31.local Mail[6107] <Debug>: [0x61800037e900] >> AUTH (38 additional bytes)

Aug 20 17:17:54 TokesMacPro31.local Mail[6107] <Debug>: [0x61800037e900] << 235 2.7.0 (25 additional bytes)

Aug 20 17:17:54 TokesMacPro31.local Mail[6107] <Debug>: [0x61800037e900] >> QUIT (0 additional bytes)

Aug 20 17:18:02 TokesMacPro31.local Mail[6107] <Debug>: [0x6000003750c0] << 220 (37 additional bytes)


Now, I'm not sure if there's any point of deleting and adding again all IMAP accounts...

Aug 20, 2015 7:39 AM in response to Toke Lahti

Toke Lahti wrote:


So, when Mail makes first contact to smtp server, it sends the Login right. After that first time, Mail sends *.

After first time meaning closing Mail.

Also Connection Doctor show green light to this authenticated smtp server, IF you haven't chosen it to use with any IMAP accounts. When you select it to be used in some IMAP account and check again with Connecion Doctor the red status light appears.

Funny, you can connect, if you don't use it, but you can't connect, if you need to connect... So, the problem has to do something about IMAP accounts and how Mail handles passwords for different accounts...

Aug 20, 2015 8:38 AM in response to Toke Lahti

I'm sorry if it doesn't work for you. I don't have idea why (I am not so expert in Apple...): I have just found that solution that works for me and I posted it to be helpful to others. Hope that somebody else could help you.


About the small characters in the picture, I did my best as I wanted to be sure to not lose the code formatting and I need colors too (so make it completely understandable): the original image was resized automatically by this platform when I uploaded it. The original version was much larger and readable. I'm sorry for that. However, if you click on the image, it opens largest: did you try it?

Aug 20, 2015 8:39 AM in response to Toke Lahti

Deleting IMAP account seems to have helped. The password in smtp settings now shows black balls like every other password field in osX. Before it went to blank every time after OK.


This is pretty strange, sine when I created the IMAP account again, I inserted same smtp server than before and at the same time my other IMAP accounts are using it. IIRC, in 10.9 there was no smtp settings in Internet Accounts. And you still can't view them from Internet Accounts..

Oct 1, 2015 7:42 AM in response to Toke Lahti

I was also having the same problem with Yosemite. Today, though, I installed El Capitan, and... it appears to be fixed! I have now two accounts, both Gmail Imap, and both using a different SMTP server. I just did the obvious, and created a new SMTP server (I made sure that the option "Automatically detect and maintain settings" was unselected for the SMTP server, as I am suspicious about this), then changed the SMTP server for each of the Gmail accounts to be the new server, and it works as you would hope.


Mail has had a big revamp with El Capitan, all the account data is now in ~/Library/Mail/V3 instead of V2, so hopefully a lot of the weirdnesses have been worked out.

10.10.4 Mail SMTP problem

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