Imapsync

#backups #imapsync

A similar command to what I use to keep a copy of my email on another server.

imapsync \
  --host1 imap1.example.com --ssl1 --port1 993 \
  --user1 [email protected] --passfile1 ~/login1 \
  --host2 imap2.example.com --ssl2 --port2 993 \
  --user2 [email protected] --passfile2 ~/login2 \
  --syncinternaldates --tmpdir /tmp --addheader --useuid \
  --no-modules_version --disarmreadreceipts \
  --regextrans2 's/Sent Items$/Sent/' \
  --regextrans2 's/Junk Email$/Junk/' \
  --regextrans2 's/Deleted Items$/Deleted/'

The regextrans2 switches can be used to translate folders on the second host to that of the first one.