Folks,
I just wanted to chime in and say THANK YOU to Ernie! I work for a very large company in the Middle East with a VERY, very robust firewall. Suddenly last Fall my Mail program stopped working on my G5 and MacBook Pro, but was OK with my iPod Touch and my laptop worked anytime I was outside of the firewall. I even pinged the ports to make sure they weren't blocked (using Terminal). Since September, 2008 until today, I could not solve the issue. Then I read this thread, saw the comment about the SOCKS Proxy. I "unticked" the SOCKS proxy box and like MAGIC, Mail is working perfectly again.
Our IT group certainly blocks a myriad of URL's, but my experience backs up the previous comment about leaving the email ports open.
Good luck..and thanks again!
Bob