This commit is contained in:
Nick Bebout 2011-03-12 02:44:26 +00:00
parent e5636b5d0c
commit f79724c166
9 changed files with 124 additions and 23 deletions

View file

@ -2,6 +2,11 @@
I thank very much all of these people. I thank very much all of these people.
Stephen Weir
Made a successful migration from
"Scalix" to "Eudora WorldMail v2"
Gave the good option for success (see FAQ)
Kjetil Torgrim Homme Kjetil Torgrim Homme
Gave a jumbo patch adding Gave a jumbo patch adding
--authuser --authuser

View file

@ -1,15 +1,29 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 1.172 head: 1.175
branch: branch:
locks: strict locks: strict
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 172; selected revisions: 172 total revisions: 175; selected revisions: 175
description: description:
---------------------------- ----------------------------
revision 1.175
date: 2006/06/08 00:52:00; author: gilles; state: Exp; lines: +28 -9
Added --regexflag option to remove "bad" flags when needed.
----------------------------
revision 1.174
date: 2006/06/07 22:17:37; author: gilles; state: Exp; lines: +6 -6
Scalix release
----------------------------
revision 1.173
date: 2006/05/31 11:48:24; author: gilles; state: Exp; lines: +10 -6
Updated "IMAP SERVERS" success list:
- Added Scalix
- Added Eudora WorldMail v2
----------------------------
revision 1.172 revision 1.172
date: 2006/05/09 23:06:29; author: gilles; state: Exp; lines: +10 -5 date: 2006/05/09 23:06:29; author: gilles; state: Exp; lines: +10 -5
Added split value 1000 by default Added split value 1000 by default

9
FAQ
View file

@ -30,6 +30,15 @@ Solutions:
a) Don't use buggy Eudora. a) Don't use buggy Eudora.
b) Use the --syncinternaldates option and keep using Eudora :-) b) Use the --syncinternaldates option and keep using Eudora :-)
=======================================================================
Q. imapsync failed with a "word too long" error from the imap server,
What can I do ?
R. Use imapsync release 1.172 or at least 1.166 with options
--split1 500 --split2 500
or a old old imapsync (before 1.94)
======================================================================= =======================================================================
Q. Does imapsync support IMAP over TLS (IMAPS)? Q. Does imapsync support IMAP over TLS (IMAPS)?

14
INSTALL
View file

@ -1,4 +1,4 @@
# $Id: INSTALL,v 1.9 2005/11/16 01:14:18 gilles Exp gilles $ # $Id: INSTALL,v 1.10 2006/05/28 15:18:33 gilles Exp gilles $
# #
# INSTALL file for imapsync # INSTALL file for imapsync
# imapsync : IMAP sync or copy tool. # imapsync : IMAP sync or copy tool.
@ -18,6 +18,15 @@ You need :
Get Perl here: Get Perl here:
http://www.perl.org/ http://www.perl.org/
- Some perl modules. To verify you have
all modules in one command, just run:
perl -c imapsync
The good answer is "imapsync syntax OK".
Here is some individual module help:
- Perl Mail::IMAPClient module - Perl Mail::IMAPClient module
try : perl -mMail::IMAPClient -e '' try : perl -mMail::IMAPClient -e ''
@ -39,6 +48,9 @@ You need :
- Term::ReadKey - Term::ReadKey
- IO:Socket:SSL.pm
perl -mIO::Socket::SSL -e ''
- (Option) Perl Digest::HMAC_MD5 module - (Option) Perl Digest::HMAC_MD5 module
Good for non plain text password over network. Good for non plain text password over network.

10
README
View file

