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 ?
- Type the following:
telnet 192.168.1.120 143
where 192.168.1.120 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.
- 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
- 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.
- 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 [UIDVALIDITY 1294] UIDVALIDITY value
* OK [UIDNEXT 3] The next unique identifier value
? OK [READ-WRITE] SELECT completed.This indicates that there is 1 unread message in the mailbox.
- 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 smtp.example.net (123.456.789.00) by remote.example.com (192.168.1.2) with Microsoft SMTP Server id 14.1.289.1; Tue, 16 Aug 2011 13:52:34 +0100
Received: from mail.example.net ([123.456.789.00]) by smtp.example.net over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 16 Aug 2011 13:52:34 +0100
Received: from SERVER-3.example.co.uk ([fe80::3054:b4c0:c2d7:776b]) by SERVER-3.example.co.uk ([fe80::3054:b4c0:c2d7:776b%13]) with mapi id 14.01.0289.001; Tue, 16 Aug 2011 13:52:34 +0100
From: Simon Butler <simon@example.co.uk>
To: "test.user@example.com" <test.user@example.com>
Subject: Test 13.52
Thread-Topic: Test 13.52
Thread-Index: AcxcE11uErm/tlfNRLuNBNs9gS57oQ==
Date: Tue, 16 Aug 2011 12:52:33 +0000
Message-ID: <5716673DBD8A2B42BCA0DAC73CF31A5A2785A1A1@SMB-3.example.co.uk>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [192.168.33.101]
Content-Type: multipart/alternative;
boundary="_000_5716673DBD8A2B42BCA0DAC73CF31A5A2785A1A1server3examplecouk_"
Return-Path: simon@example.co.uk
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]
- When you are finished, log out:
? LOGOUT