This commit is contained in:
Nick Bebout 2011-03-12 02:44:06 +00:00
parent 82dcebb23c
commit 2c60274596
11 changed files with 1818260 additions and 6553090 deletions

View file

@ -1,5 +1,12 @@
#!/bin/cat #!/bin/cat
Norbert Schmidt
Gave "from a Cyrus-IMAP Server to a Lotus Domino 6.5 IMAP Server".
Had a problem with Domino \\ separator.
Cliff Lipple
Gave "from an NT Server running Qualcomm
Worldmail to a Mac OS X Server running Cyrus."
Bryce Walter Bryce Walter
Gave "OpenWave to Imail 8.12" Gave "OpenWave to Imail 8.12"

View file

@ -1,15 +1,28 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 1.103 head: 1.106
branch: branch:
locks: strict locks: strict
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 103; selected revisions: 103 total revisions: 106; selected revisions: 106
description: description:
---------------------------- ----------------------------
revision 1.106
date: 2004/12/28 03:35:00; author: gilles; state: Exp; lines: +9 -8
If --sep2 or --sep1 is given then it has precedence over the
separator given by imap namespace.
----------------------------
revision 1.105
date: 2004/12/28 03:32:30; author: gilles; state: Exp; lines: +7 -11
Removed commented code about separator
----------------------------
revision 1.104
date: 2004/11/13 02:30:24; author: gilles; state: Exp; lines: +7 -6
Added Worldmail success
----------------------------
revision 1.103 revision 1.103
date: 2004/10/19 04:15:27; author: gilles; state: Exp; lines: +9 -11 date: 2004/10/19 04:15:27; author: gilles; state: Exp; lines: +9 -11
Removed search("ALL") from foldersizes code Removed search("ALL") from foldersizes code

7
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.103 $ $Revision: 1.106 $
INSTALL INSTALL
imapsync works fine under any Unix OS. imapsync works fine under any Unix OS.
@ -165,7 +165,7 @@ IMAP SERVERS
- CommunicatePro server (Redhat 8.0) - CommunicatePro server (Redhat 8.0)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1 - Courier IMAP 1.5.1, 2.2.0, 2.1.1
- Critical Path (7.0.020) - Critical Path (7.0.020)
- Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.1.16, 2.2.1, Cyrus 2.2.2-BETA - Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.1.16, 2.2.1, Cyrus 2.2.2-BETA.
- DBMail 1.2.1 - DBMail 1.2.1
- Dovecot 0.99.10.4 - Dovecot 0.99.10.4
- Domino (Notes) 6.5, 5.0.6 - Domino (Notes) 6.5, 5.0.6
@ -174,6 +174,7 @@ IMAP SERVERS
- MS Exchange Server 5.5 - MS Exchange Server 5.5
- Netscape Mail Server 3.6 (Wintel !) - Netscape Mail Server 3.6 (Wintel !)
- OpenWave - OpenWave
- Qualcomm Worldmail (NT)
- 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) (RedHat uses UW like 2003.338rh)
@ -238,5 +239,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.103 2004/10/19 04:15:27 gilles Exp $ $Id: imapsync,v 1.106 2004/12/28 03:35:00 gilles Exp $

3
TODO
View file

@ -2,7 +2,8 @@ TODO file for imapsync
---------------------- ----------------------
Look at http://freshmeat.net/projects/freshmeat-submit/ Look at http://freshmeat.net/projects/freshmeat-submit/
Look at comp.mail.imap Look at comp.mail.imap http://groups.google.fr/groups?q=imapsync
Think about speed. Think about speed.

View file

