nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
844 stars 260 forks source link

Error deleting messages from Gmail accounts #10279

Open cwerstuik opened 1 week ago

cwerstuik commented 1 week ago

Steps to reproduce

  1. Go to mail app
  2. Delete thread or message from a Gmail account

Expected behavior

When I delete an email from my Gmail Inbox, the message is moved to the Trash folder and disappears from Inbox

Actual behavior

Message disappears for a second, then reappears with the error, Could not delete message

Eventually the message does disappear forever, but the time varies (maybe based on whenever a background sync is done?)

The message does appear in the Trash folder even though the log warning says, Could not move message $73695 from INBOX to [Gmail]/Trash

This doesn't seem to happen with other email providers. I've tried with Yahoo and Zoho.

Mail app version

4.0.2

Mailserver or service

Gmail

Operating system

Linux

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database

MySQL

Additional info

Formated Log

[mail] Debug: deleting message
    DELETE /index.php/api/thread/469715
    from ** by ** at Oct 21, 2024, 9:56:48 AM
[mail] Debug: loading messages of mailbox <642>
    GET /index.php/api/messages?mailboxId=642&limit=1&cursor=1729384992
    from ** by ** at Oct 21, 2024, 9:56:48 AM
[mail] Debug: Mail server closed the connection unexpectedly.
    DELETE /index.php/api/thread/469715
    from ** by ** at Oct 21, 2024, 9:56:49 AM
[mail] Warning: Could not move message $73695 from INBOX to [Gmail]/Trash
    DELETE /index.php/api/thread/469715
    from ** by ** at Oct 21, 2024, 9:56:49 AM

The full log

