[GH-ISSUE #173] "Move message failed" when trying to delete #126

Closed
opened 2026-03-03 01:20:00 +03:00 by kerem · 6 comments
Owner

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

Originally assigned to: @d99kris on GitHub.

Description: When I hit "D" to delete a message, I get "Move message failed". I set trash=Trash which corresponds to the name on the server. I also tried setting copy_to_trash=1 but get the same. Is there something else I need to configure?

How to reproduce it: Attempt to delete a message as described above.

Environment:

  • Version: 5.1.16
  • OS / distro: Arch Linux

Screenshot of web interface to mail provider:
wow

Originally created by @graysky2 on GitHub (Dec 15, 2024). Original GitHub issue: https://github.com/d99kris/nmail/issues/173 Originally assigned to: @d99kris on GitHub. **Description**: When I hit "D" to delete a message, I get "Move message failed". I set `trash=Trash` which corresponds to the name on the server. I also tried setting `copy_to_trash=1` but get the same. Is there something else I need to configure? **How to reproduce it**: Attempt to delete a message as described above. **Environment**: - Version: 5.1.16 - OS / distro: Arch Linux Screenshot of web interface to mail provider: ![wow](https://github.com/user-attachments/assets/94e64e97-832f-412b-bb34-6295192c2d86)
kerem 2026-03-03 01:20:00 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@d99kris commented on GitHub (Dec 15, 2024):

Hi @graysky2 - if you press left arrow (or <) to view the folder list, is the trash folder listed with the same name there?
(You can press right or > or enter to go back to inbox after checking)

If the name is matching, please help share your log file from ~/.config/nmail/log.txt
Thanks!

<!-- gh-comment-id:2543907466 --> @d99kris commented on GitHub (Dec 15, 2024): Hi @graysky2 - if you press left arrow (or <) to view the folder list, is the trash folder listed with the same name there? (You can press right or > or enter to go back to inbox after checking) If the name is matching, please help share your log file from `~/.config/nmail/log.txt` Thanks!
Author
Owner

@graysky2 commented on GitHub (Dec 15, 2024):

Yes, the name is present and is the same as I defined in the config file:
1

Here is the basic log without verbose options:

2024-12-15 12:18:04.883 | INFO  | nmail 5.1.16  (main.cpp:153)
2024-12-15 12:18:04.884 | INFO  | Arch Linux ARM arm64  (main.cpp:155)
2024-12-15 12:18:04.884 | INFO  | GCC 14.1.1 20240507 glibc 2.39  (main.cpp:157)
2024-12-15 12:18:04.914 | INFO  | entering ui loop  (ui.cpp:2033)
2024-12-15 12:18:27.512 | ERROR | mailimap_uid_move(m_Imap, set, encDestFolder.c_str()) = MAILIMAP_ERROR_PROTOCOL  (imap.cpp:797)
2024-12-15 12:18:27.544 | WARN  | action retry 1  (imapmanager.cpp:552)
2024-12-15 12:18:27.578 | ERROR | mailimap_uid_move(m_Imap, set, encDestFolder.c_str()) = MAILIMAP_ERROR_PROTOCOL  (imap.cpp:797)
2024-12-15 12:18:27.608 | WARN  | action retry 2  (imapmanager.cpp:552)
2024-12-15 12:18:27.641 | ERROR | mailimap_uid_move(m_Imap, set, encDestFolder.c_str()) = MAILIMAP_ERROR_PROTOCOL  (imap.cpp:797)
2024-12-15 12:18:27.669 | WARN  | move message failed  (ui.cpp:638)
2024-12-15 12:18:27.670 | WARN  | move destination = Trash  (ui.cpp:4183)
2024-12-15 12:18:29.083 | INFO  | exiting ui loop  (ui.cpp:2140)
2024-12-15 12:18:29.133 | INFO  | exit  (main.cpp:454)

I started with: nmail -e to generate this log. Let me know if I need to use -ee:

EDIT: I just build the latest commit and am seeing the same error.

<!-- gh-comment-id:2543956460 --> @graysky2 commented on GitHub (Dec 15, 2024): Yes, the name is present and is the same as I defined in the config file: ![1](https://github.com/user-attachments/assets/aab49089-d420-422e-bb59-988c42f7996b) Here is the basic log without verbose options: ``` 2024-12-15 12:18:04.883 | INFO | nmail 5.1.16 (main.cpp:153) 2024-12-15 12:18:04.884 | INFO | Arch Linux ARM arm64 (main.cpp:155) 2024-12-15 12:18:04.884 | INFO | GCC 14.1.1 20240507 glibc 2.39 (main.cpp:157) 2024-12-15 12:18:04.914 | INFO | entering ui loop (ui.cpp:2033) 2024-12-15 12:18:27.512 | ERROR | mailimap_uid_move(m_Imap, set, encDestFolder.c_str()) = MAILIMAP_ERROR_PROTOCOL (imap.cpp:797) 2024-12-15 12:18:27.544 | WARN | action retry 1 (imapmanager.cpp:552) 2024-12-15 12:18:27.578 | ERROR | mailimap_uid_move(m_Imap, set, encDestFolder.c_str()) = MAILIMAP_ERROR_PROTOCOL (imap.cpp:797) 2024-12-15 12:18:27.608 | WARN | action retry 2 (imapmanager.cpp:552) 2024-12-15 12:18:27.641 | ERROR | mailimap_uid_move(m_Imap, set, encDestFolder.c_str()) = MAILIMAP_ERROR_PROTOCOL (imap.cpp:797) 2024-12-15 12:18:27.669 | WARN | move message failed (ui.cpp:638) 2024-12-15 12:18:27.670 | WARN | move destination = Trash (ui.cpp:4183) 2024-12-15 12:18:29.083 | INFO | exiting ui loop (ui.cpp:2140) 2024-12-15 12:18:29.133 | INFO | exit (main.cpp:454) ``` I started with: `nmail -e` to generate [this log](https://gist.github.com/graysky2/a1fbe2781e17ecdc68cb4bd09d039143). Let me know if I need to use `-ee`: EDIT: I just build the latest commit and am seeing the same error.
Author
Owner

@d99kris commented on GitHub (Dec 17, 2024):

Thank you 👍 Do you happen to know what software the email server is running? I see you're using port 143 which is not super common (unencrypted typically) unless you're on a LAN/VPN, so I am wondering if it's some old outdated server version perhaps. And you did try copy_to_trash=1 already - do you know if the log.txt looked same during that test (getting MAILIMAP_ERROR_PROTOCOL)?

If the email service you're using is something provided free to "anyone", please let me know, then I can sign up and troubleshoot.

Otherwise, yes a log using -ee could help (it will dump most IMAP communication, including handshaking about supported functionalities). It can contain some private information, so please review before sharing, or just send it to my personal email address d99kris at gmail dot com, and I will delete the information after reviewing the relevant parts.

<!-- gh-comment-id:2548400322 --> @d99kris commented on GitHub (Dec 17, 2024): Thank you 👍 Do you happen to know what software the email server is running? I see you're using port 143 which is not super common (unencrypted typically) unless you're on a LAN/VPN, so I am wondering if it's some old outdated server version perhaps. And you did try `copy_to_trash=1` already - do you know if the log.txt looked same during that test (getting `MAILIMAP_ERROR_PROTOCOL`)? If the email service you're using is something provided free to "anyone", please let me know, then I can sign up and troubleshoot. Otherwise, yes a log using `-ee` could help (it will dump most IMAP communication, including handshaking about supported functionalities). It can contain some private information, so please review before sharing, or just send it to my personal email address d99kris at gmail dot com, and I will delete the information after reviewing the relevant parts.
Author
Owner

@graysky2 commented on GitHub (Dec 17, 2024):

  • I don't know what they're running but I will say that the web UI is very dated.
  • I too am unhappy with their plain-text passwords.
  • I am happy to report that having copy_to_trash=1 set using the latest commit behaves as expected. No error and mails go to the trash.
  • The mail service is not open to the public.

I will close this, thanks for your help and for developing nmail. I love it.

<!-- gh-comment-id:2549502985 --> @graysky2 commented on GitHub (Dec 17, 2024): * I don't know what they're running but I will say that the web UI is very dated. * I too am unhappy with their plain-text passwords. * I am happy to report that having `copy_to_trash=1` set using the latest commit behaves as expected. No error and mails go to the trash. * The mail service is not open to the public. I will close this, thanks for your help and for developing nmail. I love it.
Author
Owner

@graysky2 commented on GitHub (Dec 17, 2024):

@d99kris - as a side question, is there an option I can set to have nmail not ask me if I am sure I want to delete the message, ie just delete it?

<!-- gh-comment-id:2549504968 --> @graysky2 commented on GitHub (Dec 17, 2024): @d99kris - as a side question, is there an option I can set to have nmail not ask me if I am sure I want to delete the message, ie just delete it?
Author
Owner

@d99kris commented on GitHub (Dec 18, 2024):

I am happy to report that having copy_to_trash=1 set using the latest commit behaves as expected. No error and mails go to the trash.

Thanks, that's good to hear 👍

as a side question, is there an option I can set to have nmail not ask me if I am sure I want to delete the message, ie just delete it?

Yes. While nmail is not running, edit ~/.config/nmail/ui.conf and set delete_without_confirm=1, then start nmail again.

<!-- gh-comment-id:2550028098 --> @d99kris commented on GitHub (Dec 18, 2024): > I am happy to report that having `copy_to_trash=1` set using the latest commit behaves as expected. No error and mails go to the trash. Thanks, that's good to hear 👍 > as a side question, is there an option I can set to have nmail not ask me if I am sure I want to delete the message, ie just delete it? Yes. While nmail is not running, edit `~/.config/nmail/ui.conf` and set `delete_without_confirm=1`, then start nmail again.
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#126
No description provided.