Error connecting to IMAP server: localhost

hi,

i’m on Linux dedicated box -DirectAdmin panel

I use Squirrelmail to se my e-mail. When i try to log inn and read mail i get this message: Error connecting to IMAP server: localhost. Where can i change this…

Squirrelmail

SquirrelMail version 1.4.17
By the SquirrelMail Project Team
ERROR
Error connecting to IMAP server: localhost.
111 : Connection refused

webmail

ERROR (2): fsockopen() [function.fsockopen]: unable to connect to localhost:110 (Connection refused) (/var/www/html/webmail/inc/class.uebimiau_mail.php:80)

RoundCube Webmail

Connection to Imap server failed

Read on another forum, that this can solve the problem

/etc/rc.d/init.d/imaps restart
/etc/rc.d/init.d/imap restart

Output

-bash: /etc/rc.d/init.d/imaps: No such file or directory

-bash: /etc/rc.d/init.d/imap: No such file or directory

try

telnet localhost 143 for imap or 993 for imap over ssl

Output

Usage: telnet [-8] [-E] [-K] [-L] [-X atype] [-a] [-d] [-e char] [-k realm]
[-l user] [-f/-F] [-n tracefile] [-r] [-x] [host-name [port]]

Also Xinetd restart don’t help

[root@server etc]# /etc/rc.d/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]

Looks like that Imap isn’t installed ?
Correct me if i’m wrong ?

=====
Don’t know does it makes sense or no, but in Directadmin’s System Information is such line

dovecot 1.1.7 *** Stopped ***

service dovecot start
Starting dovecot: Fatal: listen(0.0.0.0, 995) failed: Address already in use
[FAILED]

Also try to check what is on 995 port

lsof -i :995

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
rpc.statd 2085 root 7u IPv4 5775 TCP *:pop3s (LISTEN)

what else can i do ? how to fix
any advice will be appreciated

Hello,

webmail

Quote:
ERROR (2): fsockopen() [function.fsockopen]: unable to connect to localhost:110 (Connection refused) (/var/www/html/webmail/inc/class uebimiau_mail php:80)

Seems that not just IMAP but even a POP connection couldn’t be established to your server and these need to be started or check whether there is any issue with the firewall.

Quote:
telnet localhost 143 for imap or 993 for imap over ssl
Output

Quote:
Usage: telnet [-8] [-E] [-K] [-L] [-X atype] [-a] [-d] [-e char] [-k realm]
[-l user] [-f/-F] [-n tracefile] [-r] [-x] [host-name [port]]

The suggested command should be valid. Could you try it again and see the result. I will also add a few others to it. Just try the following commands one-by-one:

From within the server


telnet localhost 110
telnet localhost 143
telnet localhost 993
telnet localhost 995

From some other system(Reaplacing IP with your server’s IP address)


telnet IP 110
telnet IP 143
telnet IP 993
telnet IP 995

These commands check whether IMAP and POP are accepting any connections or not.

Without going into any details, the main idea of what you need to do is this. First figure out what email client services you are running, what program specifically. Not knowing what version of Linux you have installed, I can not guess what the default program is that handles IMAP which you need for webmail. If you let us know what distribution and version of Linux you are running, we can help you with the specifics of how to find out.