function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MogyDevMogyDev 

Duplicate tickets - mailbox had previously expunged error

Hello, we have had some real nightmares this morning. We have been using email2case to automatically generate tickets. This morning we have been seeing some problems with duplicate tickets being generated. The emails all seem to be fine. We have looked through the logs and found they all seem to have the following message.

2005-09-21 09:02:21,273 424441124 [Timer-0] ERROR com.sforce.mail.GenericClient  - javax.mail.MessagingException: A9 NO Some messages in the mailbox had previously been expunged and could not be returned.;
  nested exception is:
 com.sun.mail.iap.CommandFailedException: A9 NO Some messages in the mailbox had previously been expunged and could not be returned.
javax.mail.MessagingException: A9 NO Some messages in the mailbox had previously been expunged and could not be returned.;
  nested exception is:
 com.sun.mail.iap.CommandFailedException: A9 NO Some messages in the mailbox had previously been expunged and could not be returned.
 at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:753)
 at javax.mail.Message.setFlag(Message.java:541)
 at com.sforce.mail.GenericClient.handleMessage(GenericClient.java:374)
 at com.sforce.mail.GenericClient.receive(GenericClient.java:322)
 at com.sforce.mail.EmailService$EmailWorker.run(EmailService.java:113)
 at java.util.TimerThread.mainLoop(Unknown Source)
 at java.util.TimerThread.run(Unknown Source)

The email got processed twice and so a duplicate ticket was issued to the customer

Does anyone have any experience of this and could anyone help me on this issue. It is proving to a real pain in the a*&!  ;¬)

Many thanks for your help

shapoorshapoor
I ran into a similar issue when running the Agent as a service (srvany from Microsoft.) When stoping the Email-to-Case Agent service a Java.exe process continues to run. This in turn results in a duplicate Java.exe process when the service is restarted. Which ultimately results in multiple processes creating multiple cases in the app.

This error is indicative of this situation:
Code:
ERROR com.sforce.mail.GenericClient - javax.mail.MessagingException: A11 NO Some messages in the mailbox had previously been expunged and could not be returned.

Stopping the service and the extra Java.exe processes and then restarting the Service appears to have resolved the issue. 

To do:
Need to run the Email-to-Case Agent as a service such that when it's shutdown the associated Java.exe process is terminated as well.
GwiredGwired

This can also occur if you run the process via RDP in the Console as well as running it as a process under a regular RDP session.  Woops

 

 

J9rudyJ9rudy

This is exactly the same issue we are experiencing - can you provide more insight on how this was resolved - you can contact me at jwhite@synapsemail.com  - Janine