mirror of
https://github.com/imapsync/imapsync.git
synced 2025-07-23 18:55:55 +02:00
1.670
This commit is contained in:
parent
f1987d5e52
commit
b7c835d670
134 changed files with 44448 additions and 2810 deletions
423
FAQ
423
FAQ
|
@ -1,5 +1,5 @@
|
|||
#!/bin/cat
|
||||
# $Id: FAQ,v 1.209 2015/05/09 20:53:23 gilles Exp gilles $
|
||||
# $Id: FAQ,v 1.216 2015/11/13 23:58:12 gilles Exp gilles $
|
||||
|
||||
+-------------------+
|
||||
| FAQs for imapsync |
|
||||
|
@ -65,21 +65,30 @@ R. Use md5sum to check integrity of the file.
|
|||
=======================================================================
|
||||
Q. How to install imapsync?
|
||||
|
||||
R. Read the INSTALL file in the tarball also available at
|
||||
R. Read the INSTALL files in the tarball also available at
|
||||
http://imapsync.lamiral.info/INSTALL
|
||||
http://imapsync.lamiral.info/INSTALL.d/
|
||||
|
||||
=======================================================================
|
||||
Q. How to configure and run imapsync?
|
||||
|
||||
R. Read the README and FAQ files in the tarball also available at
|
||||
R. Read the README, OPTIONS and FAQ files in the tarball also
|
||||
available at:
|
||||
http://imapsync.lamiral.info/README
|
||||
http://imapsync.lamiral.info/OPTIONS
|
||||
http://imapsync.lamiral.info/FAQ
|
||||
|
||||
=======================================================================
|
||||
Q. Can you give some configuration examples?
|
||||
|
||||
R. The FAQ file contains many examples for several scenarios
|
||||
http://imapsync.lamiral.info/FAQ
|
||||
R1. Basic usage is described there:
|
||||
http://imapsync.lamiral.info/#DOC_BASIC
|
||||
|
||||
imapsync --host1 test1.lamiral.info --user1 test1 --password1 secret1 \
|
||||
--host2 test2.lamiral.info --user2 test2 --password2 secret2
|
||||
|
||||
R2. The FAQ files contains many examples for several scenarios
|
||||
http://imapsync.lamiral.info/FAQ
|
||||
|
||||
=======================================================================
|
||||
Q. How can I have commercial support?
|
||||
|
@ -277,17 +286,24 @@ option --justfoldersizes (no transfer will be done)
|
|||
|
||||
|
||||
=======================================================================
|
||||
Q. I see warning messages like
|
||||
"Host1 Sent/15 size 1428 ignored (no header so we ignore this message)"
|
||||
Q. I see warning messages like the following:
|
||||
"Host1 Sent/15 size 1428 ignored (no header so we ignore this message.
|
||||
To solve this: use --addheader)".
|
||||
|
||||
What can I do to transfer those messages?
|
||||
|
||||
R1. Use --addheader option, it will add a header like
|
||||
"Message-Id: <15@imapsync>" and transfer the message on host2.
|
||||
Duplicates won't happen in next runs.
|
||||
|
||||
R1. Like suggested inline, use --addheader option.
|
||||
Option --addheader will add an header line like
|
||||
Message-Id: <15@imapsync>
|
||||
where 15 is the message UID number on host1.
|
||||
Then imapsync will transfer the changed message on host2.
|
||||
Duplicates won't happen on next runs.
|
||||
|
||||
imapsync ... --addheader
|
||||
|
||||
R2. Use --useuid then imapsync will avoid dealing with headers.
|
||||
R2. Other solution.
|
||||
Use --useuid then imapsync will avoid dealing with headers.
|
||||
|
||||
imapsync ... --useuid
|
||||
|
||||
|
@ -343,7 +359,7 @@ Q. How can I try imapsync with latest Mail::IMAPClient 3.xx perl module?
|
|||
Three solutions at least.
|
||||
|
||||
R1 - Look at the script named "i3" in the tarball, it can be used to
|
||||
run imapsync with the included Mail-IMAPClient-3.35/ wherever you
|
||||
run imapsync with the included Mail-IMAPClient-3.37/ wherever you
|
||||
unpacked the imapsync tarball
|
||||
|
||||
R2 Run:
|
||||
|
@ -367,10 +383,10 @@ R3 If you want to install the Perl module locally in a directory
|
|||
- run imapsync with perl and -I option tailing to use the perl
|
||||
module Mail-IMAPClient-3.xx. Example:
|
||||
|
||||
perl -I./Mail-IMAPClient-3.35/lib ./imapsync ...
|
||||
perl -I./Mail-IMAPClient-3.37/lib ./imapsync ...
|
||||
|
||||
or if imapsync is in directory /path/
|
||||
perl -I./Mail-IMAPClient-3.35/lib /path/imapsync ...
|
||||
perl -I./Mail-IMAPClient-3.37/lib /path/imapsync ...
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
@ -573,7 +589,12 @@ The file imapsync.pid contains the PID of the imapsync process.
|
|||
This file is removed at the end of a normal run.
|
||||
You can safely ignore the warning if you don't use imapsync.pid file.
|
||||
|
||||
=======================================================================
|
||||
Q. Quantifier in {,} bigger than 32766 in regex; marked by <-- HERE in
|
||||
m/(.{ <-- HERE 1,49947})(?:,|$)/ at Mail/IMAPClient.pm line 2121.
|
||||
|
||||
R. Do not use a bigger value than 3276 with --split1 or --split2
|
||||
|
||||
=======================================================================
|
||||
Q. Couldn't create [INBOX.Ops/foo/bar]: NO Invalid mailbox name:
|
||||
INBOX.Ops/foo/bar
|
||||
|
@ -628,63 +649,6 @@ R1. Use it with --subscribed
|
|||
R2. There is also the --subscribe_all option that subscribe
|
||||
to all folders on host2.
|
||||
|
||||
=======================================================================
|
||||
Q. Is there a way we can specify a date range to sync emails?
|
||||
If yes, can you please share an example?
|
||||
|
||||
R. Yes, with the --search option.
|
||||
|
||||
imapsync ... --search "SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010"
|
||||
|
||||
Jan
|
||||
Feb
|
||||
Mar
|
||||
Apr
|
||||
May
|
||||
Jun
|
||||
Jul
|
||||
Aug
|
||||
Sep
|
||||
Oct
|
||||
Nov
|
||||
Dec
|
||||
|
||||
=======================================================================
|
||||
Q. Is there a way we can specify an age to sync emails?
|
||||
If yes, can you please share some examples?
|
||||
|
||||
R. Yes, with the --maxage or the --minage option.
|
||||
|
||||
E.1 Sync only messages less than 2 days old:
|
||||
|
||||
imapsync ... --maxage 2
|
||||
|
||||
E.2 Sync only messages more than 2 days old:
|
||||
|
||||
imapsync ... --minage 2
|
||||
|
||||
E.3 Sync only messages more than 30 days old and less than 365 days old:
|
||||
|
||||
imapsync ... --minage 30 --maxage 365
|
||||
|
||||
E.4 Sync only messages less than 30 days old or more than 365 days old:
|
||||
|
||||
imapsync ... --maxage 30 --minage 365
|
||||
|
||||
Full explanation:
|
||||
|
||||
--maxage <int> : Skip messages older than <int> days.
|
||||
final stats (skipped) don't count older messages
|
||||
see also --minage
|
||||
--minage <int> : Skip messages newer than <int> days.
|
||||
final stats (skipped) don't count newer messages
|
||||
You can do (+ are the messages selected):
|
||||
past|----maxage+++++++++++++++>now
|
||||
past|+++++++++++++++minage---->now
|
||||
past|----maxage+++++minage---->now (intersection)
|
||||
past|++++minage-----maxage++++>now (union)
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. On Unix, some passwords contain * and " characters. Login fails.
|
||||
R. Use a backslash to escape the characters:
|
||||
|
@ -1056,12 +1020,12 @@ b) Replace manually the whitespace by a colon in string "From " but you
|
|||
header lines of the message)
|
||||
|
||||
c) Run imapsync with the following option (this replaces "From "by "From:"):
|
||||
--regexmess 's/\AFrom /From:/'
|
||||
--regexmess 's/\AFrom /From: /'
|
||||
|
||||
or may be better (no other "From:" collision):
|
||||
|
||||
d) Run imapsync with the following option (this replaces "From "by "X-om:"):
|
||||
--regexmess 's/\AFrom /X-om:/'
|
||||
--regexmess 's/\AFrom /X-From: /'
|
||||
|
||||
e) Run imapsync with the following option (this removes the whole "From " line):
|
||||
--regexmess 's{\AFrom\ [^\n]*(\n)?}{}gxms'
|
||||
|
@ -1087,319 +1051,6 @@ using the same server, we can use $from->copy Therefore we seem to not
|
|||
download and upload the message and therefore we do not have any
|
||||
format issues. And now it works fine. (Thanks to Hansjoerg.Maurer)
|
||||
|
||||
=======================================================================
|
||||
Server specific issues and solutions
|
||||
=======================================================================
|
||||
|
||||
=======================================================================
|
||||
Q. From Zimbra to XXX
|
||||
|
||||
imapsync ... \
|
||||
--exclude "Conversation Action Settings" \
|
||||
--exclude "Quick Step Settings" \
|
||||
--exclude "News Feed"
|
||||
|
||||
=======================================================================
|
||||
Q. From or to HMailServer version 4.4.1.
|
||||
|
||||
R. You have to add prefix and separator manually because 4.4.1 doesn't
|
||||
honor the NAMESPACE imap command.
|
||||
|
||||
Example for host1:
|
||||
|
||||
imapsync ... \
|
||||
--prefix1 "" --sep1 .
|
||||
|
||||
No specific option for HMailServer 5.3.3 since NAMESPACE is supported.
|
||||
|
||||
Maybe --subscribe_all will help you to see all migrated folders.
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. Synchronizing from Kerio Connect to XXX
|
||||
|
||||
R. No special options required.
|
||||
See also:
|
||||
http://www.linux-france.org/prj/imapsync_list/msg01756.html
|
||||
http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-1/
|
||||
http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-2/
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. Synchronizing from SmarterMail to XXX
|
||||
|
||||
imapsync --host1 imap.d1.org --user1 joe --password1 secret1 --sep1 "/" \
|
||||
--host2 imap.d2.org --user2 joe --password2 secret2 \
|
||||
--prefix1 "" \
|
||||
--regextrans2 "s#Sent Items$#Sent#" \
|
||||
--dry --justfolders
|
||||
|
||||
Maybe add other --regextrans2 to change folder names and see the result.
|
||||
When satisfied, run without --dry --justfolders
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. Synchronizing from Yahoo to XXX
|
||||
|
||||
R. Use --host1 imap.mail.yahoo.com --sep1 '/'
|
||||
|
||||
./imapsync \
|
||||
--host1 imap.mail.yahoo.com \
|
||||
--user1 billy \
|
||||
--password1 secret \
|
||||
--host2 XXX \
|
||||
--user2 billy \
|
||||
--password2 secret \
|
||||
--sep1 '/'
|
||||
|
||||
Can also add --ssl1 to gain encrypted transfer from yahoo.
|
||||
SSL seems to be mandatory for yahoo (since november 2011)
|
||||
|
||||
=======================================================================
|
||||
Q. from Microsoft's Exchange 2007 to Google Apps for your Domain
|
||||
(GAFYD)
|
||||
|
||||
R. Take a look at:
|
||||
http://mark.ossdl.de/2009/02/migrating-from-exchange-2007-to-google-apps-mail/
|
||||
|
||||
=======================================================================
|
||||
Q. Syncing from Google Apps domain to Googlemail account
|
||||
|
||||
A known bug encountered with this output (Alexander is a folder name):
|
||||
|
||||
++++ Verifying [Alexander] -> [Alexander] ++++
|
||||
+ NO msg #16 [A96Dh4AwlLVphOAW5MS/eQ:779824] in Alexander
|
||||
+ Copying msg #16:779824 to folder Alexander
|
||||
flags from : [\Seen]["04-Jul-2007 14:32:22 +0100"]
|
||||
Couldn't append msg #16 (Subject:[Rieter-Event (please accept with
|
||||
comments)]) to folder Alexander: 46 NO Invalid folder: Sent (Failure)
|
||||
|
||||
In fact folder "Sent" is just the last folder listed previously
|
||||
as a:
|
||||
...
|
||||
To Folder [Sent] does not exist yet
|
||||
To Folder [Sonja] Size: 1024546 Messages: 96
|
||||
...
|
||||
|
||||
R. Just run imapsync a time like this :
|
||||
imapsync ... --folder Alexander
|
||||
|
||||
=======================================================================
|
||||
Q. Migrating from or to Parallels Plex Server
|
||||
|
||||
R. It depends on the OS
|
||||
|
||||
Parallells Plesk Panel for Windows requires --sep2 / --prefix2 ""
|
||||
Parallells Plesk Panel for Linux works with default parameters.
|
||||
|
||||
=======================================================================
|
||||
Q. I'm migrating from WU to Cyrus, and the mail folders are under
|
||||
/home/user/mail but the tool copies everything in /home/user, how
|
||||
can i avoid that?
|
||||
|
||||
Two solutions:
|
||||
|
||||
R. Use
|
||||
imapsync ... --include '^mail'
|
||||
|
||||
R. or (better)
|
||||
imapsync ... --subscribed --subscribe
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. I'm migrating from WU to Cyrus, and the mail folders are under
|
||||
/home/user/mail directory. When imapsync creates the folders in
|
||||
the new cyrus imap server, it makes a folder "mail" and below that
|
||||
folder puts all the mail folders the user have in /home/user/mail,
|
||||
i would like to have all those folders directly under INBOX.
|
||||
|
||||
R. Use
|
||||
imapsync ... --regextrans2 's/^mail/INBOX/' --dry
|
||||
look at the simulation and if all transformations seem
|
||||
good then remove the --dry option.
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. Migrating from Groupwise to Cyrus
|
||||
|
||||
R. By Jamie Neil:
|
||||
|
||||
I eventually managed to get the mail to migrate without errors using the
|
||||
following options:
|
||||
|
||||
--sep1 /
|
||||
- doesn't report separator so has to be set explicitly.
|
||||
|
||||
--nosyncacls
|
||||
- doesn't support ACLs.
|
||||
|
||||
--skipheader '^Content-Type'
|
||||
- MIME separator IDs seem to change every time a mail is accessed so
|
||||
this is required to stop duplicates.
|
||||
|
||||
--maxage 3650
|
||||
- some messages just don't seem to want to transfer and produce the
|
||||
perl errors I mentioned before. This prevents the errors, but the
|
||||
bad messages don't transfer.
|
||||
|
||||
Even though the mail migrated OK, there are a couple of gotchas with
|
||||
Groupwise IMAP:
|
||||
|
||||
1) Some of the GW folders are not real folders and are not available
|
||||
to IMAP, the main problem one being "Sent Items". I could find no way
|
||||
of coping the contents of these folders. The nearest I got was to
|
||||
create a "real" folder and copy/move the sent items into it, but
|
||||
imapsync still didn't see the messages (I think because there is
|
||||
something funny about the reported dates/sizes).
|
||||
|
||||
It think this problem has been rectified in GW6.5.
|
||||
|
||||
2) The "skipheader '^Content-Type'" directive is required to stop
|
||||
duplicate messages being created. GW seems to generate this field on
|
||||
the fly for messages that have MIME separators and so it's different
|
||||
every time.
|
||||
|
||||
3) Version 6.0.1 of the Groupwise Internet Connector sucks. I was
|
||||
getting server aborts when I pushed it a bit hard! I eventually had to
|
||||
upgrade to 6.0.4 which seems to be a lot more stable.
|
||||
|
||||
|
||||
=======================================================================
|
||||
Q. Migrating from iPlanet Messaging Server
|
||||
5.2 Patch 2 (built Jul 14 2004)) to Groupwise 7.0
|
||||
I encounter many errors like this:
|
||||
"Error trying to append string: 17847 BAD APPEND"
|
||||
|
||||
R. GroupWise 7 seems buggy. Apply GroupWise 7 support pack 1
|
||||
|
||||
=======================================================================
|
||||
Q. Migrating from David Tobit V10 (DvISE Mail Access Server MA-...)
|
||||
|
||||
R. Use the following options:
|
||||
|
||||
imapsync ... --prefix1 "" --sep1 / --idatefromheader ^
|
||||
--nofoldersizes --useuid --nocheckmessageexists
|
||||
|
||||
=======================================================================
|
||||
Q. Migrating from David Tobit V8
|
||||
("* OK IMAP4rev1 DvISE Mail Access Server MA-8.10a (0126)")
|
||||
|
||||
First try above V10 solution since improvments have been made
|
||||
to support Tobit.
|
||||
|
||||
R. Use the following options :
|
||||
imapsync ... --prefix1 INBOX. --sep1 / --subscribe --subscribed
|
||||
|
||||
=======================================================================
|
||||
Q. Migrating from Tobit David Server 6
|
||||
("DvISE Mail Access Server MA-6.60a (0118)")
|
||||
|
||||
First try above V10 solution since improvments have been made
|
||||
to support Tobit.
|
||||
|
||||
R. Look at the discussion:
|
||||
http://www.linux-france.org/prj/imapsync_list/msg00582.html
|
||||
http://www.linux-france.org/prj/imapsync_list/threads.html#00582
|
||||
patch saved in ./patches/imapsync-1.337_tobit_V6.patch
|
||||
|
||||
=======================================================================
|
||||
Q. I need to migrate 1250 mailboxes, passwords are in a MySQL Database.
|
||||
Can you tell me if your script suits my needs?
|
||||
|
||||
R. Mailboxes must exist before running imapsync.
|
||||
You have to extract users logins and passwords in a csv file.
|
||||
See the "HUGE MIGRATION" section in the README file.
|
||||
|
||||
|
||||
======================================================================
|
||||
Q: From MailEnable 1.75
|
||||
R: --sep1 "/" --prefix1 ""
|
||||
|
||||
Q: From MailEnable 2.2
|
||||
R: --sep1 "." --prefix1 ""
|
||||
|
||||
Q: To MailEnable
|
||||
R: --sep2 / --prefix2 "" --addheader --messageidnodomain --syncflagsaftercopy
|
||||
|
||||
======================================================================
|
||||
Q. From GMX IMAP4 StreamProxy
|
||||
R. Use:
|
||||
--prefix1 INBOX and --sep1 .
|
||||
|
||||
======================================================================
|
||||
Q. From Courier to Archiveopteryx
|
||||
R. You can read http://www.archiveopteryx.org/migration/imapsync
|
||||
Default values might be fine now with latest imapsync.
|
||||
|
||||
======================================================================
|
||||
Q. To Sun Java(tm) System Messaging Server 6.2-7.05
|
||||
Q. To Communigate Pro - Solaris version
|
||||
|
||||
R. See and run patches/imapsync_1.267_jari
|
||||
|
||||
|
||||
======================================================================
|
||||
Q. From Softalk Workgroup Mail 7.6.4
|
||||
|
||||
R. Old Softalk releases don't support the IMAP SEARCH command.
|
||||
Here are the options to get it working.
|
||||
|
||||
imapsync ... --sep1 '.' --prefix1 '' \
|
||||
--noabletosearch --nocheckmessageexists --addheader
|
||||
|
||||
(Thanks to Andrew Tucker)
|
||||
|
||||
======================================================================
|
||||
Q. From or to QQMail IMAP4Server
|
||||
|
||||
R. imapsync ... --noabletosearch
|
||||
|
||||
======================================================================
|
||||
Q. From FirstClass to XXX
|
||||
http://www.firstclass.com/
|
||||
|
||||
R. Migrating from FirstClass is not easy because FirstClass, strangely,
|
||||
does not show all messages via IMAP. To make it show all messages,
|
||||
a trick, painful to follow by hand, is moving emails
|
||||
out and back in, for each folder. May be it can be done by a script.
|
||||
|
||||
FirstClass releases prior to release 12 do not shows the "Sent"
|
||||
folder in IMAP but FirstClass release 12 shows it.
|
||||
I advice you to upgrade to FirstClass release 12 before leaving it
|
||||
with imapsync or another imap tool.
|
||||
|
||||
Here is a command line used to migrate from FirtClass release 12:
|
||||
|
||||
imapsync ... \
|
||||
--tmpdir /var/tmp --usecache \
|
||||
--useheader Message-ID \
|
||||
--idatefromheader \
|
||||
--addheader \
|
||||
--regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g" \
|
||||
--regextrans2 "s/[\^]/_/g" \
|
||||
--regextrans2 "s/['\"\\\\]/_/g" \
|
||||
--regextrans2 "s,&AC8-,-,g" \
|
||||
--regextrans2 "s,&APg-,oe,g"
|
||||
|
||||
On Windows, in the previous example containing \$1 you have to
|
||||
replace the two \$1 by $1 (remove the \ before $).
|
||||
|
||||
Special thanks to Kristian Wind and Joey Alexander for helping me
|
||||
writing this FAQ item.
|
||||
See also this worth reading discussion in a Zimbra forum:
|
||||
http://www.zimbra.com/forums/migration/20349-help-needed-migrating-firstclass.html
|
||||
|
||||
======================================================================
|
||||
Q. From XXX to FTGate
|
||||
|
||||
R. Do NOT use --usecache since new UIDs are not given by FTGate and also
|
||||
badly guessed by imapsync. UIDEXPUNGE does not work so use also
|
||||
--expunge2 when using --delete2
|
||||
|
||||
imapsync ... \
|
||||
--sep2 / --prefix2 "" \
|
||||
--useheader Message-Id \
|
||||
|
||||
|
||||
======================================================================
|
||||
Q: How can I write an .rpm with imapsync
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue