Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 31137
  • Last Modified:

Exchange 2013 IMAP - authentication fails

I'm running Exchange 2013 with Cumulative Update 1 installed, on Windows Server 2012 standard.


I've started the IMAP services, and have used the Powershell command "Set-ImapSettings -LoginType 1" (as per http://technet.microsoft.com/en-us/library/aa998252(v=exchg.150).aspx) to allow plain text authentication on port 143.  After changing this setting, I restarted both IMAP services.


I've tried Thunderbird and Opera Mail as IMAP clients, as well trying telnet to port 143 in the hope of getting more information on why the failure occurs.  The error returned is "NO LOGIN failed".


I've experimented with different IMAP authentication types at the server end, restarting the IMAP services after each change.  But I've never successfully made an IMAP connection using any combination of authentication types.


I've tried various things for the login string, as per http://blogs.technet.com/b/exchange/archive/2004/03/31/105275.aspx.  For example, I've tried domain/username, and domain/username/alias, and various combinations involving the UPN name.  I've tried backslashes instead of forward slashes.  I'm confident that the password I'm using is correct.


I enabled IMAP protocol logging, and got the following:


2013-06-20T09:18:56.173Z,00000000000000E4,0,10.0.0.253:143,10.0.0.253:59175,,1,0,53,OpenSession,,
2013-06-20T09:18:56.173Z,00000000000000E4,1,10.0.0.253:143,10.0.0.253:59175,,1,12,119,capability,,R=ok
2013-06-20T09:18:56.191Z,00000000000000E4,2,10.0.0.253:143,10.0.0.253:59175,,6,31,30,authenticate,plain,"R=""2 NO AUTHENTICATE failed."";Msg=AuthFailed:WellKnownAccount"
2013-06-20T09:18:56.191Z,00000000000000E4,3,10.0.0.253:143,10.0.0.253:59175,,5,39,20,login,domain\administrator *****,"R=""4 NO LOGIN failed."";Msg=LogonFailed:WellKnownAccount"
2013-06-20T09:18:56.191Z,00000000000000E4,4,10.0.0.253:143,10.0.0.253:59175,,0,0,0,CloseSession,,
2013-06-20T09:18:56.191Z,00000000000000E5,0,10.0.0.253:143,10.0.0.253:59176,,1,0,53,OpenSession,,
2013-06-20T09:18:56.206Z,00000000000000E5,1,10.0.0.253:143,10.0.0.253:59176,,1,12,119,capability,,R=ok
2013-06-20T09:18:56.206Z,00000000000000E5,2,10.0.0.253:143,10.0.0.253:59176,,1,31,30,authenticate,plain,"R=""2 NO AUTHENTICATE failed."";Msg=""AuthFailed:LogonDenied,User: administrator@dnsdomain.com"""
2013-06-20T09:18:56.206Z,00000000000000E5,3,10.0.0.253:143,10.0.0.253:59176,,1,55,20,login,administrator@dnsdomain.com *****,"R=""4 NO LOGIN failed."";Msg=LogonFailed:LoginDenied"
2013-06-20T09:18:56.221Z,00000000000000E5,4,10.0.0.253:143,10.0.0.253:59176,,0,0,0,CloseSession,,



I've tried "test-imapconnectivity -mailboxcredential:(get-credential domain\administrator) | fl", and got the following:


RunspaceId                  : ecef0b6b-183e-4211-929d-e046af7c062f
LocalSite                   : Default-First-Site-Name
SecureAccess                : False
VirtualDirectoryName        :
Url                         :
UrlType                     : Unknown
Port                        : 993
ConnectionType              : Ssl
ClientAccessServerShortName : Server
LocalSiteShortName          : Default-First-Site-Name
ClientAccessServer          : Server.domain.local
Scenario                    : Test IMAP4 Connectivity
ScenarioDescription         : Connect to server using IMAP4 protocol, search for the test message, and delete it along
                              with any messages that are older than 24 hours.
PerformanceCounterName      : ImapConnectivity-Latency
Result                      : Failure
Error                       : IMAP Error: aYKG NO LOGIN failed.

UserName                    : administrator
StartTime                   : 20/06/2013 10:30:59
Latency                     : 00:00:00.0368441
EventType                   : Error
LatencyInMillisecondsString :
Identity                    :
IsValid                     : True
ObjectState                 : New



