As my new mailserver has been working great, I was looking for a way to migrate the mail off my old servers onto this one. I tried various times in Thunderbird, but the process seemed clunky and unreliable – especially when you have 10,000’s of messages to migrate. Looking around I found the following:

imapsync is a 21,000 line Perl script and it works amazingly well. If you ever need to move email around using IMAP, this is the tool. Could this tool be used to delete old Gmail messages??? I’ve yet to find a good solution to that problem …

So I now have ~200,000 messages on my new mailserver and I can shut down the old servers. So far, NixOS mail server and Thunderbird is handling this very well.