Cleaning References for particular emails

Description

In some emails, most likely generated by Microsoft clients, there are references that look like this:

References: <460779217.325675.1647264140642@posta.domain.net>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ..............

By forwarding or replying to these messages in some cases you will receive an NDR with this error message:

Invalid MIME Content: Single text value size (33000) exceeded allowed maximum (32768) for the 'References' header

You can think of cleaning up this kind of References as suggested by what IceWarp does: https://esupport.icewarp.com/index.php?/Knowledgebase/Article/View/590/106/fix-oversize-references-header-lines-that-cause-error-554 

 

Thanks to Emiliano Vavassori (Ticket #146944)

Activity

Show:

Gabriele Bulfon April 13, 2022 at 10:29 AM

The suggested regex does not work in this particulare case.

This case is probably generated by some software sending attachments automatically, placing trash in the references.

The new regex is applied only if references contain more than 4 consecutive backslashes (that should never be present in references).
The applied regex in this case is (\\r|\\n|\\|\s) replacing every match with an empty string, so removing every trash but, levaing only clean message ids.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix Branch

release

Fix Version

Release Version

WAR ##

Components

Priority

Created April 7, 2022 at 1:28 PM
Updated April 14, 2022 at 2:11 PM
Resolved April 13, 2022 at 10:29 AM