fetchmail: client/server synchronization error Query status=7 (ERROR)

IMAP commands to test DELETE of message
One of the more common commands that seems to fail is the DELETE command from the device. This can sometimes be caused by the user not having a Trash folder, or the Trash folder not being at the top level of the message store. It sometimes helps to telnet into the user’s account and perform the same IMAP commands that the NotifyLink server is performing, in order to see where we may be failing. To do so:
1. Telnet into the mail server over port 143 and login to the user’s mailbox. To login, the IMAP command is: a login username password , where you replace the username and password with the user’s actual email username and password.
2. Select the folder where the original message to be deleted is located. For example, if it is in the INBOX folder, then type: a select INBOX
3. We now need to know the UID of the message you want to delete. You can either pull this from the MessageID field of NotificationCheckpoint table based on the NotifyLink MID that we are trying to delete. Or if you don’t know the UID, you can use the FETCH command like: a FETCH 1 (UID) , where 1 is the index of the message in the folder. So in this example you are trying to get the UID for the first message in the folder, where the first message is the OLDEST message in the folder.
4. Using the UID from step 3, now copy the message to the trash folder (suppose its UID is 123) : a uid copy 123 trash
5. Now mark the message as deleted: a uid store 123 +flags.silent (Seen Deleted)
6. Finally, expunge the inbox by calling: a expunge
Determining where in the process that we fail may help in determining the root cause of why the DELETE command is failing.

#telnet server 143
And follow above instruction..

– Jayesh