Perhaps the easiest way is to use Thunderbird, setup an IMAP account for the old account, and one for the new account in Thunderbird, and then just copy/move the emails from the old to the new. The old server will deliver the emails to Thunderbird, and Thunderbird will transfer the emails to the new server.