Link to home
Start Free TrialLog in
Avatar of alan2938
alan2938

asked on

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 (servername.domain.fullyQualifiedDomain.com) 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.
Avatar of Waleij
Waleij
Flag of Sweden image

Use this

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

/Waleij
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.

   telnet my-mail-server.my-domain.com

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
Avatar of alan2938
alan2938

ASKER

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"

/Waleij

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?
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?
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?
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 same@mydomain.com. 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 testing@mydomain.com. 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."

Ideas?
ASKER CERTIFIED SOLUTION
Avatar of alan2938
alan2938

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial