5/1/2021 0 Comments Imapsync Massive Migration
To synchronize imap account foo on imap.truc.org to imap account bar on imap.trac.org with foo password secret1 and bar password secret2.The command imapsync is a tool allowing incremental and recursive imap transfer from one mailbox to another.We sometimes need to transfer mailboxes from one imap server to another.You can stop the transfer at any time and restart it later, imapsync works well with bad connections.
Imapsync Massive Migration Password Secret1 AndYou can decide to delete the messages from the source mailbox after a successful transfer, it can be a good feature when migrating live mailboxes since messages will be only one side. Option delete implies also option --expunge so all messages marked deleted on host1 will be really deleted. I dont see any good real world scenario for the combinaison --delete --noexpunge). You can also just synchronize a mailbox B from another mailbox A in case you just want to keep a live copy of A in B. In that case --delete2 can be used, it deletes messages in host2 folder B that are not in host1 folder A. Use offlineimap (written by John Goerzen) or mbsync (written by Michael R. It should now work, to test it you can use a command that show some basic info. At the time of writing the epel repository doesnt contain the latest version available, it is suggested to use following process. Of course you still need to write the pass file the password of your root user. For a massive migration could be easier and less prone to mistakes to create two files, one executable with command and switches (sync-lookup.sh) and the second only a text file (file.txt) with user, hosts and passwords ( never tried to use with it a password file as example above). Remember that with this method you MUST put switches on file sync-lookup-unix.sh and NOT on file.txt. For the same reason you cannot use it for a migration from multiple mail server with different user access configuration. You can use --passfile1 instead of --password1 to give the password since it is safer. With --password1 option any user on your host can see the password by using the ps auxwwww command. Using a variable (like PASSWORD1) is also dangerous because of the ps auxwwwwe command. So, saving the password in a well protected file (600 or rw-------) is the best solution. To get a description of each option just run imapsync like this.
0 Comments
Leave a Reply. |