Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: IMAP not working. Can't connect to 143  (Read 4263 times)

0 Members and 1 Guest are viewing this topic.

rohitj

  • Guest
IMAP not working. Can't connect to 143
« on: October 26, 2013, 03:58:52 pm »
IMAP not working. Can't connect to 143


1) Make sure /usr/sbin/imapd exists and is executeable.  You should be able to run it and see:
[root@user sbin]# /usr/sbin/imapd
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN]
server.hostname.com IMAP4rev1 2003.339 at Thu, 13 May 2004 12:34:14 -0600 (MDT)



2) make sure xinetd is running (inetd on FreeBSD)
[root@user sbin]# ps -ax | grep inetd | grep -v grep

On newer redhat/fedora/centos machines, you can install it with:
yum -y install xinetd
/sbin/service xinetd start
/sbin/chkconfig xinetd on



3) Make sure xinetd has the proper settings:
RedHat: /etc/xinetd.d/imap
# default: on
# description: imapd
service imap
{
     disable = no
     socket_type   = stream
     wait      = no
     user      = root
     server       = /usr/sbin/imapd
     log_on_success       += DURATION USERID
     log_on_failure       += USERID
     nice      = 10
}


FreeBSD: /etc/inetd.conf
imap4   stream  tcp     nowait  root    /usr/sbin/imapd                 imapd

Note that the /etc/inetd.conf will contain many other lines.  Just make sure that this one exists somewhere.

To test it out, run:
[root@user]# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN]
localhost IMAP4rev1 2003.339 at Thu, 13 May 2004 12:39:55 -0600 (MDT)



4) You can also double check that the imapd binary is the one we included by running:
rm -f /usr/sbin/imapd
cd /usr/local/directadmin/scripts
./imapd.sh



5) check your /etc/hosts file.  Make sure you have one line that contains
127.0.0.1     localhost.localdomain localhost

6) If you can connect via localhost and not from outside the server, check your firewall settings to make sure port 143 is open.