This commit is contained in:
Nick Bebout 2016-01-22 10:52:28 -06:00
parent c16227350f
commit 629adbb8db
113 changed files with 7581 additions and 43297 deletions

View file

@ -1,8 +1,11 @@
@REM $Id: imapsync_example.bat,v 1.7 2015/03/26 04:35:24 gilles Exp gilles $
@REM $Id: imapsync_example.bat,v 1.9 2016/01/21 03:34:51 gilles Exp gilles $
@REM imapsync example batch for Windows users
@REM lines beginning with @REM are just comments
@REM See http://imapsync.lamiral.info/#doc
@REM for more details on how to use imapsync.
@REM Replace below the 6 parameters
@REM "test1.lamiral.info" "test1" "secret1" "test2.lamiral.info" "test2" "secret2"
@REM with your own values
@ -20,8 +23,28 @@
@REM "this command continues on the next line". You can add other lines
@REM but don't forget ^ character lasting each line, except the last one.
@REM Three other options are in this example because they are good to start with
@REM
@REM --dry makes imapsync doing nothing, just print what would be done without --dry.
@REM
@REM --justfolders does only things about folders (ignore messages). It is good
@REM to verify the folder mapping is good for you.
@REM
@REM --automap guesses folders mapping, for folders like
@REM "Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
@REM
@REM I suggest to start with --automap --justfolders --dry.
@REM If the folder mapping is not good then add some --f1f2 folder1=folder2
@REM to fix it.
@REM Then remove --dry and have a run to create folders on host2.
@REM If everything goes well so far then remove --justfolders to
@REM start syncing messages.
.\imapsync.exe --host1 test1.lamiral.info --user1 test1 --password1 "secret1" ^
--host2 test2.lamiral.info --user2 test2 --password2 "secret2"
--host2 test2.lamiral.info --user2 test2 --password2 "secret2" ^
--automap --justfolders --dry
@PAUSE

View file

@ -1,9 +1,12 @@
#!/bin/sh
# $Id: imapsync_example.sh,v 1.3 2015/03/26 04:35:02 gilles Exp gilles $
# $Id: imapsync_example.sh,v 1.6 2016/01/21 03:35:15 gilles Exp gilles $
# imapsync example shell for Unix users
# lines beginning with # are just comments
# See http://imapsync.lamiral.info/#doc
# for more details on how to use imapsync.
# Replace below the 6 parameters
# "test1.lamiral.info" "test1" "secret1" "test2.lamiral.info" "test2" "secret2"
# with your own values
@ -21,7 +24,25 @@
# "this command continues on the next line". You can add other lines
# but don't forget \ character lasting each line, except the last one.
# Three other options are in this example because they are good to start with
#
# --dry makes imapsync doing nothing, just print what would be done without --dry.
#
# --justfolders does only things about folders (ignore messages). It is good
# to verify the folder mapping is good for you.
#
# --automap guesses folders mapping, for folders like
# "Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
#
# I suggest to start with --automap --justfolders --dry.
# If the folder mapping is not good then add some --f1f2 fold1=fold2
# to fix it.
# Then remove --dry and have a run to create folders on host2.
# If everything goes well so far then remove --justfolders to
# start syncing messages.
./imapsync --host1 test1.lamiral.info --user1 test1 --password1 'secret1' \
--host2 test2.lamiral.info --user2 test2 --password2 'secret2'
--host2 test2.lamiral.info --user2 test2 --password2 'secret2' \
--automap --justfolders --dry "$@"

View file

@ -0,0 +1,41 @@
#!/bin/sh
#
# $Id: sync_loop_darwin.sh,v 1.1 2015/12/10 22:24:57 gilles Exp gilles $
# Example for imapsync massive migration on Unix systems.
# See also http://imapsync.lamiral.info/FAQ.d/FAQ.Massive.txt
#
# Data is supposed to be in file.txt in the following format:
# host001_1;user001_1;password001_1;host001_2;user001_2;password001_2;
# ...
# Separator is character semi-colon ";" it can be changed by any character changing IFS=';'
# in the while loop below.
# # Each line contains 6 columns, columns are parameter values for
# --host1 --user1 --password1 --host2 --user2 --password2
# and a trailing empty fake column to avaid CR LF part going
# in the 6th parameter password2. Don't forget the last semicolon.
#
# You can add extra options after the variable "$@"
# Use character backslash \ at the end of each suplementary line, except for the last one.
# You can also pass extra options via the parameters of this script since
# they will be in "$@"
# The credentials filename "file.txt" used for the loop can be renamed
# by changing "file.txt" below.
echo Looping on account credentials found in file.txt
echo
{ while IFS=';' read h1 u1 p1 h2 u2 p2 fake
do
{ echo "$h1" | egrep "^#" ; } > /dev/null && continue # this skip commented lines in file.txt
echo "==== Starting imapsync from host1 $h1 user1 $u1 to host2 $h2 user2 $u2 ===="
../imapsync_bin_Darwin --host1 "$h1" --user1 "$u1" --password1 "$p1" \
--host2 "$h2" --user2 "$u2" --password2 "$p2" \
"$@"
echo "==== Ended imapsync from host1 $h1 user1 $u1 to host2 $h2 user2 $u2 ===="
echo
done
} < file.txt