Hi Chris, On Sat, Oct 15, 2022 at 06:29:37PM +0100, Chris Green wrote:
I'm now considering using mutt to move some IMAP folders from one server to another, both IMAP servers will be remote. Is this a sensible idea or should I look for a specialised tool?
I have ocasionally used Mutt with more than one IMAP server at the same time, so I'm quite confident that could be done with just Mutt. I would use Imapfilter, though, which I believe would be a more appropriate tool for that. It would take very minimal configuration, just the servers configuration (account1 and account2) and a couple of lines for the origin and destination folders, something like: messages = account1["INBOX"]:select_all() messages:copy_messages(account2["INBOX"]) to copy everything to the new server, or to move it, replacing the second line with something like this one: messages:move_messages(account2["INBOX"])
It's only a one off requirement, once it's done I won't be using mutt with IMAP again. It just seems that as I'm fairly familiar with mutt it might be the easiest way to do this. It's only five or six accounts I want to move, with only a few (mostly just the default ones) IMAP folders.
Since you say you never use Mutt with IMAP, I asume you either already have your mail locally or you will want to fetch it later. So, another very good way to do the move from one IMAP server to another one would be using mbsync (iSync), which is desined to synchronise IMAP folders. I would first mbsync the folders in the origin server to localhost folders and then localhost folders to the destination server. I hope any of the two alternatives help, should you decide use a dedicated tool instead of doing the move with Mutt. Cheers, Ángel