IMAP: Check credentials

Posted . Visible to the public.

Connect to your IMAP server. If you have SSL enabled:

openssl s_client -connect your-server:993

if your server supports STARTTLS:

openssl s_client -starttls imap -connect your-server:143

otherwise use netcat or telnet (you shouldn't do cleartext stuff nowadays...).
You should see something like this:

...
. OK Pre-login capabilities listed, post-login capabilities have more.

To log into IMAP, send the following string (incl. "01"!):

01 LOGIN user@domani.io $password

The server should return something like:

* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR ...
01 OK Logged in

To log out, send QUIT

Thomas Eisenbarth
Last edit
Thomas Eisenbarth
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2016-06-06 09:36)