2

How do I find out what IMAP server (if any) is running on a CentOS server?

2 Answers 2

8

telnet <servername> imap and/or telnet <servername> imaps. If you get answers then you have IMAP from the Internet. You can also look if it is available only on your server by telnet localhost imap and/or telnet localhost imaps.

Alternatively you could check if netstat -a | fgrep imap returns a line with LISTEN in it. Then the IMAP server is up and running.

1
  • 2
    Just for completeness: IMAP is port 143 and IMAPS port 993. And if for some weird reason your machine does not have telnet installed by default it may have nc (netcat) which you can use instead.
    – adamo
    Oct 3, 2011 at 9:38
4

If your host is running imap it will most likely be listening on ports 143 or 993. netstat -p will tell you which process is listening on what port so if you want to find out which imap server you are running try this:

 # netstat -apnn | grep LISTEN | egrep '993|143'
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1777/dovecot    
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1777/dovecot 

In my case I am running dovecot.

1
  • You can use -l option instead of grep LISTEN.
    – quanta
    Oct 3, 2011 at 10:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .