I have run into a very odd issue with Mac's Mail application on Mojave. I friend of mine brought their laptop to me to take a look at because their Yahoo kept giving a timeout error on the 'imap.mail.yahoo.com' server for all ports.
I have attempted various different solution walkthroughs with no luck. Yahoo will let me log in but will never download any of the emails and will eventually timeout with an IMAP connection error. Gmail will log me in, show the emails, and after about 3 minutes then IMAP servers timeout. I have checked the Connection Doctor which always states that the IMAP and STMP are always down for every email client (even though Gmail will allow for a login). The Connection Doctor states to check the internet connection, SSL/TLS, along with IMAP/STMP which I have tried with no luck.
I attempted to remove the email account, restart, and re-add it which didn't solve the problem. So I attempted to delete all email accounts, remove the files listed here which still didn't solve the problem. So, I looked up how to factory reset the Mail application here, which didn't fix the problem either.
I have tried changing the password which hasn't worked, I attempted to manually add the IMAP/STMP through the 'Other' account addition option, and I have even turned off the Firewall in an attempt to see if the ports were blocked for some reason. I have also logged the accounts in successfully into another Mac's Mail application, so I know the email accounts are fine. From what I can tell, the problem only exists in the Mail application on this Mac, but I don't know how to proceed forward now. Should I just tell them that they need to wipe the hard drive and re-load Mojave?