This discussion is getting pretty far off topic, huh?
Despite scan300's confident response, the latest router firmware doesn't fix the issue for many (most?) of us. Furthermore, router firmware wouldn't explain why only some accounts fail upon waking from sleep while others do not. This is a strange issue, but one that is clearly one related to Mail.app and OSX, and not third-party conflicts (since some of us have tried clean installs with all Mac hardware and still had the issue arise).
Only having this problem intermittently now but not noticed any pattern. Quitting and restarting Mail, which takes all of 2 seconds, works round it but is a minor irritation. I wondered if the newer Macs can wake up, re-initialise the wireless connection and then start making connections to the internet very quickly, perhaps before the router has fully registered that the wireless client is alive, so maybe the first request fails. Or it could be that some routers are slower to respond, and that OS X tries to make the connection to the internet before it is itself completely ready. Given the parallel processing capabilities of our newer Macs it seems highly likely that the processes involved in initialising the network stack won't run in a sequential manner. Anyway for connections to IMAP servers the problem is maybe then that OS X then gives up on the connection, instead of trying again, which is maybe what it does for POP connections, or maybe for POP connections OS X checks that everything is in place and ready before trying. I did manage to get a browser (not sure if it was Safari) to report "not connected to the internet" when I tried to access a page immediately after waking, but on 2nd attempt to access the page it worked OK. That did suggest that something wasn't ready the first time. If Apple themselves are running on enterprise wireless networking hardware they might never encounter the specific problem. This is all pure conjecture BTW . I also remember seeing a post on a related topic here somewhere about IPv6 settings interfering with something, but have not got round to investigating that further.
Checked my Verizon DSL router firmwaere version it's up to date.
Actiontec GT784WNV v.1.1.6
I too believe it's router related as when I'm logged into 'other' peoples wireless networks (friends/relatives) everything works fine.
I problem is where I live this dosen't work, and no one knows how to fix it...
I had same connection problems described by most of you. Non of the above suggested things worked for me.
Suddenly realised it started to appear after I had had entered a scheduled "go to sleep" in the system preferences. Switched scheduled sleep off, re-stared my iMac (2010 with 10.8.2) and both the problems were gone AND I noticed also mail becoming much quicker.
To me its a bug but I can live without the scheduled sleep for the moment. Hope this helps for a few of you too.
I found something worth trying. I've had this problem since I upgraded to Mountain Lion from Snow Leopard. The simple, zero-skill SMC Reset here (basically shutting down, unplugging, waiting 15 secs, restarting) seems to have solved the problem, at least for today since this morning. Skip down to "Resetting the System Management Controller (SMC)": http://support.apple.com/kb/HT3964
I'm probably jinxing myself by saying it's solved... but working so far. Previously, I double checked the ports and settings, then called Apple Tech Support and following their instructions, I have done the following — without any success: deleted the Mail account causing the most problems (Gmail IMAP, but Comcast POP was trouble too sometimes) and readded it; and fully reinstalled Mountain Lion. No improvement. And that was as far as I got with a Mail app specialist at Apple Tech support. Found this SMC Reset tip here: https://discussions.apple.com/thread/4157008?start=15&tstart=0
Hope that helps someone.
Nope, none of the 'fixes' posted thus far have made any difference for me but thanks for all the tips anyway.
After weeks and months of trying everyting under the sun I'm more or less convinced that this problem must relate to networking. Some time ago I upgraded to an iiNet Bob2 modem/router and at that time began connecting wirelessly to it rather than via ethernet as I always had in the past. To complicate matters, that was about the same time as Mountain Lion was released and installed. Shortly afterwards I became aware of this very annoying problem.
Will a fix be found. Hopefully. Will Apple provide a fix. Probably if it can be narrowed down to being a Mountain Lion (read Apple) problem. Probably not if it is due to a problem caused by third party software ot hardware.
As a test I intend to reinstal my old (Belkin N1 Vision) modem/router and test it out using a wireless connection (not ethernet as before). I will post my test results.
I realized I changed one more thing before I found success today. I changed my DNS server settings to these (which were recommended by an Apple support tech for another network problem I was having):
When I switched back to the default DNS, ( 192.168.2.1 ), and let my Mac go to sleep and then wake up, I had the dreaded !-in-a-triangle symbols again.
Just now I changed the DNS servers and applied them, and the dead mailboxes came alive instantly. Try the 208 servers above.
Bummer. Still working well for me. I did restart too to make sure everything was reset. I'm using a Ethernet connection, IPv4 set to Using DHCP. Older Belkin F5D8236-4 v3 router. The only other thing I can think I've done was make sure my Mac's clock/time settings matched my router's clock/time, using the router's setup IP address. They were mismatched by default. I read somewhere that that helped someone with a similar problem. Good luck. This annoyed the **** out of me.
OK, the Belkin Modem/Router was 'better' in that I didn't always get the dreaded triangle after sleep but I did get another warning which looked like a lighting bolt on it's side, when clicked it gave the option to take accounts online which usually worked.
The thing is that I prefer to iiNet Bob2 modem/router because it has an inbuilt phone which I have setup as VoIP (it's the best quality VoIp I've had in many a day).
So back to the drawing board, thanks for the help.
Oh, I did a clock reset as well....
Apple Tech support just called to see how my Mail app was doing after reinstalling Mountain Lion. (Didn't help.) I told him about my fix. Dude said he thought I'd already tried changing the DNS, because my case history had me changing my DNS servers. However, that was when I had Snow Leopard, and I didn't change the DNS settings after the upgrade to ML.
Anyway, Lamont, tech support guy asked which DNS servers I was using and he said, "Oh I would have recommended 220.127.116.11 and 18.104.22.168." So maybe try those.
Changed the DNS, still no joy...Two questions - I've been changing these numbers in the Modem/Router. I notice in System Preferences/Network/Advanced there is a DNS Tab. Mine shows 10.1.1.1 which is the URL I use to login to the device. Should I change that setting to the new numbers as well? Secondly I notice when I wake the computer after sleep that the Dropbox icon in the menu bar is often greyed out, it springs back if I move a file in or out - assuming you use dropbox, have you noticed this?