?
Solved

Exchange 2013 IMAP - authentication fails

Posted on 2013-06-20
12
Medium Priority
?
26,989 Views
Last Modified: 2013-06-21
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
Comment
Question by:wakatashi1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 3
12 Comments
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39261971
run this tool and check if you get any other info for IMAP

https://www.testexchangeconnectivity.com/
0
 

Author Comment

by:wakatashi1
ID: 39262014
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39262038
0
 

Author Comment

by:wakatashi1
ID: 39262042
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
 

Author Comment

by:wakatashi1
ID: 39262046
Thing is, I need to be able to connect on port 143 (rather than 993) using plain text, with no SSL.
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39262163
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
 

Author Comment

by:wakatashi1
ID: 39262256
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
 
LVL 63

Accepted Solution

by:
Simon Butler (Sembee) earned 2000 total points
ID: 39262293
Have you tried a regular user and not the administrator account?

Simon.
1
 

Author Comment

by:wakatashi1
ID: 39265302
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
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39265451
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
 

Author Comment

by:wakatashi1
ID: 39265767
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

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question