So now I'm stumped.  I really need this to work because I am performing a server migration from a legacy Linux mail server at the weekend.  I can connect via IMAP to the Linux server with no problems.  But Exchange IMAP has resisted all my efforts, so far.


Help!!
0
wakatashi1
Asked:
wakatashi1
  • 6
  • 3
  • 3
1 Solution
 
Haresh NikumbhSr. Tech leadCommented:
run this tool and check if you get any other info for IMAP

https://www.testexchangeconnectivity.com/
0
 
wakatashi1Author Commented:
Good idea.  I tried both "domain\user" and "user@domain.com" forms of credentials, but both failed:

There was an error testing the IMAP service 
  
 Additional Details 
  S: * OK The Microsoft Exchange IMAP4 service is ready.
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN STARTTLS UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
C: 2 LOGIN administrator <password>
S: 2 NO LOGIN failed.
C: 3 LIST "" *
S: 3 BAD Command received in Invalid state.

Microsoft.Exchange.Tools.ExRca.Tests.ImapPop.MailProtocolException: 3 BAD Command received in Invalid state.
 at Microsoft.Exchange.Tools.ExRca.Tests.ImapPop.ImapProtocolTester.SendCommand(String command, String logString)
 at Microsoft.Exchange.Tools.ExRca.Tests.ImapPop.BaseProtocolTest.PerformTestReally() 

Open in new window


...and...

  There was an error testing the IMAP service 
  
 Additional Details 
  S: * OK The Microsoft Exchange IMAP4 service is ready.
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN STARTTLS UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
C: 2 LOGIN administrator@domain.local <password>
S: 2 NO LOGIN failed.
C: 3 LIST "" *
S: 3 BAD Command received in Invalid state.

Microsoft.Exchange.Tools.ExRca.Tests.ImapPop.MailProtocolException: 3 BAD Command received in Invalid state.
 at Microsoft.Exchange.Tools.ExRca.Tests.ImapPop.ImapProtocolTester.SendCommand(String command, String logString)
 at Microsoft.Exchange.Tools.ExRca.Tests.ImapPop.BaseProtocolTest.PerformTestReally() 
 

Open in new window

0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
Haresh NikumbhSr. Tech leadCommented:
0
 
wakatashi1Author Commented:
Thanks - I think, though, that the solution there was to set the authentication type to plain text login.  

And I've already done that with the "Set-ImapSettings -LoginType 1" Powershell command, unfortunately.
0
 
wakatashi1Author Commented:
Thing is, I need to be able to connect on port 143 (rather than 993) using plain text, with no SSL.
0
 
Simon Butler (Sembee)ConsultantCommented:
Have you tested it on the SSL port to confirm whether it works that way or not? It could be that the change you made wasn't effective. Did you restart the IMAP service after making the change?

The authentication method is domain/username/alias or the UPN (which may or may not be the same as the Email address).

Simon.
0
 
wakatashi1Author Commented:
Yes, I've tested it on port 993 with SSL.  And yes, I was careful to restart both the IMAP and the IMAP Backend services on the server after making any changes to the authentication type with Powershell.  

I've tried domain/username/alias, and I've tried the UPN also (which in this case isn't the same as the e-mail address).  But no dice!
0
 
Simon Butler (Sembee)ConsultantCommented:
Have you tried a regular user and not the administrator account?

Simon.
1
 
wakatashi1Author Commented:
Simon - you are a superstar of the Universe!  Other accounts work fine.

Just for the icing on the cake, any idea why the built-in Administrator account shouldn't work?  It has a mailbox which is perfectly accessible using OWA.

Thanks,
Dave
0
 
Simon Butler (Sembee)ConsultantCommented:
There are lots of restrictions on the Administrator account. Ideally you shouldn't use it for anything. Most of the sites I admin the Administrator password is set then locked away and all admins have their own account. It is used for emergencies only.

Simon.
0
 
wakatashi1Author Commented:
Yes, I know and I agree.  But I don't see why from a technical standpoint it shouldn't allow IMAP connections to a mailbox attached to that account.

Anyway, it's pretty much irrelevant - I can now do what I need to do.  Thank you very much for your help.
0
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.

Join & Write a Comment

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

  • 6
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now