List of mail fetching issues and solutions

List of mail fetching issues and solutions


Scenario 1 : Mail fetching issue due to Invalid or No PKIX certificate
.


 

Log traces for Mail Fetching  issues


Exception when connecting to store.|javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target;
nested exception is:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

[com.adventnet.servicedesk.notification.util.NotificationFactory]|[INFO]|[46]|: The contenttype has been set in the message|: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair|


 




Log traces for Mail Sending  issues

[com.adventnet.servicedesk.notification.action.SDNotifyAction]|[SEVERE]|[73]|: Exception while trying to send notification for Request ID : 26|com.adventnet.servicedesk.ServiceDeskException: Mail sending failed.
Caused by: javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


 


Root Cause

When the email type is set to POPS or IMAPS, the mail server of ServiceDesk Plus stops fetching emails. ServiceDesk Plus needs to be installed with a secure certificate so that the emails are fetched in a secure way.


 


Workaround/Solution :

Click here to find the instructions to install the mail server certificates into ServiceDesk server








Scenario 2 : Mail Fetching & Sending Issue due to Invalid no Relay connector.

Log Trace :

Caused by: javax.mail.SendFailedException: Invalid Addresses; 
nested exception is: 
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for abc@xyz.com
 



Root Cause :

1. The main reason we get the issue is that the outgoing mail server settings could not identify the sender.
2. There are some issues while authenticating the sender on the server and thus restricting them to send emails.
3. The receiver domain's recipient policy has imposed restrictions on sender's domain or the exchange database is corrupt.
 




Solution :

This issue revolves around the Exchange server which will not allow the ServiceDesk Plus application to fetch the emails. Hence, this is an issue related to the email exchange & not with ServiceDesk Plus. If we get a scenario where the customer is not aware of this issue, then in such cases, you need to relay off the Exchange server by allowing application servers. You have to implement some relay restrictions on the virtual server. The application event log stores the error list that occurs in the Exchange environment. You can view the event log. Ongoing through the error causing aspect we can then find its solution accordingly.







Scenario 3 : Mail Sending Issue due to E-Mail Access Denied 



Log Trace: 


Caused by: javax.mail.SendFailedException: Invalid Addresses;
nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1<unknown[192.168.0.66]>: Client host rejected: Access denied 
 




Root Cause : 


This error comes when the sender address or host address is blocked on your server. Generally, this is done if spam has originated from this user.



Solution : 


This is an email exchange related issue. When ServiceDesk Plus uses the email address which might be configured in spam, then the application fails to send emails out of the application. Hence, the only possible solution to this issue is to remove the email address from the Exchange Client Spam filter and hence allowing the email address to send & receive emails. 

 





Scenario 4 : Email Fetching failure due to Authentication 

Log Trace :


[com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask]|[SEVERE]|[26]|: Exception when connecting to store.|javax.mail.AuthenticationFailedException: AUTHENTICATE failed.
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:474)




 Caused by: javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)

 




Root Cause :

1. Username or password might be incorrect.
2. Password expired
 




Solution :
Provide the correct username or password in the incoming mail server settings of ServiceDesk Plus. If the password has expired, change the password related to the email address configured on the exchange and then configure the same in ServiceDesk Plus application.  
Tip: You can have the password in 'never expires' state in the Active Directory so that the issue due to password expiry does not repeat again.

 





Scenario 5: Email Fetching/Sending Due to Connection timeout 



Log Trace :



Exception when connecting to store.|javax.mail.MessagingException: Connect failed;
nested exception is:java.net.SocketTimeoutException: Read timed out
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)

 



Root Cause :


  1. The issue mainly occurs when there is no proper connection being established between the ServiceDesk Plus server and the Mail Exchange Server.
  2. Intermittent Internet connection on the servers.
  3. Network problem in the customer's environment.

 




Solution

 Need to educate the customer on providing a connection between both the servers (ServiceDesk Plus & Mail Exchange). Doing a telnet from the application server to the exchange server port on which the mail server configuration is done. If the connection is established, the issue will be resolved on saving the mail server settings in ServiceDesk Plus.



If the issue still remains & gives us the same error trace, we can ask the customer to check the network as this issue deals with network connectivity between the 2 servers (ServiceDesk Plus & Mail Exchange).




Scenario 6: Email fetching/sending due to 'Unrecognized SSL message'


Log Trace:



javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)



Exception from UI:

FAILURE: E-mail settings saved successfully. But error occurred while trying to check connection with mail server - Problem connecting to mailbox.



Root Cause:

Mail server configured in Admin -> Mail server Settings -> Incoming does not have a valid SSL certificate assigned to IMAP or POP services even though the mail server has got the SSL certificate installed, therefore when trying to communicate via IMAPS on port 993 it's unable to recognize the SSL certificate from it. 




Symptoms:
Telnet on Port 993 returns the message "BYE Connection is closed. 14 Connection to host lost"





Solution:

1. Go to Exchange Console -> Server Configuration -> Click on the Mail server name -> Select a certificate from the list -> Assign a certificate to IMAP, POP and SMTP services. 

2. Restart the respective services from services.msc

3. Alternatively, the same steps can be performed via PowerShell window, 

To get list of Certificates installed 
in the server,


[PS] C:\Windows\system32>Get-ExchangeCertificate

Thumbprint Services Subject
---------- -------- -------
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy .P.... CN=exch2010fe1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I..W.. CN=webmail.example.com, OU=Domain Control Validated, O=webmail.ex...


To assign a certificate
for

IMAP service. Copy the valid certificate's thumbprint from the above output and apply it in the below command.


[PS] C:\Windows\system32>Enable-ExchangeCertificate -ThumbPrint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -Services IMAP -DoNotRequireSSL



          • Related Articles

          • Mail Fetching issue due to Unrecognized SSL exception!

            Error Trace: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source) Exception from UI: FAILURE  :E- mail settings saved successfully. But error ...
          • SSL Installation

            Do you have a Wildcard or a Multi-domain certificate already running in your other servers and want to reinstall in on ServiceDesk Plus server ?, then click here to find how to export SSL certificate using MMC.  Do you already have a .PFX certificate ...
          • How to install SSL certificate in AssetExplorer

            SSL Installation Do you have a Wildcard or a Multi-domain certificate already running in your other servers and want to reinstall in on AssetExplorer server ?, then click here to find how to export SSL certificate using MMC.  Do you already have a ...
          • Failed to start the database

            For the error "Failed to start the database", Check what database being used and, execute changeDBServer.bat. For Pgsql,  Start PGSQL from the command link, execute StartDB.bat 65432 under C:\Manageengine\ServiceDesk\bin 65432 is the default port ...
          • Failure during Zia Reopen prediction process stops the mail fetching schedule

            When the requester replies to closed/resolved requests with empty content or if there is no proper content except the content of the parent mail, then no content will be available for zia reopen prediction process and an exception will be ...