Here are a few ways you can migrate emails without knowing the IMAP credentials.
- Use the Admin Password.
- Migrate emails using SFTP.
- Import/Export using RoundCube?
Use the Admin Password
Some email services allow you to use the administrator password to sign into any email account. This allows you to move emails without knowing the users password.
You can refer to this FAQ on the imapsync website.
https://imapsync.lamiral.info/FAQ.d/FAQ.Admin_Authentication.txt
Migrating Files using SFTP
Disclaimer:
This option will only work if you have ftp/ssh/filesystem access.
Depending on email volume, you could miss emails that arrive during the transition.
If possible, it is recommended to use something like imapsync.
There could be format issues if the two email servers use different mailbox formats and/or email server software.
Emails are usually stored in the users home directory. Depending on the hosting provider, it could be /mail
or ~/mail
You can zip up the mail directory and then unzip on the target server. This would only work if you have access to the filesystem. Create your email accounts before unzipping.
You could transfer the passwd and shadow files to keep the email passwords the same. Again, create the email addresses on the target server first and then either overwrite, or merge the differences between the shadow and passwd files.
For example, on cPanel servers, the mail directory is in ~/mail
and the shadow and passwd files are in ~/etc/DOMAIN.COM
If you are logged in as root, you will need to change ~/
to /home/USER/
substituting USER for the actual cPanel user.
Import/Export messages from RoundCube?
You can import and export emails using the RoundCube webmail interface. However, the export is limited to one. message. at. a. time. This could work for a handful of messages, but can get quite tedious if you have a large number of emails.