Moving a large amount of mail to a different account

Thomas Raschbacher <[email protected]> Fri, 14 Jul 2017 13:17:19 +0200
Newsgroups gmane.mail.imap.dbmail
Message-ID <[email protected]>
hi.

I am considering moving a large amount of older emails to a seperate
account (for Archiving reasons).
Is there an easy way (maybe in the DB directly) to do this instead of
using an imap client (or maybe writing something simple in python )

Also I'd want to maybe merge some folders (probably ignoring duplicates
for the moment

-- the reason I want to do this is because that account is hardly
useable anymore with (especially) webmail clients, because it has > 3500
IMAP folders

Regards,
  Thomas Raschbacher