This commit is contained in:
Nick Bebout 2019-07-02 18:17:46 -05:00
parent eafd200ec0
commit 62531f58cd
300 changed files with 9212 additions and 88495 deletions

View file

@ -133,18 +133,18 @@
.\" ========================================================================
.\"
.IX Title "IMAPSYNC 1"
.TH IMAPSYNC 1 "2018-05-05" "perl v5.22.1" "User Contributed Perl Documentation"
.TH IMAPSYNC 1 "2019-02-09" "perl v5.22.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
imapsync \- Email IMAP tool for syncing, copying and migrating
email mailboxes between two imap servers, one way,
imapsync \- Email IMAP tool for syncing, copying and migrating
email mailboxes between two imap servers, one way,
and without duplicates.
.SH "VERSION"
.IX Header "VERSION"
This documentation refers to Imapsync \f(CW$Revision:\fR 1.882 $
This documentation refers to Imapsync \f(CW$Revision:\fR 1.920 $
.SH "USAGE"
.IX Header "USAGE"
.Vb 5
@ -166,23 +166,23 @@ one another.
Imapsync command is a tool allowing incremental and
recursive imap transfers from one mailbox to another.
.PP
By default all folders are transferred, recursively, meaning
the whole folder hierarchy is taken, all messages in them,
and all messages flags (\eSeen \eAnswered \eFlagged etc.)
By default all folders are transferred, recursively, meaning
the whole folder hierarchy is taken, all messages in them,
and all messages flags (\eSeen \eAnswered \eFlagged etc.)
are synced too.
.PP
Imapsync reduces the amount of data transferred by not transferring
Imapsync reduces the amount of data transferred by not transferring
a given message if it resides already on both sides.
.PP
Same specific headers and the transfer is done only once.
By default, the identification headers are
\&\*(L"Message-Id:\*(R" and \*(L"Received:\*(R" lines
Same specific headers and the transfer is done only once.
By default, the identification headers are
\&\*(L"Message-Id:\*(R" and \*(L"Received:\*(R" lines
but this choice can be changed with the \-\-useheader option.
.PP
All flags are preserved, unread messages will stay unread,
All flags are preserved, unread messages will stay unread,
read ones will stay read, deleted will stay deleted.
.PP
You can stop the transfer at any time and restart it later,
You can stop the transfer at any time and restart it later,
imapsync works well with bad connections and interruptions,
by design.
.PP
@ -194,7 +194,7 @@ In that case, use the \-\-delete1 option. Option \-\-delete1 implies
also option \-\-expunge1 so all messages marked deleted on host1
will be really deleted.
.PP
You can also decide to remove empty folders once all of their
You can also decide to remove empty folders once all of their
messages have been transferred. Add \-\-delete1emptyfolders to
obtain this behavior.
.PP
@ -217,7 +217,7 @@ Michael R. Elkins) for a 2 ways synchronization.
.Ve
.PP
Mandatory options are the six values, three on each sides,
needed to log in into the \s-1IMAP\s0 servers, ie,
needed to log in into the \s-1IMAP\s0 servers, ie,
a host, a username, and a password, two times.
.PP
Conventions used:
@ -228,20 +228,20 @@ Conventions used:
\& reg means regular expression
\& cmd means command
\&
\& \-\-dry : Makes imapsync doing nothing for real, just print what
\& \-\-dry : Makes imapsync doing nothing for real, just print what
\& would be done without \-\-dry.
.Ve
.SS "OPTIONS/credentials"
.IX Subsection "OPTIONS/credentials"
.Vb 5
\& \-\-host1 str : Source or "from" imap server. Mandatory.
\& \-\-port1 int : Port to connect on host1.
\& \-\-port1 int : Port to connect on host1.
\& Optional since default port is 143 or 993 if \-\-ssl1
\& \-\-user1 str : User to login on host1. Mandatory.
\& \-\-password1 str : Password for the user1.
\&
\& \-\-host2 str : "destination" imap server. Mandatory.
\& \-\-port2 int : Port to connect on host2.
\& \-\-port2 int : Port to connect on host2.
\& Optional since default port is 143 or 993 if \-\-ssl2
\& \-\-user2 str : User to login on host2. Mandatory.
\& \-\-password2 str : Password for the user2.
@ -255,6 +255,9 @@ Conventions used:
\& the password on the command line like \-\-password1 does.
\& \-\-passfile2 str : Password file for the user2. Contains the password.
.Ve
.PP
You can also pass the passwords in the environment variables
\&\s-1IMAPSYNC_PASSWORD1\s0 and \s-1IMAPSYNC_PASSWORD2\s0
.SS "OPTIONS/encryption"
.IX Subsection "OPTIONS/encryption"
.Vb 2
@ -339,10 +342,11 @@ Conventions used:
\& \-\-f1f2 str1=str2 : Force folder str1 to be synced to str2,
\& \-\-f1f2 overrides \-\-automap and \-\-regextrans2.
\&
\& \-\-subfolder2 str : Move whole host1 folders hierarchy under this
\& host2 folder str .
\& It does it by adding two \-\-regextrans2 options before
\& all others. Add \-\-debug to see what\*(Aqs really going on.
\& \-\-subfolder2 str : Syncs the whole host1 folders hierarchy under the
\& host2 folder named str.
\& (It does it internally by adding two
\& \-\-regextrans2 options before all others.
\& Add \-\-debug to see what\*(Aqs really going on.)
\&
\& \-\-subscribed : Transfers subscribed folders.
\& \-\-subscribe : Subscribe to the folders transferred on the
@ -373,7 +377,7 @@ Conventions used:
.Vb 5
\& \-\-nofoldersizes : Do not calculate the size of each folder at the
\& beginning of the sync. Default is to calculate them.
\& \-\-nofoldersizesatend: Do not calculate the size of each folder at the
\& \-\-nofoldersizesatend: Do not calculate the size of each folder at the
\& end of the sync. Default is to calculate them.
\& \-\-justfoldersizes : Exit after having printed the initial folder sizes.
.Ve
@ -426,7 +430,7 @@ Conventions used:
\& \-\-resyncflags : Resync flags for already transferred messages.
\& On by default.
\& \-\-noresyncflags : Do not resync flags for already transferred messages.
\& May be useful when a user has already started to play
\& May be useful when a user has already started to play
\& with its host2 account.
.Ve
.SS "OPTIONS/deletions"
@ -498,7 +502,7 @@ Conventions used:
\& command. Applied on both sides.
\& For a complete of what can be search see
\& https://imapsync.lamiral.info/FAQ.d/FAQ.Messages_Selection.txt
\&
\&
\& \-\-search1 str : Same as \-\-search but for selecting host1 messages only.
\& \-\-search2 str : Same as \-\-search but for selecting host2 messages only.
\& \-\-search CRIT equals \-\-search1 CRIT \-\-search2 CRIT
@ -520,10 +524,14 @@ Conventions used:
.Ve
.SS "OPTIONS/miscellaneous"
.IX Subsection "OPTIONS/miscellaneous"
.Vb 3
.Vb 7
\& \-\-syncacls : Synchronizes acls (Access Control Lists).
\& \-\-nosyncacls : Does not synchronize acls. This is the default.
\& Acls in IMAP are not standardized, be careful.
\& \-\-addheader : When a message has no headers to be identified,
\& \-\-addheader adds a "Message\-Id" header,
\& like "Message\-Id: 12345@imapsync", where 12345
\& is the imap UID of the message on the host1 folder.
.Ve
.SS "OPTIONS/debugging"
.IX Subsection "OPTIONS/debugging"
@ -550,13 +558,13 @@ Conventions used:
.Vb 2
\& \-\-gmail1 : sets \-\-host1 to Gmail and options from FAQ.Gmail.txt
\& \-\-gmail2 : sets \-\-host2 to Gmail and options from FAQ.Gmail.txt
\&
\&
\& \-\-office1 : sets \-\-host1 to Office365 options from FAQ.Exchange.txt
\& \-\-office2 : sets \-\-host2 to Office365 options from FAQ.Exchange.txt
\&
\& \-\-exchange1 : sets options from FAQ.Exchange.txt, account1 part
\& \-\-exchange2 : sets options from FAQ.Exchange.txt, account2 part
\&
\&
\& \-\-domino1 : sets options from FAQ.Domino.txt, account1 part
\& \-\-domino2 : sets options from FAQ.Domino.txt, account2 part
.Ve
@ -564,15 +572,15 @@ Conventions used:
.IX Subsection "OPTIONS/behavior"
.Vb 1
\& \-\-maxmessagespersecond int : limits the number of messages transferred per second.
\&
\&
\& \-\-maxbytespersecond int : limits the average transfer rate per second.
\& \-\-maxbytesafter int : starts \-\-maxbytespersecond limitation only after
\& \-\-maxbytesafter int : starts \-\-maxbytespersecond limitation only after
\& \-\-maxbytesafter amount of data transferred.
\&
\&
\& \-\-maxsleep int : do not sleep more than int seconds.
\& On by default, 2 seconds max, like \-\-maxsleep 2
\&
\& \-\-abort : terminates a previous call still running.
\& \-\-abort : terminates a previous call still running.
\& It uses the pidfile to know what process to abort.
\&
\& \-\-exitwhenover int : Stop syncing when total bytes transferred reached.
@ -608,12 +616,12 @@ dangerous because of the 'ps auxwwwwe' command. So, saving
the password in a well protected file (600 or rw\-\-\-\-\-\-\-) is
the best solution.
.PP
Imapsync activates ssl or tls encryption by default, if possible.
What detailed behavior is under this \*(L"if possible\*(R"?
Imapsync activates ssl if the well known port imaps port (993) is open
on the imap servers. If the imaps port is closed then it open a
normal (clear) connection on port 143 but it looks for \s-1TLS\s0 support
in the \s-1CAPABILITY\s0 list of the servers. If \s-1TLS\s0 is supported
Imapsync activates ssl or tls encryption by default, if possible.
What detailed behavior is under this \*(L"if possible\*(R"?
Imapsync activates ssl if the well known port imaps port (993) is open
on the imap servers. If the imaps port is closed then it open a
normal (clear) connection on port 143 but it looks for \s-1TLS\s0 support
in the \s-1CAPABILITY\s0 list of the servers. If \s-1TLS\s0 is supported
then imapsync goes to encryption.
.PP
If the automatic ssl/tls detection fails then imapsync will
@ -655,7 +663,7 @@ Feedback good or bad is very often welcome.
Gilles \s-1LAMIRAL\s0 earns his living by writing, installing,
configuring and teaching free, open and often gratis
software. Imapsync used to be \*(L"always gratis\*(R" but now it is
only \*(L"often gratis\*(R" because imapsync is sold by its author,
only \*(L"often gratis\*(R" because imapsync is sold by its author,
a good way to maintain and support free open public
software over decades.
.SH "BUGS AND LIMITATIONS"
@ -719,13 +727,13 @@ https://imapsync.lamiral.info/examples/
.IX Header "INSTALL"
.Vb 1
\& Imapsync works under any Unix with perl.
\&
\&
\& Imapsync works under most Windows (2000, XP, Vista, Seven, Eight, Ten
\& and all Server releases 2000, 2003, 2008 and R2, 2012 and R2)
\& as a standalone binary software called imapsync.exe,
\& usually launched from a batch file in order to avoid always typing
\& usually launched from a batch file in order to avoid always typing
\& the options.
\&
\&
\& Imapsync works under OS X as a standalone binary
\& software called imapsync_bin_Darwin
\&
@ -761,7 +769,7 @@ Feel free to hack imapsync as the \s-1NOLIMIT\s0 license permits it.
\&
\& imap_tools : https://github.com/andrewnimmo/rick\-sanders\-imap\-tools
\& offlineimap : https://github.com/nicolas33/offlineimap
\& Doveadm\-Sync : http://wiki2.dovecot.org/Tools/Doveadm/Sync
\& Doveadm\-Sync : http://wiki2.dovecot.org/Tools/Doveadm/Sync
\& ( Dovecot sync tool )
\& mbsync : http://isync.sourceforge.net/
\& mailsync : http://mailsync.sourceforge.net/
@ -783,11 +791,11 @@ Feedback (good or bad) will often be welcome.
.IX Header "HISTORY"
I wrote imapsync because an enterprise (basystemes) paid me to install
a new imap server without losing huge old mailboxes located in a far
away remote imap server, accessible by a low-bandwidth often broken link.
away remote imap server, accessible by a low-bandwidth often broken link.
The tool imapcp (written in python) could not help me because I had to verify
every mailbox was well transferred, and then delete it after a good
transfer. Imapsync started its life as a patch of the copy_folder.pl
transfer. Imapsync started its life as a patch of the copy_folder.pl
script. The script copy_folder.pl comes from the Mail\-IMAPClient\-2.1.3 perl
module tarball source (more precisely in the examples/ directory of the
Mail-IMAPClient tarball). So many happened since then that I wonder
module tarball source (more precisely in the examples/ directory of the
Mail-IMAPClient tarball). So many happened since then that I wonder
if it remains any lines of the original copy_folder.pl in imapsync source code.