Last month I came across a peculiar request. The BP was using CRM internally and the logs were showing authentication issues, not allowing it to connect to the mailbox. This error is a recuring one about twice a year.
Initially we thought this was a OAUTH Token no refreshing in CRM. The BP managed to resolve the issue by deeting the Email Managment Server Options and setting up a new record.
Not long after the same issue came up and upon digging deeper they found EIdReadLnMaxLineLengthExceeded. The service is clearly connecting to the mailbox and reading the messages except its throwing this error.
Example what the logs were showing below.
Logs:
2023-11-22 13:49:15.510> Mailbox: [email protected]
2023-11-22 13:49:15.510> Attempted to remove bad mail at index 1106. This could not be done.
2023-11-22 13:49:15.510> Mailbox: [email protected]
2023-11-22 13:49:15.526> Error occurred during retrieving email 1107
Exception type: EIdReadLnMaxLineLengthExceeded
Exception details: Max line length exceeded.
This may be caused by a malformed email in the mailbox.
2023-11-22 13:49:15.526> Mailbox: [email protected]
2023-11-22 13:49:15.526> Attempted to remove bad mail at index 1107. This could not be done.
2023-11-22 13:49:15.526> Mailbox: [email protected]
2023-11-22 13:49:15.526> Error occurred during retrieving email 1108
Exception type: EIdReadLnMaxLineLengthExceeded
Exception details: Max line length exceeded.
This may be caused by a malformed email in the mailbox.
2023-11-22 13:49:15.526> Mailbox: [email protected]
2023-11-22 13:49:15.526> Attempted to remove bad mail at index 1108. This could not be done.
2023-11-22 13:49:15.541> Sleep Period = 175 seconds
Interesting enough the BP was able to resolve this while we were investigating and they were kind enough to explain to us that the Mailbox had over 1600 records in it. As soon as they deleted all those records new emails were filed correctly without an issue.
Seemed like CRM had an issue parsing so many records. I thought this would be an interesting experience to share with the community should anyone come across an issue like so.