Hi Tamas, Dirk
I believe I am doing something similar to what Tamas wants. I have
"INBOX", "Done" and "Sent" folders in the local maildir and these are
synchronized, along with some others, with the remote IMAPS server
using mbsync/isync. I also have a local "Archive" folder and this is
*not* synchronized with the IMAP server.
Periodically, using mu4e, I move older messages from the local "Done"
and "Sent" folders to the local "Archive" folder. On next synchronizing
with the IMAP server, these messages are effectively deleted from the
remote "Done" and "Sent" folders. This cuts down the amount of storage
that I need on the IMAP server, but does of course mean that I am wholly
responsible for backing-up messages in the local "Archive" folder.
I believe the key setting in my mu4e configuration is indeed
(setq mu4e-change-filenames-when-moving t)
If I understand correctly, this effectively "deletes" a message UID from
the local "Done" or "Sent" folder and creates a new one in the "Archive"
folder. Then
Expunge Both
in my .mbsyncrc file propagates the deletion to the IMAP server.
I must stress that YMMV. I am lucky in that the IMAP server provided by
my ISP is entirely "well-behaved", unlike some out there. I also tested
things extensively before invoking the "Expunge Both" command.
HTH
Luke