{
  "reqId": "GcERXg1Wl9upNxonq1aU",
  "level": 0,
  "time": "2024-10-21T16:56:48+00:00",
  "remoteAddr": "*****",
  "user": "*****",
  "app": "mail",
  "method": "DELETE",
  "url": "/index.php/api/thread/469715",
  "message": "deleting message",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0",
  "version": "30.0.0.14",
  "data": {
    "app": "mail",
    "messageId": "73695",
    "mailboxId": "833"
  },
  "id": "671687d44ad9e"
}
{
  "reqId": "vLSPWf3o3B7TEbIaL7Ob",
  "level": 0,
  "time": "2024-10-21T16:56:48+00:00",
  "remoteAddr": "*****",
  "user": "*****",
  "app": "mail",
  "method": "GET",
  "url": "/index.php/api/messages?mailboxId=642&limit=1&cursor=1729384992",
  "message": "loading messages of mailbox <642>",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0",
  "version": "30.0.0.14",
  "data": {
    "app": "mail"
  },
  "id": "671687d44ad9a"
}
{
  "reqId": "GcERXg1Wl9upNxonq1aU",
  "level": 0,
  "time": "2024-10-21T16:56:49+00:00",
  "remoteAddr": "*****",
  "user": "*****",
  "app": "mail",
  "method": "DELETE",
  "url": "/index.php/api/thread/469715",
  "message": "Mail server closed the connection unexpectedly.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0",
  "version": "30.0.0.14",
  "exception": {
    "Exception": "Horde_Imap_Client_Exception",
    "Message": "Mail server closed the connection unexpectedly.",
    "Code": 4,
    "Trace": [
      {
        "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
        "line": 4560,
        "function": "read",
        "class": "Horde_Imap_Client_Socket_Connection_Socket",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
        "line": 4319,
        "function": "_getLine",
        "class": "Horde_Imap_Client_Socket",
        "type": "->",
        "args": [
          [
            "Horde_Imap_Client_Interaction_Pipeline",
            [
              [],
              [],
              [
                "Horde_Imap_Client_Mailbox"
              ]
            ],
            [
              "Horde_Imap_Client_Fetch_Results"
            ]
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
        "line": 4243,
        "function": "_sendCmdChunk",
        "class": "Horde_Imap_Client_Socket",
        "type": "->",
        "args": [
          [
            "Horde_Imap_Client_Interaction_Pipeline",
            [
              [],
              [],
              [
                "Horde_Imap_Client_Mailbox"
              ]
            ],
            [
              "Horde_Imap_Client_Fetch_Results"
            ]
          ],
          [
            [
              "Horde_Imap_Client_Interaction_Command",
              [],
              true,
              false,
              null,
              null,
              [
                "Horde_Imap_Client_Interaction_Pipeline",
                [
                  [],
                  [],
                  [
                    "Horde_Imap_Client_Mailbox"
                  ]
                ],
                [
                  "Horde_Imap_Client_Fetch_Results"
                ]
              ],
              null,
              "7"
            ]
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
        "line": 3691,
        "function": "_sendCmd",
        "class": "Horde_Imap_Client_Socket",
        "type": "->",
        "args": [
          [
            "Horde_Imap_Client_Interaction_Pipeline",
            [
              [],
              [],
              [
                "Horde_Imap_Client_Mailbox"
              ]
            ],
            [
              "Horde_Imap_Client_Fetch_Results"
            ]
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php",
        "line": 2977,
        "function": "_copy",
        "class": "Horde_Imap_Client_Socket",
        "type": "->",
        "args": [
          [
            "Horde_Imap_Client_Mailbox"
          ],
          [
            [
              "Horde_Imap_Client_Ids",
              false
            ],
            true,
            true
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php",
        "line": 324,
        "function": "copy",
        "class": "Horde_Imap_Client_Base",
        "type": "->",
        "args": [
          "INBOX",
          [
            "Horde_Imap_Client_Mailbox"
          ],
          [
            [
              "Horde_Imap_Client_Ids",
              false
            ],
            true,
            true
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
        "line": 368,
        "function": "move",
        "class": "OCA\\Mail\\IMAP\\MessageMapper",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\IMAP\\HordeImapClient",
            [
              "HICenv",
              "HICflags",
              "HIChdrs",
              "HICdate",
              "HICsize",
              "HICstruct"
            ],
            true,
            true
          ],
          "INBOX",
          73695,
          "[Gmail]/Trash"
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
        "line": 327,
        "function": "deleteMessageWithClient",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Account"
          ],
          [
            "OCA\\Mail\\Db\\Mailbox",
            833
          ],
          73695,
          [
            "OCA\\Mail\\IMAP\\HordeImapClient",
            [
              "HICenv",
              "HICflags",
              "HIChdrs",
              "HICdate",
              "HICsize",
              "HICstruct"
            ],
            true,
            true
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
        "line": 930,
        "function": "deleteMessage",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Account"
          ],
          "INBOX",
          73695
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Controller/ThreadController.php",
        "line": 217,
        "function": "deleteThread",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Account"
          ],
          [
            "OCA\\Mail\\Db\\Mailbox",
            833
          ],
          "<20241021165439.Horde.WgxKmfS58aAcJ-5C0WWAd6x@*****.com>"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "delete",
        "class": "OCA\\Mail\\Controller\\ThreadController",
        "type": "->",
        "args": [
          469715
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Controller\\ThreadController"
          ],
          "delete"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Controller\\ThreadController"
          ],
          "delete"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Mail\\Controller\\ThreadController",
          "delete",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "469715",
            "mail.thread.delete"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1001,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/mail/api/thread/469715"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket/Connection/Socket.php",
    "Line": 147,
    "message": "Mail server closed the connection unexpectedly.",
    "exception": {
      "details": null,
      "logged": false,
      "raw_msg": "Mail server closed the connection unexpectedly."
    },
    "CustomMessage": "Mail server closed the connection unexpectedly."
  },
  "id": "671687d44ad96"
}
{
  "reqId": "GcERXg1Wl9upNxonq1aU",
  "level": 2,
  "time": "2024-10-21T16:56:49+00:00",
  "remoteAddr": "*****",
  "user": "*****",
  "app": "mail",
  "method": "DELETE",
  "url": "/index.php/api/thread/469715",
  "message": "Could not move message $73695 from INBOX to [Gmail]/Trash",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0",
  "version": "30.0.0.14",
  "exception": {
    "Exception": "OCA\\Mail\\Exception\\ServiceException",
    "Message": "Could not move message $73695 from INBOX to [Gmail]/Trash",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
        "line": 368,
        "function": "move",
        "class": "OCA\\Mail\\IMAP\\MessageMapper",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\IMAP\\HordeImapClient",
            [
              "HICenv",
              "HICflags",
              "HIChdrs",
              "HICdate",
              "HICsize",
              "HICstruct"
            ],
            true,
            true
          ],
          "INBOX",
          73695,
          "[Gmail]/Trash"
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
        "line": 327,
        "function": "deleteMessageWithClient",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Account"
          ],
          [
            "OCA\\Mail\\Db\\Mailbox",
            833
          ],
          73695,
          [
            "OCA\\Mail\\IMAP\\HordeImapClient",
            [
              "HICenv",
              "HICflags",
              "HIChdrs",
              "HICdate",
              "HICsize",
              "HICstruct"
            ],
            true,
            true
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
        "line": 930,
        "function": "deleteMessage",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Account"
          ],
          "INBOX",
          73695
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Controller/ThreadController.php",
        "line": 217,
        "function": "deleteThread",
        "class": "OCA\\Mail\\Service\\MailManager",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Account"
          ],
          [
            "OCA\\Mail\\Db\\Mailbox",
            833
          ],
          "<20241021165439.Horde.WgxKmfS58aAcJ-5C0WWAd6x@******.com>"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "delete",
        "class": "OCA\\Mail\\Controller\\ThreadController",
        "type": "->",
        "args": [
          469715
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Controller\\ThreadController"
          ],
          "delete"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Mail\\Controller\\ThreadController"
          ],
          "delete"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Mail\\Controller\\ThreadController",
          "delete",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "469715",
            "mail.thread.delete"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1001,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/mail/api/thread/469715"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php",
    "Line": 339,
    "Previous": {
      "Exception": "Horde_Imap_Client_Exception",
      "Message": "Mail server closed the connection unexpectedly.",
      "Code": 4,
      "Trace": [
        {
          "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 4560,
          "function": "read",
          "class": "Horde_Imap_Client_Socket_Connection_Socket",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 4319,
          "function": "_getLine",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            [
              "Horde_Imap_Client_Interaction_Pipeline",
              [
                [],
                [],
                [
                  "Horde_Imap_Client_Mailbox"
                ]
              ],
              [
                "Horde_Imap_Client_Fetch_Results"
              ]
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 4243,
          "function": "_sendCmdChunk",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            [
              "Horde_Imap_Client_Interaction_Pipeline",
              [
                [],
                [],
                [
                  "Horde_Imap_Client_Mailbox"
                ]
              ],
              [
                "Horde_Imap_Client_Fetch_Results"
              ]
            ],
            [
              [
                "Horde_Imap_Client_Interaction_Command",
                [],
                true,
                false,
                null,
                null,
                [
                  "Horde_Imap_Client_Interaction_Pipeline",
                  [
                    [],
                    [],
                    [
                      "Horde_Imap_Client_Mailbox"
                    ]
                  ],
                  [
                    "Horde_Imap_Client_Fetch_Results"
                  ]
                ],
                null,
                "7"
              ]
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 3691,
          "function": "_sendCmd",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            [
              "Horde_Imap_Client_Interaction_Pipeline",
              [
                [],
                [],
                [
                  "Horde_Imap_Client_Mailbox"
                ]
              ],
              [
                "Horde_Imap_Client_Fetch_Results"
              ]
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php",
          "line": 2977,
          "function": "_copy",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            [
              "Horde_Imap_Client_Mailbox"
            ],
            [
              [
                "Horde_Imap_Client_Ids",
                false
              ],
              true,
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php",
          "line": 324,
          "function": "copy",
          "class": "Horde_Imap_Client_Base",
          "type": "->",
          "args": [
            "INBOX",
            [
              "Horde_Imap_Client_Mailbox"
            ],
            [
              [
                "Horde_Imap_Client_Ids",
                false
              ],
              true,
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
          "line": 368,
          "function": "move",
          "class": "OCA\\Mail\\IMAP\\MessageMapper",
          "type": "->",
          "args": [
            [
              "OCA\\Mail\\IMAP\\HordeImapClient",
              [
                "HICenv",
                "HICflags",
                "HIChdrs",
                "HICdate",
                "HICsize",
                "HICstruct"
              ],
              true,
              true
            ],
            "INBOX",
            73695,
            "[Gmail]/Trash"
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
          "line": 327,
          "function": "deleteMessageWithClient",
          "class": "OCA\\Mail\\Service\\MailManager",
          "type": "->",
          "args": [
            [
              "OCA\\Mail\\Account"
            ],
            [
              "OCA\\Mail\\Db\\Mailbox",
              833
            ],
            73695,
            [
              "OCA\\Mail\\IMAP\\HordeImapClient",
              [
                "HICenv",
                "HICflags",
                "HIChdrs",
                "HICdate",
                "HICsize",
                "HICstruct"
              ],
              true,
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/lib/Service/MailManager.php",
          "line": 930,
          "function": "deleteMessage",
          "class": "OCA\\Mail\\Service\\MailManager",
          "type": "->",
          "args": [
            [
              "OCA\\Mail\\Account"
            ],
            "INBOX",
            73695
          ]
        },
        {
          "file": "/var/www/html/custom_apps/mail/lib/Controller/ThreadController.php",
          "line": 217,
          "function": "deleteThread",
          "class": "OCA\\Mail\\Service\\MailManager",
          "type": "->",
          "args": [
            [
              "OCA\\Mail\\Account"
            ],
            [
              "OCA\\Mail\\Db\\Mailbox",
              833
            ],
            "<20241021165439.Horde.WgxKmfS58aAcJ-5C0WWAd6x@*****.com>"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 208,
          "function": "delete",
          "class": "OCA\\Mail\\Controller\\ThreadController",
          "type": "->",
          "args": [
            469715
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 114,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Mail\\Controller\\ThreadController"
            ],
            "delete"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 161,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Mail\\Controller\\ThreadController"
            ],
            "delete"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 302,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Mail\\Controller\\ThreadController",
            "delete",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "469715",
              "mail.thread.delete"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1001,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/apps/mail/api/thread/469715"
          ]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 24,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket/Connection/Socket.php",
      "Line": 147
    },
    "message": "Could not move message $73695 from INBOX to [Gmail]/Trash",
    "exception": [],
    "CustomMessage": "Could not move message $73695 from INBOX to [Gmail]/Trash"
  },
  "id": "671687d44ad18"
}
kesselb commented 1 week ago

Thanks for your bug report 👍

I'm able to reproduce.

------------------------------
>> Thu, 24 Oct 2024 12:23:03 +0000
>> Connection to: imap://imap.gmail.com:993/
>> Server connection took 0.0679 seconds.
S: * OK Gimap ready for requests from 0.0.0.0 1234
C: 1 CAPABILITY
S: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER
S: 1 OK Thats all she wrote! 1234
>> Command 1 took 0.0191 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: blub@gmail.com)]
------------------------------
>> Thu, 24 Oct 2024 12:23:04 +0000
>> Connection to: imap://imap.gmail.com:993/
>> Server connection took 0.0537 seconds.
S: * OK Gimap ready for requests from 0.0.0.0 1234
C: 1 CAPABILITY
S: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER
S: 1 OK Thats all she wrote! 1234
>> Command 1 took 0.0175 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: blub@gmail.com)]
S: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
S: 2 OK blub@gmail.com authenticated (Success)
>> Command 2 took 1.1431 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 ENABLE CONDSTORE UTF8=ACCEPT
C: 4 SELECT INBOX
S: * ENABLED CONDSTORE UTF8=ACCEPT
S: 3 OK Success
>> Command 3 took 0.2041 seconds.
S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing \*)] Flags permitted.
S: * OK [UIDVALIDITY 1] UIDs valid.
S: * 8 EXISTS
S: * 0 RECENT
S: * OK [UIDNEXT 17] Predicted next UID.
S: * OK [HIGHESTMODSEQ 3076]
S: 4 OK [READ-WRITE] INBOX selected. (Success)
>> Command 4 took 0.2507 seconds.
>> CACHE: Stored metadata (_m,uidvalid [INBOX])
C: 5 UID FETCH 7:14 (FLAGS) (CHANGEDSINCE 3053)
S: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
S: 2 OK blub@gmail.com authenticated (Success)
>> Command 2 took 1.174 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 ENABLE CONDSTORE UTF8=ACCEPT
C: 4 EXAMINE INBOX
S: * 6 FETCH (UID 12 MODSEQ (3058) FLAGS (\Seen))
S: 5 OK Success
>> Command 5 took 0.1467 seconds.
>> CACHE: Stored messages [INBOX; 12]
>> CACHE: Stored metadata (_m,uidvalid [INBOX])
C: 6 UID SEARCH RETURN (ALL COUNT) UID 7:14
S: * ENABLED CONDSTORE UTF8=ACCEPT
S: 3 OK Success
>> Command 3 took 0.1791 seconds.
S: * ESEARCH (TAG "6") UID COUNT 8 ALL 7:14
S: 6 OK SEARCH completed (Success)
>> Command 6 took 0.1573 seconds.
C: 7 UID MOVE 12 [Gmail]/Trash
S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing)
S: * OK [PERMANENTFLAGS ()] Flags permitted.
S: * OK [UIDVALIDITY 1] UIDs valid.
S: * 8 EXISTS
S: * 0 RECENT
S: * OK [UIDNEXT 17] Predicted next UID.
S: * OK [HIGHESTMODSEQ 3076]
S: 4 OK [READ-ONLY] INBOX selected. (Success)
>> Command 4 took 0.2126 seconds.
>> CACHE: Stored metadata (_m,uidvalid [INBOX])
C: 5 UID FETCH 7:14 (FLAGS) (CHANGEDSINCE 3053)
S: * 6 FETCH (UID 12 MODSEQ (3081) FLAGS (\Seen))
>> ERROR: read timeout error.
>> ERROR: Server closed the connection.
S: * 6 EXPUNGE
>> CACHE: Stored messages [INBOX; 12]
>> CACHE: Stored metadata (_m,uidvalid [INBOX])
>> CACHE: Deleted messages [INBOX; 12]
S: * 7 EXISTS
S: 5 OK Success
>> Command 5 took 0.6338 seconds.
>> CACHE: Stored messages [INBOX; 12]
>> CACHE: Stored metadata (_m,uidvalid [INBOX])
C: 6 UID SEARCH RETURN (ALL COUNT) UID 7:14
S: * ESEARCH (TAG "6") UID COUNT 7 ALL 7:11,13:14
S: 6 OK SEARCH completed (Success)
>> Command 6 took 0.1196 seconds.
... removed some commands ...
C: 11 LOGOUT
S: * BYE LOGOUT Requested
S: 11 OK 73 good day (Success)
>> Command 11 took 0.1176 seconds.
------------------------------