imapsync

Migrate or backup IMAP mail accounts between servers

brewmacoslinux
Try with needOr install directly
Source

About

Migrate or backup IMAP mail accounts

Commands

imapsync

Examples

Sync mail from one server to another with credentials$ imapsync --host1 imap.source.com --user1 user@source.com --password1 pass1 --host2 imap.dest.com --user2 user@dest.com --password2 pass2
Backup specific folders from a Gmail account$ imapsync --host1 imap.gmail.com --user1 user@gmail.com --password1 apppass --host2 localhost --user2 backup --password2 backuppass --folderlist INBOX,Drafts,Sent
Sync with SSL/TLS encryption and dry-run mode$ imapsync --host1 imap.example.com --user1 user1 --password1 pass1 --host2 imap.backup.com --user2 user2 --password2 pass2 --ssl1 --ssl2 --dry