imapsync is a convenient CLI tool that allows migration of emails from one inbox / server to another while using the IMAP protocol.
The author of this tool decided to sell the sources for 50 bucks.. someone bought the sources pushes it on Github .. because imapsync isn’t available in Debian’s repositories anymore.