Can't connect to IMAP server (Apple bug)

dieter's Avatar


12 May, 2016 09:57 PM

I sometimes run into an issue where can not connect to my IMAP sever (

I had this a couple of times now and it usually resolved itself on the next day or after a reboot. Today I had it again, and after an hour and several restarts of the, the issue persisted. After removing the GPGMail.mailbundle, and restarting it was able to connect and fetch new mails instantly. As a was able to connect to the mailserver from other devices on my network, I can practically rule out any service disruption from my mail provider or a network issue.

So I think it could be a GPGMail problem. Is it possible that GPGMail can cause this issue?

  1. Support Staff 1 Posted by Steve on 13 May, 2016 09:10 AM

    Steve's Avatar

    Hi dieter,

    that's hard to tell. There are a few things you could check to get closer to the root cause of this issue.

    1. Compare your mail account setup between your devices. Are they all using identical settings? Are the ports used identical (Mail > Accounts > Select account > Advanced)?

    2. When this issue happens again, temporarily disable GPGMail (as you already did), then re-add it and switch forth and back. Does your observation remain the same?


  2. 2 Posted by dieter on 13 May, 2016 09:26 AM

    dieter's Avatar

    Hi Steve,

    1.: Yes, they are identical

    2.: I did that yesterday after filing the issue here. Adding it back didn't result in the same problem again.

  3. Support Staff 3 Posted by Steve on 13 May, 2016 09:28 AM

    Steve's Avatar

    Great, well or not. It shows how hard this stuff is to debug. When this happens again, make sure to take exact note of the date and time and maybe also get in touch with posteo.

    Let's keep this one open, you observe this further and keep us posted how this evolves.

  4. 4 Posted by dieter on 13 May, 2016 09:34 AM

    dieter's Avatar

    I really don't think it was posteo's issue. As I already said, I was able to connect via IMAP from other devices. I also was able to log into the webmail interface from my Mac while couldn't connect.

    As I had an open radar with Apple about the problem (when I didn't make the connection to GPGMail), they gave me instructions to gather a sysdiagnose targeting Mail with sudo sysdiagnose -f ~/Desktop/ Mail.

    I generated the sysdiagnose while having the issue yesterday. Would the sysdiagnose be of any help to you too? If so, I'm happy to provide it to you privately.

  5. Support Staff 5 Posted by Steve on 13 May, 2016 09:40 AM

    Steve's Avatar

    Currently I don't see how GPGMail would even be able to tampler or influence the IMAP connection. So let's just wait, what apple has to say. It's not as if was a bug free software. But happy to stay posted on this.

  6. 6 Posted by dieter on 13 May, 2016 09:42 AM

    dieter's Avatar

    Currently I don't see how GPGMail would even be able to tampler or influence the IMAP connection.

    Yeah, same here. That's why I was really surprised when removing GPGMail made the issue go away.

    I'll keep you posted on what they say.

  7. 7 Posted by David Mery on 04 Jun, 2016 10:23 PM

    David Mery's Avatar

    I've had the same behaviour happen and have not managed to narrow down the cause. When it happens it, it affects only IMAP. Using Connection Doctor, all the IMAP connections fail while the SMTP ones (even to the same mail server) and Exchange ones are fine. Also as for the OP IMAP works from other devices on the same network to the same mailboxes.

    When it happens, it usually goes away after several minutes without any intervention. It hasn't happened for me for several days now, but it comes and go.

    I looked at all the mail logs I could find and didn't not notice anything that alerted me to the issue. Searching for this issue brings many conversations about issues with SMTP and El Capitan, but apart from a couple of other mentions nothing about this IMAP specific issue and no solution.
    It seems to be related to some connection attempt taking too long. At the time it was frequent (a month ago) I got in touch with my ISP and here's what they noted in their log at the time it happened (anonymised):

    May 4 19:13:02 dovecot: imap-login: Disconnected (no
    auth attempts in 60 secs): user=<>,,, TLS
    handshaking: Disconnected, session=

    And their comment: 'When the 'user=' field is left blank it means a connection attempt was made with no username. Are any of your devices attempting to connect without a username?' The account configuration was correct, with a username.

    Also it happens on several IMAP ports.

    I didn't think of trying uninstalling GPG Mail when it happened so do not know if it would have helped and hence points it as likely cause. Rebooting the machine usually fixed it for a while.

    Hopefully if it is related to GPG Mail, these additional unfortunately rather vague details may help someone narrow down the issue and identify it.

  8. Support Staff 8 Posted by Steve on 05 Jun, 2016 11:11 AM

    Steve's Avatar

    Hey David,

    for my personal accounts lately I have seen IMAP timeouts with one email service I use as well. They seem to come and go. I could not determine any pattern. The email service provider checked their backend and said everything was fine. I still don't believe this is related to GPGMail. It would be great if you could keep observing this. When you run into the problem, temporarily disable mail by removing the mailbundle file from the bundles folder and see if that changes anything (close mail first, remove bundle, restart mail).

    I tried that here as well without any specific findings. Removed the bundle, issues were gone. Re-added bundle, IMAP issues were still gone. Removed bundle again, issues re-appeared. Another indicator that it's not GPGMail that's the bad boy in this case. Maybe a bug in Maybe the providers are at fault?

  9. 9 Posted by David Mery on 05 Jun, 2016 11:59 AM

    David Mery's Avatar


    I have seen IMAP timeouts with one email service I use as well

    When it happens, none of my IMAP accounts work on my Mac. It's only IMAP, but all of the IMAP accounts.

    Maybe the providers are at fault?

    That is unlikely as the same IMAP accounts on the same network at the same time work fine from another device, so the issue does seem to be localised to the Mac, whether in GPGMail,, or somewhere else in El Capitan (Wifi connectivity?).

    I'll try to observe and if I see this issue happening, follow your request and report back.

  10. 10 Posted by David Mery on 05 Jun, 2016 12:23 PM

    David Mery's Avatar

    It just happened! Confirmed it with Connection Doctor.


    Moved the GPGMail bundle out.


    Check with Connection Doctor and IMAP accounts are still 'Connecting to the server...'

    So that would seem to confirm the problem is not with GPGMail.

  11. Support Staff 11 Posted by Steve on 05 Jun, 2016 12:30 PM

    Steve's Avatar

    Yup. This is pretty annoying to debug. Do you happen to have an apple developer account? If so raising this as a bug in their radar system could be helpful. If no developer account exists for you, please raise this a) on their discussions page and b) on their feedback page.

    They do read the feedback. They are not directly involved in the discussions.

    Either way, we'd be happy to hear where this goes. So feel free to report any new findings to this discussion.


  12. 12 Posted by David Mery on 05 Jun, 2016 02:28 PM

    David Mery's Avatar

    Done. Filed as bug 26641634 in Apple's Bug Reporter.

  13. 13 Posted by dieter on 05 Jun, 2016 08:56 PM

    dieter's Avatar

    For reference, my Apple bug id is 23611829.

  14. Support Staff 14 Posted by Steve on 09 Jun, 2016 12:14 PM

    Steve's Avatar

    Great, please keep us posted as to what they respond.

    An option to make apple bugs visible to others is the OpenRadar system:

    I've not personally used that, but I think the idea is to duplicate your report there so it can be found publicly.

  15. Steve closed this discussion on 13 Aug, 2016 11:55 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac