You may try connecting to your mail server from command prompt and see if it works. There are couple of ways to try and see at which point it is stucking.
1) Ping yourserveraddress.com
2) Check wheather your mail server DNS record is Okay you can check it by doing nslookup as
nslookup -type=mx yourserver.com
3) If above both tests are okay then try connecting through telnet command as given in
Here.
These might be hectic set of commands so you might want to stick on the top 2 suggestions. Good luck.