Intermittent AuthenticationFailedException in IMAP protocol in SDP

Intermittent AuthenticationFailedException in IMAP protocol in SDP

Reason :

In IMAP protocol enabled Mail fetching environments, we may face AuthenticationFailedException.

But after few minutes, mails will be fetched normally ( without any changes by the user ).

This is because, the opened IMAP connections from Application server to Exchange Server are not closed properly. Due to this, the maximum concurrent IMAP connections ( by default it is 16 connections per mailbox ) got exhausted and the above exception throws.

Workaround :

      1. Try decreasing the Authenticated time-out and Unauthenticated time-out in the Exchange Admin Centre.

            If your Exchange version is 2010 or below, you can change the values using Shell Command as in the article https://docs.microsoft.com/en-us/exchange/set-connection-time-out-limits-for-imap4-exchange-2013-help. Else, follow the below steps.

                  Go to Exchange Admin Centre ( /ecp ) >> Servers >> Select your server and double click >> Click IMAP4 >> Click More options >> Reduce the Authenticated and Unauthenticated time-out to 60s.

                  After this changed, restart your application server and monitor mail fetching. If this workaround doesn't help, please try option 2.

            


      2. Try using EWS protocol in SDP for mail fetching.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Configuring Mail Server Settings using Gmail mailbox (Authentication Type - Basic)

                      Gmail mailbox can be configured using the following steps with Authentication Type - Basic: Navigate to Security under the specific Google Account and enable 2-Step Verification. After enabling 2-Step Verification, search for "App passwords," ...
                    • Error while invoking backup_MSSQLException: TDS Protocol error

                      java.sql.SQLException: TDS Protocol error: Invalid packet type 0x64 at Based on the Email screenshot it looks like you have the "TDS Protocol Error" message. We have seen this message occur under different situations and mostly it is a SQL or network ...
                    • Step-by-step: E-Mail configuration for Outlook using POP/IMAP

                      The reason for configuring the mailbox in Outlook using POP/IMAP configuration is to validate connectivity and authentication settings. ServiceDesk Plus Application fetches emails from the inbox exactly as how an Email Client (Outlook) would fetch ...
                    • How to migrate data from SDP to SDP MSP.

                      Below are the only details which can be exported from SDP and imported to SDP MSP application. 1) You can export request data from ServiceDesk Plus (SDP) using XLS format. Requests -> Goto Admin -> Reports -> New custom report -> Tabular reports -> ...
                    • Mail fetching_ Command is not valid in this state

                      Cause: Unable to fetch email when encrypted mode is enabled on POP in the mail server. Error trace in logs: javax.mail.AuthenticationFailedException: Command is not valid in this state. Solution: Reset the password format on the exchange server to ...