@ -1 +1 @@
1.103 1.106

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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.103 $ $Revision: 1.106 $
=head1 INSTALL =head1 INSTALL
@ -190,7 +190,7 @@ Success stories reported (softwares in alphabetic order) :
- CommunicatePro server (Redhat 8.0) - CommunicatePro server (Redhat 8.0)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1 - Courier IMAP 1.5.1, 2.2.0, 2.1.1
- Critical Path (7.0.020) - Critical Path (7.0.020)
- Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.1.16, 2.2.1, Cyrus 2.2.2-BETA - Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.1.16, 2.2.1, Cyrus 2.2.2-BETA.
- DBMail 1.2.1 - DBMail 1.2.1
- Dovecot 0.99.10.4 - Dovecot 0.99.10.4
- Domino (Notes) 6.5, 5.0.6 - Domino (Notes) 6.5, 5.0.6
@ -199,6 +199,7 @@ Success stories reported (softwares in alphabetic order) :
- MS Exchange Server 5.5 - MS Exchange Server 5.5
- Netscape Mail Server 3.6 (Wintel !) - Netscape Mail Server 3.6 (Wintel !)
- OpenWave - OpenWave
- Qualcomm Worldmail (NT)
- 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) (RedHat uses UW like 2003.338rh)
@ -280,7 +281,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.103 2004/10/19 04:15:27 gilles Exp $ $Id: imapsync,v 1.106 2004/12/28 03:35:00 gilles Exp $
=cut =cut
@ -322,7 +323,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.103 2004/10/19 04:15:27 gilles Exp $ '; $rcs = ' $Id: imapsync,v 1.106 2004/12/28 03:35:00 gilles Exp $ ';
$rcs =~ m/,v (\d+\.\d+)/; $rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN"; $VERSION = ($1) ? $1 : "UNKNOWN";
@ -359,8 +360,8 @@ $error=0;
my $banner = join("", my $banner = join("",
'$RCSfile: imapsync,v $ ', '$RCSfile: imapsync,v $ ',
'$Revision: 1.103 $ ', '$Revision: 1.106 $ ',
'$Date: 2004/10/19 04:15:27 $ ', '$Date: 2004/12/28 03:35:00 $ ',
"\n", "\n",
"Mail::IMAPClient version used here is ", "Mail::IMAPClient version used here is ",
$VERSION_IMAPClient, " auth md5 : $md5_supported", $VERSION_IMAPClient, " auth md5 : $md5_supported",
@ -525,14 +526,11 @@ sub get_separator {
my($imap, $sep_in, $sep_opt) = @_; my($imap, $sep_in, $sep_opt) = @_;
my($sep_out); my($sep_out);
$debug and print "Calling namespace capability\n"; $debug and print "Calling namespace capability\n";
if ($imap->has_capability("namespace")) {
# Less complicated call. Must be tested
# before uncommenting definitively.
$sep_out = $imap->separator();
#$sep_out = $imap->namespace()->[0][0][1];
}elsif ($sep_in) { if ($sep_in) {
$sep_out = $sep_in; $sep_out = $sep_in;
}elsif ($imap->has_capability("namespace")) {
$sep_out = $imap->separator();
}else{ }else{
print print
"No NAMESPACE capability in imap server ", "No NAMESPACE capability in imap server ",
@ -611,7 +609,7 @@ sub timenext {
exit if ($justconnect); exit if ($justconnect);
# needed for setting flags # needed for setting flags
# my $tohasuidplus = $to->has_capability("UIDPLUS"); my $tohasuidplus = $to->has_capability("UIDPLUS");
@t_folders = sort @{$to->folders()}; @t_folders = sort @{$to->folders()};

View file

@ -1,7 +1,7 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
my $f_sep="/"; my $f_sep = $ARGV[0] || "/";
my $t_sep="."; my $t_sep = $ARGV[1] || ".";
my $o_sep = "\000"; my $o_sep = "\000";
foreach my $f_fold ("testsub/testsub3", "testsub.testsub3", "a.b/c.d/e" ) { foreach my $f_fold ("testsub/testsub3", "testsub.testsub3", "a.b/c.d/e" ) {
@ -10,18 +10,18 @@ foreach my $f_fold ("testsub/testsub3", "testsub.testsub3", "a.b/c.d/e" ) {
$t_fold = $f_fold; $t_fold = $f_fold;
my $t_fold2 = $t_fold3 = $f_fold; my $t_fold2 = $t_fold3 = $f_fold;
$t_fold =~ s@\Q$f_sep@$t_sep@g; $t_fold =~ s¤\Q$f_sep¤$t_sep¤g;
$t_fold2 =~ s@\Q$t_sep@$f_sep@g; $t_fold2 =~ s¤\Q$t_sep¤$f_sep¤g;
$t_fold3 =~ s@\Q$t_sep@$o_sep@g; $t_fold3 =~ s¤\Q$t_sep¤$o_sep¤g;
$t_fold4 = $t_fold3; $t_fold4 = $t_fold3;
$t_fold4 =~ s@\Q$f_sep@$t_sep@g; $t_fold4 =~ s¤\Q$f_sep¤$t_sep¤g;
$t_fold5 = $t_fold4; $t_fold5 = $t_fold4;
$t_fold5 =~ s@\Q$o_sep@$f_sep@g; $t_fold5 =~ s¤\Q$o_sep¤$f_sep¤g;
#$t_fold =~ s@/@.@g; #$t_fold =~ s¤/¤.¤g;
print "To /. Folder [$t_fold]\n"; print "To $f_sep$t_sep /. Folder [$t_fold]\n";
print "To ./ Folder2[$t_fold2]\n"; print "To $t_sep$f_sep ./ Folder2[$t_fold2]\n";
print "To .0 Folder3[$t_fold3]\n"; print "To $t_sep"."0 .0 Folder3[$t_fold3]\n";
print "To .0 Folder4[$t_fold4]\n"; print "To $f_sep$t_sep of .0 Folder4[$t_fold4]\n";
print "To 0/ Folder5[$t_fold5]\n\n"; print "To 0$f_sep 0/ Folder5[$t_fold5]\n\n";
} }

View file

@ -1,8 +1,20 @@
#!/bin/sh #!/bin/sh
# $Id: tests.sh,v 1.25 2004/10/15 14:40:05 gilles Exp $ # $Id: tests.sh,v 1.29 2004/12/28 04:03:12 gilles Exp $
# $Log: tests.sh,v $ # $Log: tests.sh,v $
# Revision 1.29 2004/12/28 04:03:12 gilles
# Added lp_sep2()
#
# Revision 1.28 2004/12/28 03:15:28 gilles
# essnet tests
#
# Revision 1.27 2004/11/18 03:56:43 gilles
# Added essnet_justconnect()
#
# Revision 1.26 2004/11/04 22:41:54 gilles
# renamed big_transfert2 -> dprof
#
# Revision 1.25 2004/10/15 14:40:05 gilles # Revision 1.25 2004/10/15 14:40:05 gilles
# Added big_transfert_sizes_only() # Added big_transfert_sizes_only()
# #
@ -423,6 +435,23 @@ lp_regextrans2()
fi fi
} }
lp_sep2()
{
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 \
--sep2 '\\' --dry
else
:
fi
}
bad_login() bad_login()
@ -514,7 +543,7 @@ big_transfert_sizes_only()
big_transfert2() dprof()
{ {
date1=`date` date1=`date`
{ perl -d:DProf ./imapsync \ { perl -d:DProf ./imapsync \
@ -523,7 +552,7 @@ big_transfert2()
--host2 plume --user2 tete@est.belle \ --host2 plume --user2 tete@est.belle \
--passfile2 /var/tmp/secret.tete \ --passfile2 /var/tmp/secret.tete \
--subscribed --foldersizes --noauthmd5 \ --subscribed --foldersizes --noauthmd5 \
--folder INBOX.Backup_ASK || \ --folder INBOX.Trash || \
true true
} }
date2=`date` date2=`date`
@ -531,6 +560,62 @@ big_transfert2()
dprofpp tmon.out dprofpp tmon.out
} }
essnet_justconnect()
{
./imapsync \
--host1 mail2.softwareuno.com \
--user1 gilles@mail2.softwareuno.com \
--passfile1 /var/tmp/secret.prw \
--host2 mail.softwareuno.com \
--user2 gilles@softwareuno.com \
--passfile2 /var/tmp/secret.prw \
--dry --noauthmd5 --sep1 / --foldersizes --justconnect
}
essnet_mail2_mail()
{
./imapsync \
--host1 mail2.softwareuno.com \
--user1 gilles@mail2.softwareuno.com \
--passfile1 /var/tmp/secret.prw \
--host2 mail.softwareuno.com \
--user2 gilles@softwareuno.com \
--passfile2 /var/tmp/secret.prw \
--noauthmd5 --sep1 / --foldersizes \
--prefix2 "INBOX/" --regextrans2 's¤INBOX¤¤'
}
essnet_mail2_mail_t123()
{
for user1 in test1 test2 test3; do
./imapsync \
--host1 mail2.softwareuno.com \
--user1 ${user1}@mail2.softwareuno.com \
--passfile1 /var/tmp/secret.prw \
--host2 mail.softwareuno.com \
--user2 gilles@softwareuno.com \
--passfile2 /var/tmp/secret.prw \
--noauthmd5 --sep1 / --foldersizes \
--prefix2 "INBOX/" --regextrans2 's¤INBOX¤¤' \
|| true
done
}
essnet_plume2()
{
./imapsync \
--host1 mail2.softwareuno.com \
--user1 gilles@mail2.softwareuno.com \
--passfile1 /var/tmp/secret.prw \
--host2 plume --user2 tata@est.belle \
--passfile2 /var/tmp/secret.tata \
--noauthmd5 --sep1 / --foldersizes --prefix2 INBOX.
}
# mandatory tests # mandatory tests
@ -563,7 +648,8 @@ test $# -eq 0 && run_tests \
lp_skipheader \ lp_skipheader \
lp_regextrans2 \ lp_regextrans2 \
foldersizes2 \ foldersizes2 \
foldersizes foldersizes \
big_transfert_sizes_only
# selective tests # selective tests

8315554
tmon.out

File diff suppressed because it is too large Load diff