Issue- OCM Email Status report does not reflect the correct error code details. All undelivered failures are listed with 'Hardbounce_InvalidEmail' in report.
Troubleshooting-
1. Check the Email body in Email_Inbox to get the actual error code. NDR email error codes and error descriptions are saved in Email_NDR_Error table. The column NDR_Regex in this table will have the corresponding regex expression for each error codes. During reporting, based on the NDR_Regex match from NDR email content, Description mentioned in Ndr_Error_Desc column will be assigned as an email status for that NDR email.
Root Cause- For the reported issue, along with the actual error code 4.2.2, there is also text ‘9.1.1’ seen which matches the highlighted regex value configured in the NDR mapping table. Hence application was picking the corresponding description i.e. Invalid Email instead of the actual error code description and displaying in OCM Email status report.
Fix-
The application checks the email body with NDR regex. However, for the code 5.x.x, the regex [0-9].x.x allows the application to search for any string that matches, and ignores the actual email error code.
One option to resolve the issue is to change Regex value in table to 5.1.1, 5.1.2 etc. – so that the code is mapped directly to the NDR error.