Mail Fetching failure due to extra space in the file name

Mail Fetching failure due to extra space in the file name


Log Trace : 

[16:57:37:843]|[01-03-2024]|[com.manageengine.servicedesk.mail.core.ProcessMailMessage]|[INFO]|[285]: Inside extractAttachments...|
[16:57:37:843]|[01-03-2024]|[com.manageengine.servicedesk.mailutils.MailAPI]|[INFO]|[285]: Inside replaceSpecialCharactersForMailAttachments - before replacement :: 杭州市新引进应届大学生租房补贴信息收集表-ZJY. xlsx|
[16:57:37:843]|[01-03-2024]|[com.manageengine.servicedesk.mailutils.MailAPI]|[INFO]|[285]: after replacement :: 杭州市新引进应届大学生租房补贴信息收集表-ZJY. xlsx|
[16:57:37:843]|[01-03-2024]|[com.manageengine.servicedesk.mailutils.MailAPI]|[SEVERE]|[285]:  Exeption while trying to validate the file - 杭州市新引进应届大学生租房补贴信息收集表-ZJY. xlsx|
[16:57:37:843]|[01-03-2024]|[SYSERR]|[INFO]|[285]: java.lang.NullPointerException|
[16:57:37:843]|[01-03-2024]|[SYSERR]|[INFO]|[285]: at com.manageengine.servicedesk.mailutils.MailAPI.isValidAttachment(MailAPI.java:2903)|
[16:57:37:843]|[01-03-2024]|[SYSERR]|[INFO]|[285]: at com.manageengine.servicedesk.mail.core.IncomingMail.addAttachment(IncomingMail.java:619)|
[16:57:37:843]|[01-03-2024]|[SYSERR]|[INFO]|[285]: at com.manageengine.servicedesk.mail.core.ProcessMailMessage.extractAttachments(ProcessMailMessage.java:1476)|
[16:57:37:843]|[01-03-2024]|[SYSERR]|[INFO]|[285]: at com.manageengine.servicedesk.mail.core.ProcessMailMessage.processMailContent(ProcessMailMessage.java:1344)|

Cause :
           In some of the customer environment, We could find that some of the emails with attachments that a space in the extensions are failed to fetch. This causes mail fetching failure with the above traces.

Fix : 
      In the attached fix, we have removed that extra space, when validating the attachment in the mails during the process of mail fetching.

Steps to apply the fix
      Note :  Before applying the .fjar file, kindly verify its compatibility in the "Jar Compatibility" section below.
  1. Download the attached .fjar file.
  2. Click here for steps to apply the .fjar file.
  3. Restart the application service.
  4. Check for the issue.
  5. 5. If the issue occurs again, enable the email debug in the application, recreate the issue after enabling the email debug then immediately zip the logs (<server_home>\logs folder. For eg: C:\Program Files\ManageEngine\ServiceDesk\logs folder) and share it with us for analysis. If the size of the log file is huge, you can send it to us using our FTP link https://bonitas2.zohocorp.com/. Select the product as "ServiceDesk Plus" and provide the proper ticket number.

Jar Compatibility : 14500

                    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: ...
                      • Fix JAR for Parse Error Exception Raised during Mail Fetching

                        Issue : Some mail are fetched and created as ticket without description due to message corruption temporarily. The issue is can be identified with the below trace. Fix : The issue is not recreated when the mail is skipped to next schedule and fetched ...
                      • 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 ...
                      • 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 ...
                      • Troubleshooting Oauth configuration for mail server settings

                        Oauth in ServiceDesk Plus / AssetExplorer for Mail SDP supports Oauth configuration for Office365 and GSuite mailboxes since 11106 build. Office365 mailboxes can be configured with Oauth authentication using EWS (since 11106) and IMAP / SMTP (since ...