I updated to 10.9.5 last night and all 3 of my mailboxes (including iCloud) can't connect. This happens for both IMAP and SMTP, both SSL and non-SSL. "Connection doctor" just shows several connections attempt but nothing else:
INITIATING CONNECTION Sep 21 10:23:03.139 host

01-imap.mail.me.com -- port:993 -- socket:0x0 -- thread:0x600000c67b80
INITIATING CONNECTION Sep 21 10:23:12.976 host

01-imap.mail.me.com -- port:993 -- socket:0x0 -- thread:0x6180002646c0
INITIATING CONNECTION Sep 21 10:23:13.001 host

01-imap.mail.me.com -- port:993 -- socket:0x0 -- thread:0x61800027fac0
INITIATING CONNECTION Sep 21 10:23:13.019 host

01-imap.mail.me.com -- port:993 -- socket:0x0 -- thread:0x6180002646c0
INITIATING CONNECTION Sep 21 10:23:13.044 host

01-imap.mail.me.com -- port:993 -- socket:0x0 -- thread:0x61800027fac0
Odd... and annoying.