Archiving deleted mails in Dovecot without using a namespace
When I first started using Dovecot, I looked high and low for a way to archive mails, and came up with nothing useful except for lazy_expunge. I find archiving all deleted mails far more preferable to manual copying for two reasons:
- I want to store all mails for posterity unless I am very sure otherwise
- When storing mails for posterity in mutt, delete-message is far faster than copy-message, making even macros a painfully slow operation
lazy_expunge has always annoyed me somewhat, because I don't have any need for the granularity of having an entirely separate namespace for archiving, I just want one maildir folder to shove everything into.
Today I came upon dovecot_deleted_to_trash, which does exactly what I wanted to do when I first started using Dovecot. The configuration I use for archiving mails looks like this:
protocol imap {
mail_plugins = deleted_to_trash
}
plugin {
deleted_to_trash_folder = Archive
}
If you feel like patching Mutt, you can also use the trash folder patch.