astroidmail / astroid

A graphical threads-with-tags style, lightweight and fast, e-mail client for Notmuch
http://astroidmail.github.io
Other
606 stars 65 forks source link

Add a '#' key to send a message to the trash. #739

Closed rothn closed 10 months ago

rothn commented 10 months ago

Currently, Astroid has no support for deleting messages. Without deleting messages, a mail server with limited storage will eventually become full and incapable of receiving any more mail. Message deletion functionality in clients is an important mechanism for preventing this.

This adds a mechanism to mark messages as 'trash' in Astroid, which servers like gmail are configured to interpret as a deletion request.

gauteh commented 10 months ago

I think we can add this for trash which has a special meaning in IMAP and is handled to some degree by notmuch. As you probably know trash isn't cleaned up normally, but is for instance by gmail remotely eventually: https://github.com/gauteh/lieer#caveats . You can achieve the same thin for custom tags by doing this: https://github.com/astroidmail/astroid/wiki/User-defined-keyboard-hooks#example-toggle-custom-tag-in-thread-index

rothn commented 10 months ago

In case anyone who uses gmail comes across this-- "trash" seems to be the more standard way to handle this. And as far as I can tell, gmail will eventually delete these message. But mapping the "TRASH" system label to "Trash" (with a capital T) in my gmail helper causes Gmail to respect this better. I think the more standard way is probably the right approach for a PR, but hopefully this helps other Gmail users who stumble across this.