Hi Zibi,
I'm afraid there is no perfect answer for this.
I'd first investigate what exactly your application is doing before you get this error.
Logs may help:
https://www.limilabs.com/blog/logging-in-mail-dll
Q: Do you know what this error means, apart from what stated in the error message ( [UNAVAILABLE] Temporary System Error)?
A: This is the server side error: IMAP server is informing you, that it is temporary unavailable.
All ImapResponseExceptions indicate errors returned by the server.
If it happens too often, you should contact your IMAP server administrator.
Q: Do you know what we can do to avoid this?
A: The common cause of this error, is that you're performing large amount of operations in a short time,
and your server is throttling you.
Consider adding a .NET's Thread.Sleep/Task.Delay and check, if the server is more likely to cooperate.
When connected and performing some tasks you can check throttled status on the currently selected folder:
if (imap.CurrentFolder.Throttled)
{
Thread.Sleep(TimeSpan.FromSeconds(1));
}
....and add some client back-off mechanism.
I believe that Gmail has also other IMAP limits:
https://support.google.com/a/answer/1071518
Q: If it can't be avoided...Is there any recovery we could perform?
A: I don't think there is a different way (apart from checking for throttling status, connecting less frequently).