Commands Valid in the Non-authenticated State

AUTHENTICATE

The AUTHENTICATE command authenticates the user to the server using the specified SASL authentication mechanism.

Usage

AUTHENTICATE mechanism

Arguments

The authentication mechanism to use

Untagged server responses

Optional server challenge (the server sends the untagged response + and the client replies with a BASE64 encoded response that is specific to the specified authentication mechanism).

Results

OK (successful authentication)
NO (authentication failed)
BAD (command unknown or invalid arguments)

Example

A00004 authenticate anonymous
+
 
A00004 OK Completed

LOGIN

The LOGIN command authenticates the user to the server using the plaintext password.

Usage

LOGIN username password

Arguments

Username and password

Untagged server responses

None

Results

OK (successful login)
NO (login failed)
BAD (command unknown or invalid arguments)

Example

A00005 LOGIN JOHNDOE "XXXXXXXX"
A00005 NO LOGIN failed
A00006 LOGIN JOHNDOE "YYYYYYYY"
A00006 OK Completed

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.