Mail fetching Stopped when processing a mail with Invalid From Address

Mail fetching Stopped when processing a mail with Invalid From Address

Trace : 

  1. [13:18:44:385]|[04-17-2023]|[com.manageengine.servicedesk.mail.core.ProcessMailMessage]|[INFO]|[185]: com.adventnet.servicedesk.mailutils : setFromAddress()|
  2. [13:18:44:385]|[04-17-2023]|[com.manageengine.servicedesk.mail.core.ProcessMailMessage]|[SEVERE]|[185]: Exception in getting fromAddress......so setting Not Provided by default|
  3. [13:18:44:385]|[04-17-2023]|[SYSERR]|[INFO]|[185]: javax.mail.internet.AddressException: Local address contains control or whitespace in string ``Spam Report''|
  4. [13:18:44:385]|[04-17-2023]|[SYSERR]|[INFO]|[185]: at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1365)|

Root Cause:
  1. Invalid mail address sent by mail sender. In most of the cases, this kind of mails are sent from customer mail sending tools or mail failure notifications say bounce mail, server error etc. When parsing the from address and gives us null value. converting tolowercase without handling null check give raise to an exception, which in turn stops the mail fetching schedule.

WorkAround : 
  1. IncomingMail.setFromAddress throws NullPointerException when processsing such from address values. A temporary workaround is given to the customer to ignore Exception in the attached fjar . However, with that fix, the requester of the request is set as "Not Provided" (An user is created with the display name as "Not Provided"). This issue is fixed and a meaningul name will be fetched (if available in mail details) in 14304 Build.
  2. Issue ID : SD-110562
Fjar Details : 
      Build compatibility : 14101 - 14103, 14202 
How to Apply the fjar?
  1. Download the attached fjar file.
  2. place it inside the fixes directory at <servicedeskplus_home>.
  3. Restart the servicedeskplus application server.


                    New to ADSelfService Plus?

                      • Related Articles

                      • Fix: Mail fetching stops due to invalid characters in the attachment name

                        Issue: Mail fetching being stopped due to invalid characters "?" , ":" in the filename. In this case, the eml file's subject contains ":" character and so, while uploading the .eml as attachment, error is thrown (Only in windows server) Trace: ...
                      • Mail Fetching - Error while processing attachment and inline image.

                        Issue During the process of fetching emails, attachments are dropped as a result of the presence of directory traversal characters. Furthermore, an issue arises when processing inline images, this particular error related to inline images results in ...
                      • 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: ...
                      • Fix: Failed to parse To/Cc address while fetching mails using Graph

                        Issue: If the To / Cc address contains the email address in the format "Test, SDP" <test@sdp.com> (containing "," character in the email address itself), then parsing of such addresses using Microsoft Graph fails in SDP. If such address is a support ...
                      • Mail Fetching Stopped Due to Inline Image Handling

                        Issue Cause : While fetching a mail, in certain mail servers, cid of inline image is not parsed correctly. Once inline stream is converted to image, cid in src attr will be replaced with image url. cid for uploaded inline image in mail content is not ...