diff --git a/Wino.Core/Integration/ImapClientPool.cs b/Wino.Core/Integration/ImapClientPool.cs index 500f433f..b31ff6d2 100644 --- a/Wino.Core/Integration/ImapClientPool.cs +++ b/Wino.Core/Integration/ImapClientPool.cs @@ -79,15 +79,11 @@ namespace Wino.Core.Integration try { bool isReconnected = await EnsureConnectedAsync(client); - + bool mustDoPostAuthIdentification = false; if ((isCreatedNew || isReconnected) && client.IsConnected) { - // Activate supported pre-auth capabilities. - if (client.Capabilities.HasFlag(ImapCapabilities.Compress)) - await client.CompressAsync(); - // Identify if the server supports ID extension. // Some servers require it pre-authentication, some post-authentication. // We'll observe the response here and do it after authentication if needed. @@ -118,6 +114,9 @@ namespace Wino.Core.Integration // Activate post-auth capabilities. if (client.Capabilities.HasFlag(ImapCapabilities.QuickResync)) await client.EnableQuickResyncAsync(); + + if (client.Capabilities.HasFlag(ImapCapabilities.Compress)) + await client.CompressAsync(); } } catch (Exception ex)