[GH-ISSUE #172] Gmail IMAP gets disconnected when moving an email to Trash #124

Closed
opened 2026-03-03 01:20:00 +03:00 by kerem · 1 comment
Owner

Originally created by @d99kris on GitHub (Dec 7, 2024).
Original GitHub issue: https://github.com/d99kris/nmail/issues/172

Originally assigned to: @d99kris on GitHub.

Description:
This issue was introduced around 2024 Q3 and is not specific to nmail, it can be reproduced with curl as well. It was reported in Google community forums - Gmail IMAP connection gets closed when moving an email to Trash - but it has not yet been fixed on Gmail side.

Since it's an inconvenience to have nmail lose server connection and reconnect every time one deletes email (with an Gmail account), the plan is to implement a workaround for Gmail using UID COPY to Trash, and then mark the email for deletion in source folder, and expunge emails marked for deletion.

How to reproduce it:
Set up nmail with a Gmail account, press d to delete an email.
The top right status message indicates Disconnected and then Reconnecting.

Environment:

  • Version: v5.2.1
  • OS / distro: macOS v15.1.1
Originally created by @d99kris on GitHub (Dec 7, 2024). Original GitHub issue: https://github.com/d99kris/nmail/issues/172 Originally assigned to: @d99kris on GitHub. **Description**: This issue was introduced around 2024 Q3 and is not specific to `nmail`, it can be reproduced with `curl` as well. It was reported in Google community forums - [Gmail IMAP connection gets closed when moving an email to Trash](https://support.google.com/mail/thread/295884152/gmail-imap-connection-gets-closed-when-moving-an-email-to-trash) - but it has not yet been fixed on Gmail side. Since it's an inconvenience to have `nmail` lose server connection and reconnect every time one deletes email (with an Gmail account), the plan is to implement a workaround for Gmail using `UID COPY` to Trash, and then mark the email for deletion in source folder, and expunge emails marked for deletion. **How to reproduce it**: Set up nmail with a Gmail account, press `d` to delete an email. The top right status message indicates `Disconnected` and then `Reconnecting`. **Environment**: - Version: v5.2.1 - OS / distro: macOS v15.1.1
kerem 2026-03-03 01:20:00 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@d99kris commented on GitHub (Jan 24, 2026):

This workaround has now been disabled - see #188.

<!-- gh-comment-id:3794441932 --> @d99kris commented on GitHub (Jan 24, 2026): This workaround has now been disabled - see #188.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#124
No description provided.