Migrate Emails using imapcopy

imapcopy is a program to copy mails from one IMAP mailbox to another. I was using this for email migrations. But for a large mailbox with 9300 mails, this failed. So i looked for alternatives. I installed imapsync, it was little annoying to install as it need lot of other packages installed for it to work. But imapsync worked better than imapcopy.

To instal imapcopy on Ubuntu/Debian, run

apt install imapcopy

To migrate mailbox, create a file

Advertisement

vi ImapCopy.cfg

Create config file

SourceServer SOURCE_SERVER_IP
SourcePort 143
DestServer DESTINATION_SERVER_IP
DestPort 143
skipfolder INBOX.Trash
skipfolder INBOX.Spam
Copy "source-user1@domain.com" "SOURCE_PASSWORD" "dest-user1@domain.com" "DEST_PASSWORD"

In above file, replace SOURCE and DESTINATION server IP, user and passwords.

To start the email migration, run

imapcopy

You can test the config with command

imapcopy -t
imapcopy -i

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement