it would seem that you do not have an imap daemon listening on the 
standard port or the port is being blocked

do an ls -ax | grep imap to see what imap daemons are running

you can also do a chkconfig --list | grep imap to see if xinetd is loading 
it or not

> Maybe this is an IMAP issue?
what you say below proved for the most part

> I can't connect to the server throuogh another mail client or telnet either.

again i would say that imap is not running

make sure you start imapd (use chkconfig) and try again

 -munir