IMAP: when the trash variable is set, mutt wastes bandwidth by reuploading deleted mail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mutt (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mutt
mutt:
Installed: 1.5.17+
Candidate: 1.5.17+
Version table:
*** 1.5.17+
500 http://
100 /var/lib/
Description: Ubuntu 8.04.3 LTS
Release: 8.04
When using IMAP with the trash variable is set, on purging, mutt correctly moves deleted mail to the Trash folder. Unfortunately it appears to download and then reupload the unwanted message to the server. But with IMAP, this should be a server-side copy/move to the Trash folder. The current behavior is very slow (think about deleting thousands of messages from a mailing list) and also needlessly bandwidth intensive (think about deleting mail with large attachments.)
Just looked at this myself as it bugs me too! The patch (debian/ patches/ features/ trash-folder) sets some flags on messages which means that the email is FETCHed and then APPENDed as you say.
A COPY and DELETE would be far faster (server side) and if my reading the RFC3501 is correct, you can actually just use a single STORE to move a message.
Sadly this doesn't look at all simple - perhaps some tweak on the OPT_MOVE would be sensible? It'd be nice to be able to use the same logic for when messages are saved to alternate mailboxes (which are also FETCH/APPENDed AFAICT).