Testing Your Server

You’ve configured your server, in time to just tell everyone it’s in production and leave on your vacation for the Bahamas. On second thought, maybe it would be a good idea to test it first.

Check That the Server Is Running

Most simple test first. Let’s check to see if the IMAP listen is being serviced on the right port and if the Cyrus server is on the other end of that listen. As a normal (i.e., non-administrative) user, telnet to the IMAP port on your machine:

%telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK localhost Cyrus IMAP4 v1.5.19 server ready
. logout
* BYE LOGOUT received
. OK Completed
Connection closed by foreign host.

The command . logout closes the connection. If you see a message that begins with . OK, then the server is running. Any other message, or no message at all, indicates a problem.

Testing Cleartext Password Authentication

If you use cleartext password authentication, take advantage of the imtest program to test authentication.[36] Run the imtest program as user cyrus or another existing IMAP account on your system (at this point you probably have not created user accounts yet and have only the cyrus account). The following example is run from the cyrus account:

%/usr/local/bin/imtest –p localhost imap
* OK localhost Cyrus IMAP4 v1.5.19 server ready
Password:
. LOGIN cyrus {L+}
X
. OK User logged in
. logout

The reply message . OK User logged in indicates that authentication is working. ...

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.