Microsoft Exchange and Blackberry Server Specialists

IMAP Telnet Test

A Telnet test can verify if your IMAP server is working correctly and allowing logins. The major drawback is that everything is in plain text, and the password can be seen, so ensure that you use a new command prompt window and close it afterwards. It is not possible to test a secure IMAP session with Telnet.

To test your server, open a command prompt and then follow these instructions.
If you make a mistake, you cannot use backspace or delete, you will have to press enter. You will then get an error. All commands start with a ?

  1. Type the following:

    telnet 143

    where is the internal IP address of your Exchange server. You can also use the server's name.
    If testing from outside your network, to verify the port is open, use either the external IP address or the host name.

    You will get a response back similar to this:

    * OK The Microsoft Exchange IMAP4 service is ready.

  2. Next, you need to login. The login format for IMAP is specific. It needs to be Windows Domain/Windows User Name/Alias.
    In many cases the account and alias are the same. Therefore they have to be entered twice:

    ? LOGIN DOMAIN/User.Name/User.Alias Password123

    where domain is the WINDOWS domain, User.Name is the Windows Username, User.Alias is the Alias and Password123 is the account password.

    Press Enter and you will get a response back similar to this:

    +OK LOGIN completed

  3. To ensure everything is working, you can view the list of folders. Enter the following command exactly as shown:

    ? LIST "" "*"

    That is two " followed by a space, followed by another ", then a * then another ". Press enter.

    You will get a response like this:

    * LIST (\HasNoChildren) "/" Calendar
    * LIST (\HasNoChildren) "/" Contacts
    * LIST (\HasNoChildren) "/" "Deleted Items"
    * LIST (\HasNoChildren) "/" Drafts
    * LIST (\Marked \HasNoChildren) "/" INBOX
    * LIST (\HasNoChildren) "/" Journal
    * LIST (\HasNoChildren) "/" "Junk E-Mail"
    * LIST (\HasNoChildren) "/" Notes
    * LIST (\HasNoChildren) "/" Outbox
    * LIST (\HasNoChildren) "/" "Sent Items"
    * LIST (\HasNoChildren) "/" Tasks
    ? OK LIST completed.

  4. You can then choose a folder to view its contents.

    ? Select Inbox

    After pressing enter, you will get a response like this:

    * 1 EXISTS
    * 0 RECENT
    * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
    * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
    * OK [UNSEEN 1] Is the first unseen message
    * OK [UIDNEXT 3] The next unique identifier value
    ? OK [READ-WRITE] SELECT completed.

    This indicates that there is 1 unread message in the mailbox.

  5. If you want to read the message, then you need to Fetch it:

    ? FETCH 1 body[header]

    Where 1 is the message number that you want see.
    The first response will be the headers which should be familiar to you:

    MIME-Version: 1.0
    Received: from (123.456.789.00) by ( with Microsoft SMTP Server id; Tue, 16 Aug 2011 13:52:34 +0100
    Received: from ([123.456.789.00]) by over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 16 Aug 2011 13:52:34 +0100
    Received: from ([fe80::3054:b4c0:c2d7:776b]) by ([fe80::3054:b4c0:c2d7:776b%13]) with mapi id 14.01.0289.001; Tue, 16 Aug 2011 13:52:34 +0100
    From: Simon Butler <>
    To: "" <>
    Subject: Test 13.52
    Thread-Topic: Test 13.52
    Thread-Index: AcxcE11uErm/tlfNRLuNBNs9gS57oQ==
    Date: Tue, 16 Aug 2011 12:52:33 +0000
    Message-ID: <>
    Accept-Language: en-GB, en-US
    Content-Language: en-US
    x-originating-ip: []
    Content-Type: multipart/alternative;
    X-OriginalArrivalTime: 16 Aug 2011 12:52:34.0274 (UTC) FILETIME=[5E46E420:01CC5C13]

    FLAGS (\Seen))
    ? OK FETCH completed.

    If you want to see the body text then you will need to send this command:

    ? FETCH 1 Body[text]


  6. When you are finished, log out:

    ? LOGOUT