The Service Desk Maileater stops processing mail and the stdlog shows that the EXPUNGE command is failing.

Document ID : KB000006726
Last Modified Date : 21/08/2018
Show Technical Document Details
Issue:
The maileater process may stop reading and deleting emails or may sometimes re-read the same email resulting in multiple tickets being created.

The following messages indicating that the EXPUNGE command is failing can be seen in the stdlog:

05/09 18:30:04.03 srvcdesk1 pdm_maileater_nxd 4188 MILESTONE pdm_maileater_nxd.c 9139 Imap Mail: Got NO response from IMAP server: EXPUNGE failed.
05/09 18:30:04.03 srvcdesk1 pdm_maileater_nxd 4188 ERROR pdm_maileater_nxd.c 9619 Imap Mail:Failed to send EXPUNGE command EXPUNGE failed.
05/09 18:30:04.03 srvcdesk1 pdm_maileater_nxd 4188 ERROR pdm_maileater_nxd.c 9520 Failed to send EXPUNGE command EXPUNGE failed

 
Environment:
CA Service Desk 17.1
CA Service Desk 17.0
CA Service Desk 14.1
Microsoft Office365 Exchange Online
Cause:
It is possible that the 'Litigation Hold' policy is applied to the maileater mailbox. This has the effect of the recoverable items folder filling up to the point where it exceeds it's quota and the mailbox is restricted from deleting any further emails. This is the reason the EXPUNGE command fails.
Resolution:
Have the MS Exchange administrator remove the Litigation Hold policy from the mailbox. This can be done using the MS Exchange Management Shell command:

Set-Mailbox maileater_user@mail.com -LitigationHoldEnabled $false
Additional Information:
Place a mailbox on Litigation Hold
Clean Up the Recoverable Items Folder
Managing the dumpster - setting quotas for the Recoverable Items folder