Cannot figure out how to log in using IMAP4 via Telnet

In an effort to test a larger problem for another user, I am trying to log in to my IMAP4 server running on Exchange Server 2003 via a telnet window connecting to the standard port 143. I do as follows from a cmd window:

>> telnet MyServerIP 143
* OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1 ( ready.
>> ? LOGIN domain/myUsername myPassword
? NO Logon failure: unknown user name or bad password.

What am I doing wrong? All documents I find online say this is out I log in. I have tried all variations of capitalization, with domain, without domain, with fqdn, without, etc. I know my username/password, obviously, but why will it not connect? I have users actually connecting to the IMAP server via their cell phones so I know the server is working, functional, and authenticating somehow, somewhere.
Who is Participating?
alan2938Connect With a Mentor Author Commented:
Ok, fixed it. If the "alias" field under the Exchange General tab different from the username, you have to either change it to be the same or log in with:

LOGIN domain/username/alias password
Use this

>01 login usernamne password
01 OK LOGIN completed.
>02 select INBOX
* 14 EXIST
* FLAGS etc etc....

Here is a longer "how to"

Testing IMAP Using Telnet

That was a lot of text and a lot of concepts to swallow. Its actually pretty easy to do, though. In this project well walk you through checking your IMAP server with Telnet quickly and easily. Youll need to have password authentication enabled on your IMAP server for this to work correctly. Remember to replace your actual information for the italicized items in the example steps. 1. First, telnet into your mail server on port 143.


2. Login to the IMAP server now using your real username and password. Remember to prefix each IMAP command with a unique prefix. Weve used two-digit numbers in the example below, but any unique string will work.

  01 login my-username my-password

3. Make INBOX the active target for the following steps. You can use any mail folder that you know is on your system here, but INBOX is guaranteed to exist by default and is adequate for testing the server.

  02 select INBOX

4. If youve made it this far, you probably have a pretty good indication that IMAP is responding properly (or not, as the case may be). Just for thoroughness, well continue and actually pull a message up. Use the fetch command, followed by a message number, and the specifier rfc822. You dont really have to use the rfc822 flag, but itll make the output much easier to read.

  03 fetch 03
5. Log out when youre finished.

  04 logout
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

alan2938Author Commented:
My problem is that I am getting the error "unknown user name or bad password." when I put in my user/pass that I know works (because I log into my system using it every day). So I cannot get beyond the first step you gave me.
Did you use

01 Login yourusernamne yourpassword

Not just "Login yourusername yourpassword"


alan2938Author Commented:
Yes. I have tried it with that, without that, with mydomain/myusername, without mydomain/, all variations. It doesn't make sense why I can't get it to log in when it obviously works for other users.
Sorry for asking but are you allowed to use IMAP4 with your user?
Take a look under user properties in Exchange and Exchange Features.

Have u tested to create a new user for ex. a "testimap" user and login in?
alan2938Author Commented:
Yes, all permissions are set correctly. I actually am trying to add the user to my Outlook profile as an IMAP4 connection and it keeps coming back asking for the user/pass over and over. I reset the password on the user so I am certain I have the correct information.
Have u looked in the Event Viewer under Security? Do u get Failure Audit, for that user?
alan2938Author Commented:
No, no Failure Audits throughout the entire log. Are there access logs I can view somewhere to see if it is telling me unknown user or password?
alan2938Author Commented:
Ok, so I narrowed it down. User accounts that are the same as their email addresses can log in and work fine. Those which are different do not.

For example, I created a test user called "same" with password 1234 and email address If I try to log in to IMAP by typing:
01 LOGIN same 1234  ... it works.

I created another test user called "different" with password 1234 and email address If I try to log in to IMAP by typing:
01 LOGIN different 1234  ... I got "unknown user name or bad password". If I try:
01 LOGIN testing 1234 ... I got "NO The specified directory service attribute or value does not exist."

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.