@ -2,7 +2,7 @@ NAME
imapsync - IMAP synchronization, copy or migration tool. Synchronize imapsync - IMAP synchronization, copy or migration tool. Synchronize
mailboxes between two imap servers. Good at IMAP migration. mailboxes between two imap servers. Good at IMAP migration.
$Revision: 1.172 $ $Revision: 1.175 $
INSTALL INSTALL
imapsync works fine under any Unix OS. imapsync works fine under any Unix OS.
@ -199,8 +199,10 @@ IMAP SERVERS
2.2.1, 2.2.2-BETA, 2.2.10, 2.2.12, 2.3-alpha (OSI Approved) 2.2.1, 2.2.2-BETA, 2.2.10, 2.2.12, 2.3-alpha (OSI Approved)
(http://asg.web.cmu.edu/cyrus/) (http://asg.web.cmu.edu/cyrus/)
- DBMail 1.2.1 (GPL) (http://www.dbmail.org/). 2.0.7 seems buggy. - DBMail 1.2.1 (GPL) (http://www.dbmail.org/). 2.0.7 seems buggy.
- Dovecot 0.99.10.4 0.99.14 (LGPL) (http://www.dovecot.org/) - Dovecot 0.99.10.4 0.99.14 0.99.14-8.fc4 (LGPL)
(http://www.dovecot.org/)
- Domino (Notes) 6.5, 5.0.6, 5.0.7 - Domino (Notes) 6.5, 5.0.6, 5.0.7
- Eudora WorldMail v2
- Groupwise IMAP (Novell). Buggy so see the FAQ. - Groupwise IMAP (Novell). Buggy so see the FAQ.
- iPlanet Messaging server 4.15, 5.1 - iPlanet Messaging server 4.15, 5.1
- IMail 7.15 (Ipswitch/Win2003), 8.12 - IMail 7.15 (Ipswitch/Win2003), 8.12
@ -211,11 +213,13 @@ IMAP SERVERS
- OpenWave - OpenWave
- Qualcomm Worldmail (NT) - Qualcomm Worldmail (NT)
- Samsung Contact IMAP server 8.5.0 - Samsung Contact IMAP server 8.5.0
- Scalix v10.1
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System) - SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System)
- UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287 - UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh) (OSI Approved) (RedHat uses UW like 2003.338rh) (OSI Approved)
(http://www.washington.edu/imap/) (http://www.washington.edu/imap/)
- UW - QMail v2.1 - UW - QMail v2.1
- Imap part of TCP/IP suite of VMS 7.3.2
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279. - Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279.
Please report to the author any success or bad story with imapsync and Please report to the author any success or bad story with imapsync and
@ -284,5 +288,5 @@ AUTHOR
teaching free open and gratis softwares. Don't hesitate to pay him for teaching free open and gratis softwares. Don't hesitate to pay him for
that services. that services.
$Id: imapsync,v 1.172 2006/05/09 23:06:29 gilles Exp $ $Id: imapsync,v 1.175 2006/06/08 00:52:00 gilles Exp $

25
RECORD
View file

@ -1,9 +1,24 @@
+------------------+
| imapsync records |
+------------------+
You can add your own record if you want.
Here is a template.
-------------------------------------------------------------------------------
Your Name/Compagny :
Time to migrate :
Number of mailboxes :
Total size :
Comment :
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Olivier Morel: Your Name/Compagny : Olivier Morel
Nous avons terminé notre migration et récupéré l'ensemble des boites aux lettres grace à votre outil, tout s'est déroulé à merveille (18 heures de traitement) Time to migrate : 18 hours
- 2200 Boites aux lettres Number of mailboxes : 2200
- 18 Go Total size : 18 Go
- récupération via .bat Comment : Nous avons terminé notre migration et récupéré l'ensemble
des boites aux lettres grace à votre outil, tout s'est
déroulé à merveille.

View file

@ -1 +1 @@
1.172 1.175

View file

@ -6,7 +6,7 @@ imapsync - IMAP synchronization, copy or migration
tool. Synchronize mailboxes between two imap servers. Good tool. Synchronize mailboxes between two imap servers. Good
at IMAP migration. at IMAP migration.
$Revision: 1.172 $ $Revision: 1.175 $
=head1 INSTALL =head1 INSTALL
@ -228,8 +228,10 @@ Success stories reported with the following imap servers
2.2.1, 2.2.2-BETA, 2.2.10, 2.2.12, 2.3-alpha (OSI Approved) 2.2.1, 2.2.2-BETA, 2.2.10, 2.2.12, 2.3-alpha (OSI Approved)
(http://asg.web.cmu.edu/cyrus/) (http://asg.web.cmu.edu/cyrus/)
- DBMail 1.2.1 (GPL) (http://www.dbmail.org/). 2.0.7 seems buggy. - DBMail 1.2.1 (GPL) (http://www.dbmail.org/). 2.0.7 seems buggy.
- Dovecot 0.99.10.4 0.99.14 (LGPL) (http://www.dovecot.org/) - Dovecot 0.99.10.4 0.99.14 0.99.14-8.fc4 (LGPL)
(http://www.dovecot.org/)
- Domino (Notes) 6.5, 5.0.6, 5.0.7 - Domino (Notes) 6.5, 5.0.6, 5.0.7
- Eudora WorldMail v2
- Groupwise IMAP (Novell). Buggy so see the FAQ. - Groupwise IMAP (Novell). Buggy so see the FAQ.
- iPlanet Messaging server 4.15, 5.1 - iPlanet Messaging server 4.15, 5.1
- IMail 7.15 (Ipswitch/Win2003), 8.12 - IMail 7.15 (Ipswitch/Win2003), 8.12
@ -240,11 +242,13 @@ Success stories reported with the following imap servers
- OpenWave - OpenWave
- Qualcomm Worldmail (NT) - Qualcomm Worldmail (NT)
- Samsung Contact IMAP server 8.5.0 - Samsung Contact IMAP server 8.5.0
- Scalix v10.1
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System) - SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System)
- UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287 - UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh) (OSI Approved) (RedHat uses UW like 2003.338rh) (OSI Approved)
(http://www.washington.edu/imap/) (http://www.washington.edu/imap/)
- UW - QMail v2.1 - UW - QMail v2.1
- Imap part of TCP/IP suite of VMS 7.3.2
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279. - Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279.
Please report to the author any success or bad story with Please report to the author any success or bad story with
@ -334,7 +338,7 @@ Gilles LAMIRAL earn his living writing, installing,
configuring and teaching free open and gratis configuring and teaching free open and gratis
softwares. Don't hesitate to pay him for that services. softwares. Don't hesitate to pay him for that services.
$Id: imapsync,v 1.172 2006/05/09 23:06:29 gilles Exp $ $Id: imapsync,v 1.175 2006/06/08 00:52:00 gilles Exp $
=cut =cut
@ -360,7 +364,7 @@ my(
$user1, $user2, $password1, $password2, $passfile1, $passfile2, $user1, $user2, $password1, $password2, $passfile1, $passfile2,
@folder, @include, @exclude, @folder, @include, @exclude,
$prefix1, $prefix2, $prefix1, $prefix2,
@regextrans2, @regexmess, @regextrans2, @regexmess, @regexflag,
$sep1, $sep2, $sep1, $sep2,
$syncinternaldates, $syncacls, $syncinternaldates, $syncacls,
$fastio1, $fastio2, $fastio1, $fastio2,
@ -391,7 +395,7 @@ my(
use vars qw ($opt_G); # missing code for this will be option. use vars qw ($opt_G); # missing code for this will be option.
$rcs = ' $Id: imapsync,v 1.172 2006/05/09 23:06:29 gilles Exp $ '; $rcs = ' $Id: imapsync,v 1.175 2006/06/08 00:52:00 gilles Exp $ ';
$rcs =~ m/,v (\d+\.\d+)/; $rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN"; $VERSION = ($1) ? $1 : "UNKNOWN";
@ -428,8 +432,8 @@ $error=0;
my $banner = join("", my $banner = join("",
'$RCSfile: imapsync,v $ ', '$RCSfile: imapsync,v $ ',
'$Revision: 1.172 $ ', '$Revision: 1.175 $ ',
'$Date: 2006/05/09 23:06:29 $ ', '$Date: 2006/06/08 00:52:00 $ ',
"\n", "\n",
"Mail::IMAPClient version used here is ", "Mail::IMAPClient version used here is ",
$VERSION_IMAPClient,"\n" $VERSION_IMAPClient,"\n"
@ -863,6 +867,15 @@ sub to_folder_name {
return($t_fold); return($t_fold);
} }
sub flags_regex {
my ($flags_f) = @_;
foreach my $regexflag (@regexflag) {
$debug and print "eval \$flags_f =~ $regexflag\n";
eval("\$flags_f =~ $regexflag");
}
return($flags_f);
}
sub acls_sync { sub acls_sync {
my($f_fold, $t_fold) = @_; my($f_fold, $t_fold) = @_;
if ($syncacls) { if ($syncacls) {
@ -1036,6 +1049,7 @@ FOLDER: foreach my $f_fold (@f_folders) {
my $flags_f = $f_hash{$m_id}{'F'} || ""; my $flags_f = $f_hash{$m_id}{'F'} || "";
# RFC 2060 : This flag can not be altered by the client # RFC 2060 : This flag can not be altered by the client
$flags_f =~ s@\\Recent@@g; $flags_f =~ s@\\Recent@@g;
$flags_f = flags_regex($flags_f) if @regexflag;
my $new_id; my $new_id;
print "flags from : [$flags_f][$d]\n"; print "flags from : [$flags_f][$d]\n";
@ -1075,16 +1089,21 @@ FOLDER: foreach my $f_fold (@f_folders) {
@flags_f = @{$flags_f_rv} if ref($flags_f_rv); @flags_f = @{$flags_f_rv} if ref($flags_f_rv);
# No flag \Recent here, no ? # No flag \Recent here, no ?
my $flags_f = join(" ", @flags_f);
$flags_f = flags_regex($flags_f) if @regexflag;
# This add or change flags but no flag are removed with this
$to->store($t_msg, $to->store($t_msg,
"+FLAGS (" . join(" ", @flags_f) . ")" "+FLAGS (" . $flags_f . ")"
) unless ($dry) ; ) unless ($dry) ;
my $flags_t_rv = $to->flags($t_msg); my $flags_t_rv = $to->flags($t_msg);
@flags_t = @{$flags_t_rv} if ref($flags_t_rv); @flags_t = @{$flags_t_rv} if ref($flags_t_rv);
my $flags_t = join(" ", @flags_t);
$debug and print $debug and print
"flags from : @flags_f\n", "flags from : $flags_f\n",
"flags to : @flags_t\n"; "flags to : $flags_t\n";
$debug and do { $debug and do {
@ -1217,6 +1236,7 @@ sub get_options
"prefix2=s" => \$prefix2, "prefix2=s" => \$prefix2,
"regextrans2=s" => \@regextrans2, "regextrans2=s" => \@regextrans2,
"regexmess=s" => \@regexmess, "regexmess=s" => \@regexmess,
"regexflag=s" => \@regexflag,
"delete!" => \$delete, "delete!" => \$delete,
"delete2!" => \$delete2, "delete2!" => \$delete2,
"syncinternaldates!" => \$syncinternaldates, "syncinternaldates!" => \$syncinternaldates,
@ -1387,6 +1407,9 @@ Several options are mandatory.
Exemple : 's/\\000/ /g' # to replace null by space. Exemple : 's/\\000/ /g' # to replace null by space.
--regexmess <regex> : and this one. --regexmess <regex> : and this one.
--regexmess <regex> : and this one, etc. --regexmess <regex> : and this one, etc.
--regexflag <regex> : Apply the whole regex to each flags list.
Exemple : 's/\"Junk"//g' # to remove "Junk" flag.
--regexflag <regex> : and this one, etc.
--sep1 <string> : separator in case namespace is not supported. --sep1 <string> : separator in case namespace is not supported.
--sep2 <string> : idem. --sep2 <string> : idem.
--delete : delete messages on source imap server after --delete : delete messages on source imap server after

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $Id: tests.sh,v 1.52 2006/04/02 03:32:55 gilles Exp $ # $Id: tests.sh,v 1.53 2006/06/08 00:53:21 gilles Exp $
#### Shell pragmas #### Shell pragmas
@ -685,6 +685,25 @@ flags()
fi fi
} }
regex_flag()
{
if test X`hostname` = X"plume"; then
echo3 Here is plume
./imapsync \
--host2 plume --user2 tata@est.belle \
--passfile2 /var/tmp/secret.tata \
--host1 loul --user1 tata \
--passfile1 /var/tmp/secret.tata \
--folder INBOX.yop.yap \
--dry --debug --regexflag 's/\\Answered//g'
echo 'rm /home/vmail/tata/.yop.yap/cur/*'
else
:
fi
}
lp_ssl() { lp_ssl() {
if test X`hostname` = X"plume"; then if test X`hostname` = X"plume"; then