1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-16 15:52:47 +01:00
This commit is contained in:
Nick Bebout 2012-04-16 17:30:19 -05:00
parent e76c9d2097
commit ae3e0f4870
12 changed files with 222 additions and 127 deletions

View File

@ -1,17 +1,34 @@
RCS file: RCS/imapsync,v
Working file: imapsync
head: 1.476
head: 1.480
branch:
locks: strict
gilles: 1.476
gilles: 1.480
access list:
symbolic names:
keyword substitution: kv
total revisions: 476; selected revisions: 476
total revisions: 480; selected revisions: 480
description:
----------------------------
revision 1.476 locked by: gilles;
revision 1.480 locked by: gilles;
date: 2012/01/08 05:11:03; author: gilles; state: Exp; lines: +8 -7
a1.net fix.
----------------------------
revision 1.479
date: 2011/12/16 05:30:27; author: gilles; state: Exp; lines: +33 -26
Unified outout in --debug mode. Lines start with Host1 or Host2.
----------------------------
revision 1.478
date: 2011/12/16 04:10:32; author: gilles; state: Exp; lines: +11 -9
Changed output about messages ignored to better reflect what is going on.
----------------------------
revision 1.477
date: 2011/12/11 10:07:09; author: gilles; state: Exp; lines: +8 -8
--split down to 100 to follow the recommendation of RFC2683 section 3.2.1.5
Thanks to Phil Pearl for this advice.
----------------------------
revision 1.476
date: 2011/12/10 01:33:50; author: gilles; state: Exp; lines: +34 -8
Applied Ameir Abdeldayem patch to deal with errors like
"Host1 Sent/15 size 1428 ignored (no header so we ignore this message)"

44
FAQ
View File

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: FAQ,v 1.100 2011/12/10 01:38:36 gilles Exp gilles $
# $Id: FAQ,v 1.102 2012/01/08 06:40:50 gilles Exp gilles $
+------------------+
| FAQ for imapsync |
@ -139,6 +139,22 @@ Q. Is is legal?
R. Yes, the license permits it
http://imapsync.lamiral.info/COPYING
=======================================================================
Q. I use --useuid which uses a cache in /tmp or --tmpdir, the hostnames
host1 or host2 has changed but mailboxes are the same. Will imapsync
generate duplicate messages on next runs?
R. Yes
Q. How can I fix this?
R. The cache path reflects hostnames or ip adresses, just change the
directory names of host1 or host2. Use --dry to see if next runs
will generate duplucates.
By default the cache is like
/tmp/imapsync_cache/host1/user1/host2/user2/...
=======================================================================
Q. How can I speed up transfers?
@ -463,29 +479,29 @@ Solution: run imapsync a second time. imapsync synchronizes flags
on each run.
=======================================================================
Q. Some passwords contain * and " characters. Login fails.
Q. On Unix, some passwords contain * and " characters. Login fails.
R. Use a backslash to escape the characters:
imapsync --password1 \"password\"
imapsync ... --password1 \"password\"
It works for the star * character,
I don't know if it works for the " character.
=======================================================================
Q. Out of memory on FreeBSD
Q. On Windows, some passwords contain $ characters. Login fails.
R1. Enclose passwords between ""
R. http://groups.google.com/group/lucky.freebsd.questions/browse_thread/thread/f4218e4252863328
imapsync ... --password1 "zzz$zz$$z"
See the user limit with the command
ulimit -a
To change it, try
ulimit -d 1000000000
Also
http://www.unixadmintalk.com/f41/perl-out-memory-sbrk-9112/
The default hard datasize limit on FreeBSD is 512MB. To raise it, put this
(or more) in /boot/loader.conf and reboot:
R2. Prefix each $ character with a ^ since ^ is the escape character
on Windows
kern.maxdsiz="1024M"
imapsync ... --password1 zzz^$zz^$^$z
For a password that is exactly the 8 characters string $%&<>|^"
you have to enter
imapsync ... --password1 "$%%&<>|^"^"
=======================================================================
Q. With huge account (many messages) when it comes to reading the

View File

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.89 2011/11/13 08:53:12 gilles Exp gilles $
# $Id: Makefile,v 1.90 2012/01/08 06:39:38 gilles Exp gilles $
.PHONY: help usage all
@ -40,7 +40,7 @@ hello:
echo "$(IMAPClient)"
all: ChangeLog README VERSION imapsync_elf_x86.bin
all: ChangeLog README VERSION imapsync_elf_x86.bin imapsync.exe
testp :
@ -281,11 +281,11 @@ upload_lfo:
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/.htaccess
sh ~/memo/lfo-rsync
upload_index: index.shtml
upload_index: index.shtml FAQ
validate --verbose index.shtml
rcsdiff index.shtml
rsync -avH index.shtml root@ks.lamiral.info:/var/www/imapsync/
rsync -avH index.shtml \
rsync -avH index.shtml FAQ \
../../public_html/www.linux-france.org/html/prj/imapsync/
sh $(HOME)/memo/lfo-rsync

7
README
View File

@ -3,7 +3,7 @@ NAME
Synchronise mailboxes between two imap servers. Good at IMAP migration.
More than 44 different IMAP server softwares supported with success.
$Revision: 1.476 $
$Revision: 1.480 $
SYNOPSIS
To synchronise imap account "foo" on "imap.truc.org" to imap account
@ -305,9 +305,10 @@ IMAP SERVERS
names are in alphabetic order):
- 1und1 H mimap1 84498 [host1]
- a1.net imap.a1.net IMAP4 Ready WARSBL614 00029c23 [host1]
- a1.net imap.a1.net IMAP4 Ready [host1]
- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) http://www.archiveopteryx.org/
- Axigen Mail Server Version 8.0.0
- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
@ -443,5 +444,5 @@ SIMILAR SOFTWARES
Feedback (good or bad) will often be welcome.
$Id: imapsync,v 1.476 2011/12/10 01:33:50 gilles Exp gilles $
$Id: imapsync,v 1.480 2012/01/08 05:11:03 gilles Exp gilles $

View File

@ -1 +1 @@
1.476
1.480

View File

@ -1 +1 @@
1.476
1.480

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: paypal_build_invoices,v 1.22 2011/12/02 04:08:46 gilles Exp gilles $
# $Id: paypal_build_invoices,v 1.23 2012/01/08 00:33:04 gilles Exp gilles $
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
@ -20,9 +20,11 @@ set -x
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 917 /g/paypal/paypal_2011_08_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 999 /g/paypal/paypal_2011_09_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1094 /g/paypal/paypal_2011_10_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1185 /g/paypal/paypal_2011_11_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1185 /g/paypal/paypal_2011_11_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1263 /g/paypal/paypal_2011_12_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 294 --usdeur 1.3385 /g/paypal/paypal_2011_01_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 382 /g/paypal/paypal_2011_02_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 473 /g/paypal/paypal_2011_03_complet.csv

View File

@ -20,7 +20,7 @@ Synchronise mailboxes between two imap servers.
Good at IMAP migration. More than 44 different IMAP server softwares
supported with success.
$Revision: 1.476 $
$Revision: 1.480 $
=head1 SYNOPSIS
@ -354,9 +354,10 @@ Success stories reported with the following 44 imap servers
(software names are in alphabetic order):
- 1und1 H mimap1 84498 [host1]
- a1.net imap.a1.net IMAP4 Ready WARSBL614 00029c23 [host1]
- a1.net imap.a1.net IMAP4 Ready [host1]
- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) http://www.archiveopteryx.org/
- Axigen Mail Server Version 8.0.0
- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
@ -518,7 +519,7 @@ Entries for imapsync:
Feedback (good or bad) will often be welcome.
$Id: imapsync,v 1.476 2011/12/10 01:33:50 gilles Exp gilles $
$Id: imapsync,v 1.480 2012/01/08 05:11:03 gilles Exp gilles $
=cut
@ -627,13 +628,14 @@ my(
$usecache, $debugcache, $cacheaftercopy,
$wholeheaderifneeded, %h1_msgs_copy_by_uid, $useuid, $h2_uidguess,
$addheader,
%h1, %h2,
);
# main program
# global variables initialisation
$rcs = '$Id: imapsync,v 1.476 2011/12/10 01:33:50 gilles Exp gilles $ ';
$rcs = '$Id: imapsync,v 1.480 2012/01/08 05:11:03 gilles Exp gilles $ ';
$total_bytes_transferred = 0;
$total_bytes_skipped = 0;
@ -728,8 +730,8 @@ check_lib_version() or
exit_clean(0) if ($justbanner);
# By default, 1000 at a time, not more.
$split1 ||= 500;
$split2 ||= 500;
$split1 ||= 100;
$split2 ||= 100;
$host1 || missing_option("--host1") ;
$port1 ||= (defined $ssl1 and !defined $tls1) ? 993 : 143;
@ -1120,17 +1122,18 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
my $h1_msgs_all_hash_ref = { } ;
my @h1_msgs = select_msgs( $imap1, $h1_msgs_all_hash_ref );
( $debug or $debugLIST ) and print "Host1 LIST: ", scalar( @h1_msgs ), " messages [@h1_msgs]\n" ;
#( $debug or $debugLIST ) and print "Host1 LIST: ", scalar( @$h1_msgs_all_ref ), " messages [@$h1_msgs_all_ref]\n" ;
# internal dates on host2 are after the ones on host1
# normally...
my $h1_msgs_nb = scalar( @h1_msgs ) ;
$h1{ $h1_fold }{ 'messages_nb' } = $h1_msgs_nb ;
( $debug or $debugLIST ) and print "Host1 LIST: $h1_msgs_nb messages [@h1_msgs]\n" ;
my $h2_msgs_all_hash_ref = { } ;
my @h2_msgs = select_msgs( $imap2, $h2_msgs_all_hash_ref ) ;
( $debug or $debugLIST ) and print "Host2 LIST: ", scalar(@h2_msgs), " messages [@h2_msgs]\n";
#( $debug or $debugLIST ) and print "Host2 LIST ALL: ", scalar( keys %$h2_msgs_all_hash_ref ), " messages [",
# join( ' ', keys( %$h2_msgs_all_hash_ref ) ), "]\n" ;
my $h2_msgs_nb = scalar( @h2_msgs ) ;
$h2{ $h2_fold }{ 'messages_nb' } = $h2_msgs_nb ;
( $debug or $debugLIST ) and print "Host2 LIST: $h2_msgs_nb messages [@h2_msgs]\n";
my $cache_base = "$tmpdir/imapsync_cache/$host1/$user1/$host2/$user2";
my $cache_dir = cache_folder( $cache_base, $h1_fold, $h2_fold );
@ -1204,7 +1207,7 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
my $rc = parse_header_msg($imap1, $m, $h1_heads_ref, $h1_fir_ref, 'Host1', \%h1_hash);
if (! defined($rc)) {
my $h1_size = $h1_fir_ref->{$m}->{"RFC822.SIZE"} || 0;
print "Host1 $h1_fold/$m size $h1_size ignored (no header so we ignore this message)\n";
print "Host1 $h1_fold/$m size $h1_size ignored (no wanted headers so we ignore this message)\n" ;
$total_bytes_skipped += $h1_size;
$nb_msg_skipped += 1;
$h1_nb_msg_noheader +=1;
@ -1218,8 +1221,11 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
$h1_nb_msg_duplicate += 1;
}
}
my $h1_msgs_duplicate_nb = scalar( @h1_msgs_duplicate ) ;
$h1{ $h1_fold }{ 'duplicates_nb' } = $h1_msgs_duplicate_nb ;
$debug and print "Host1 selected: $h1_msgs_nb duplicates: $h1_msgs_duplicate_nb\n" ;
$debug and print "Host1 whole time parsing headers took ", timenext(), " s\n";
$debug and print "\n";
$debug and print "Host2 parsing headers of folder [$h2_fold]\n";
@ -1238,7 +1244,7 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
my $rc = parse_header_msg($imap2, $m, $h2_heads_ref, $h2_fir_ref, 'Host2', \%h2_hash);
my $h2_size = $h2_fir_ref->{$m}->{"RFC822.SIZE"} || 0;
if (! defined($rc)) {
print "Host2 $h2_fold/$m size $h2_size ignored (no header so we ignore this message)\n";
print "Host2 $h2_fold/$m size $h2_size ignored (no wanted headers so we ignore this message)\n" ;
$h2_nb_msg_noheader += 1 ;
} elsif(0 == $rc) {
# duplicate
@ -1247,6 +1253,10 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
push(@h2_msgs_duplicate, $m);
}
}
my $h2_msgs_duplicate_nb = scalar( @h2_msgs_duplicate ) ;
$h2{ $h2_fold }{ 'duplicates_nb' } = $h2_msgs_duplicate_nb ;
$debug and print "Host2 selected: $h2_msgs_nb duplicates: $h2_msgs_duplicate_nb\n" ;
$debug and print "Host2 whole time parsing headers took ", timenext(), " s\n";
$debug and print "++++ Verifying [$h1_fold] -> [$h2_fold]\n";
@ -1318,7 +1328,7 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
}
my $h2_uidnext = $imap2->uidnext( $h2_fold ) ;
$debug and print "uidnext h2: $h2_uidnext\n" ;
$debug and print "Host2 uidnext: $h2_uidnext\n" ;
$h2_uidguess = $h2_uidnext ;
MESS: foreach my $m_id (@h1_hash_keys_sorted_by_uid) {
my $h1_size = $h1_hash{$m_id}{'s'};
@ -1333,7 +1343,7 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
else{
# already on host2
my $h2_msg = $h2_hash{$m_id}{'m'} ;
$debug and print "msg $h1_fold/$h1_msg equals $h2_fold/$h2_msg\n" ;
$debug and print "Host1 found msg $h1_fold/$h1_msg equals Host2 $h2_fold/$h2_msg\n" ;
$total_bytes_skipped += $h1_size ;
$nb_msg_skipped += 1 ;
$debugcache and print "touch $cache_dir/${h1_msg}_$h2_msg\n" if ( $usecache ) ;
@ -1348,9 +1358,9 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
# Good
my $h2_size = $h2_hash{$m_id}{'s'};
$debug and print
"msg $h1_fold/$h1_msg sizes $h1_size <> $h2_size $h2_fold/$h2_msg\n";
"Host1 size msg $h1_fold/$h1_msg = $h1_size <> $h2_size = Host2 $h2_fold/$h2_msg\n";
if( $delete ) {
print "msg $h1_fold/$h1_msg deleted on host1\n";
print "Host1 msg $h1_fold/$h1_msg deleted\n";
unless( $dry ) {
$imap1->delete_message( $h1_msg );
$h1_nb_msg_deleted += 1;
@ -1403,7 +1413,7 @@ sub size_filtered_flag {
sub sync_flags {
my ( $h1_fold, $h1_msg, $h2_fold, $h2_msg, $permanentflags2, $h1_fir_ref, $h2_fir_ref ) = @_ ;
$debug and print "flags $h1_fold/$h1_msg -> $h2_fold/$h2_msg\n";
$debug and print "Host1 flags $h1_fold/$h1_msg -> Host2 $h2_fold/$h2_msg\n";
my $h1_size = $h1_fir_ref->{$h1_msg}->{"RFC822.SIZE"} ;
return() if size_filtered_flag( $h1_size ) ;
@ -1413,7 +1423,7 @@ sub sync_flags {
my $h2_flags = $h2_fir_ref->{ $h2_msg }->{ "FLAGS" } || '' ;
( $debug or $debugflags ) and
print "init msg h1 $h1_fold/$h1_msg flags( $h1_flags ) h2 $h2_fold/$h2_msg flags( $h2_flags )\n" ;
print "Host1 flags init msg $h1_fold/$h1_msg flags( $h1_flags ) Host2 $h2_fold/$h2_msg flags( $h2_flags )\n" ;
# RFC 2060: This flag can not be altered by any client
$h1_flags =~ s@\\Recent\s?@@gi ;
@ -1427,16 +1437,16 @@ sub sync_flags {
my $diff = compare_lists( \@h1_flags, \@h2_flags );
#$diff = 1 ;
( $debug or $debugflags ) and print "filt msg h1 $h1_fold/$h1_msg flags( $h1_flags ) h2 $h2_fold/$h2_msg flags( $h2_flags )\n" ;
( $debug or $debugflags ) and print "Host1 flags filt msg $h1_fold/$h1_msg flags( $h1_flags ) Host2 $h2_fold/$h2_msg flags( $h2_flags )\n" ;
$diff and ( $debug or $debugflags )
and print "msg $h2_fold/$h2_msg replacing h2 flags( $h2_flags ) with h1 flags( $h1_flags )\n";
and print "Host2 flags msg $h2_fold/$h2_msg replacing h2 flags( $h2_flags ) with h1 flags( $h1_flags )\n";
# This sets flags so flags can be removed with this
# When you remove a \Seen flag on host1 you want to it
# to be removed on host2. Just add flags is not what
# we need most of the time.
if ( ! $dry and $diff and ! $imap2->store( $h2_msg, "FLAGS.SILENT (@h1_flags)" ) ) {
print "- msg $h2_fold/$h2_msg could not add flags [@h1_flags]: ",
print "Host2 flags msg $h2_fold/$h2_msg could not add flags [@h1_flags]: ",
$imap2->LastError, "\n";
#$nb_errors++;
}
@ -1845,8 +1855,8 @@ sub banner_imapsync {
my @argv_copy = @_;
my $banner_imapsync = join("",
'$RCSfile: imapsync,v $ ',
'$Revision: 1.476 $ ',
'$Date: 2011/12/10 01:33:50 $ ',
'$Revision: 1.480 $ ',
'$Date: 2012/01/08 05:11:03 $ ',
"\n",localhost_info(), "\n",
"Command line used:\n",
"$0 ", command_line_nopassword(@argv_copy), "\n",
@ -3498,7 +3508,7 @@ sub parse_header_msg {
my $headstr;
if ( ( ! $headnum ) and ( $wholeheaderifneeded ) ){
print "$s uid $m_uid no header by classic way so taking whole header\n";
print "$s uid $m_uid no header by parse_headers so taking whole header with BODY.PEEK[HEADER]\n" ;
$imap->fetch($m_uid, "BODY.PEEK[HEADER]");
my $whole_header = $imap->_transaction_literals;
@ -3633,7 +3643,7 @@ sub check_last_release {
}
sub imapsync_version {
my $rcs = '$Id: imapsync,v 1.476 2011/12/10 01:33:50 gilles Exp gilles $ ';
my $rcs = '$Id: imapsync,v 1.480 2012/01/08 05:11:03 gilles Exp gilles $ ';
$rcs =~ m/,v (\d+\.\d+)/;
my $VERSION = ($1) ? $1: "UNKNOWN";
return($VERSION);

View File

@ -5,7 +5,7 @@
<title>Imapsync: an IMAP migration tool ( release <!--#exec cmd="cat VERSION"--> )</title>
<meta name="generator" content="Bluefish 1.0.7"/>
<meta name="author" content="Gilles LAMIRAL"/>
<meta name="date" content="2011-11-24T10:37:23+0100"/>
<meta name="date" content="2012-01-08T02:59:44+0100"/>
<meta name="copyright" content="None"/>
<meta name="keywords" content="imap, transfert, migration"/>
<meta name="description" content="imap migration tool"/>
@ -45,8 +45,8 @@
<p><b>imapsync</b> software is a command line tool allowing incremental and
recursive <b>IMAP</b> transfers from one mailbox to another, both anywhere on the internet
or in your local network. Incremental means you can stop the transfer at any time
and restart it later efficiently. Recursive means all folders hierarchy can be copied.
or in your local network. "Incremental" means you can stop the transfer at any time
and restart it later efficiently. "Recursive" means all folders hierarchy can be copied.
</p>
<p><b>imapsync</b> is useful for imap account <b>migration</b> or imap account <b>backup</b>.
@ -60,11 +60,14 @@ or <a href="http://isync.sourceforge.net/"><b>mbsync</b></a> (written by Michael
for <b>2 ways synchronizations</b>.
</p>
<p>Alternatives to imapsync are listed in the <a href="#similar"><b>Similar softwares</b></a> section.
</p>
<h2><a id="NUMBERS"></a>Some numbers for 2011</h2>
<ul>
<li>Number of <b>imapsync users</b> per month: between <b>2 and 3 thousands </b>users</li>
<li>Number of <b>imapsync transfers</b> per month: between <b>3 and 11 millions mailboxes </b>transfers </li>
<li>Number of <b>imapsync transfers</b> per month: between <b>3 and 25 millions mailboxes </b>transfers </li>
<li>Pourcentage between <b>operating systems</b> users running imapsync:
<ul>
<li><b>Linux: 65 %</b></li>
@ -72,10 +75,10 @@ for <b>2 ways synchronizations</b>.
<li><b>Darwin: 11 %</b></li>
<li>FreeBSD: 6 %</li>
<li>Solaris: 0.4 %</li>
<li>OpenBSD: 0.1 %</li>
<li>OpenBSD: 0.05 %</li>
</ul>
</li>
<li><b>Biggest user usage</b>: more than <b>11 millions</b> of IMAP mailbox transfers</li>
<li><b>Biggest user usage</b>: about <b>21 millions</b> of IMAP mailbox transfers (in one month)</li>
</ul>
@ -90,11 +93,24 @@ for <b>2 ways synchronizations</b>.
<p>New features or bugfixes since previous releases:</p>
<ul>
<li><b>1.476</b></li>
<li><b>Usability</b>: Added <b>start</b> and <b>end dates</b> in the final statistics.</li>
<li><b>Better behavior</b>: Default headers used to identify a message are now "Message-Id" and "Received" (<b>Exchange compatibility</b> bu default).</li>
<li><b>Cyrus fix</b>: Default value down from --split 1000 to <b>--split1 500</b> (Cyrus bug "<b>Word too long</b>")</li>
<li><b>Enhancement</b>: Added option --addheader to fix the issue
"ignored (no header so we ignore this message)" (on <b>Sent</b> folder usually).
Thanks to Ameir Abdeldayem</li>
<li><b>Similar tools</b>: Checked and updated "Similar softwares" section in the documentation.</li>
<li><b>Experimental</b>: Added --nofilterflags to check any STORE flags by ignoring PERMANENTFLAGS (Exchange tests)</li>
</ul>
<ul>
<li><b>1.468</b></li>
<li><b>Usability</b>: Subscribe to host2 folders only for those not already subscribed.</li>
<li><b>Safer behavior</b>: Use examine() on host1 instead of select().</li>
<li><b>Gmail fix</b>: Fix select behavior on host2 to allow Gmail folders that don't exist but that are listed.</li>
<li><b>Usability</b>: Subscribe to host2 folders only for folders not already subscribed.</li>
<li><b>Safer behavior</b>: Use examine() (read-only mode) on host1 instead of select().</li>
<li><b>Gmail fix</b>: Fix select behavior on host2 to allow (silly) Gmail folders that don't exist but that are listed.</li>
<li><b>Cosmetic</b>: Changed imapsync homepage from http://www.linux-france.org/prj/imapsync/ to http://imapsync.lamiral.info/</li>
<li><b>Bugfix</b>: stay compatible with perl 5.8 (no use of // operator)</li>
</ul>
@ -354,14 +370,16 @@ Don't hesitate to have a try, I will help you and make efforts to switch them to
<li>(2011) <b>MDaemon 12.0.3</b> as <b>host2</b> but MDaemon is <b>supported as host1</b>. MDaemon is simply buggy with the APPEND IMAP command with any IMAP email client.</li>
</ul>
<p>Now the long reported <b>success stories</b> list: <b>44 different imap server softwares supported!</b><br/>
<p>Now the long reported <b>success stories</b> list: <b>46 different imap server softwares supported!</b><br/>
[host1] means "source server" and [host2] means "destination server":
</p>
<ul>
<li>1und1 H mimap1 84498 [host1]</li>
<li>1und1 H mimap1 84498 [host1]</li>
<li>a1.net imap.a1.net IMAP4 Ready [host1]</li>
<li>Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) http://www.archiveopteryx.org/</li>
<li>Axigen Mail Server Version 8.0.0</li>
<li>BincImap 1.2.3 (GPL) (http://www.bincimap.org/)</li>
<li>CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)</li>
<li>Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
@ -428,7 +446,7 @@ Don't hesitate to have a try, I will help you and make efforts to switch them to
Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x</li>
</ul>
<h2>Similar softwares</h2>
<h2><a id="similar"></a>Similar softwares</h2>
<ul>
@ -450,11 +468,16 @@ Don't hesitate to have a try, I will help you and make efforts to switch them to
<h2>Online IMAP migration services</h2>
<p>I have no share in these free or paid services.
I don't think they use imapsync.
Prices are given par mailbox and may be outdated (december 2011).</p>
<ul>
<li> ovh imapcopy (French) 0 USD: <a href="https://ssl0.ovh.net/fr/imapcopy/">https://ssl0.ovh.net/fr/imapcopy/</a></li>
<li> yippiemove 15 USD: <a href="http://www.yippiemove.com">http://www.yippiemove.com/</a></li>
<li> migrationwiz 10 USD: <a href="http://www.migrationwiz.com/">http://www.migrationwiz.com/</a></li>
<li> rackspace migration 10 USD: <a href="http://www.rackspace.com/apps/email_hosting/migrations/">http://www.rackspace.com/apps/email_hosting/migrations/</a></li>
<li> Ovh imapcopy (French) <b>0 USD</b>: <a href="https://ssl0.ovh.net/fr/imapcopy/">https://ssl0.ovh.net/fr/imapcopy/</a></li>
<li> Mailbox Mover 7 USD: <a href="https://mailboxmover.com/">https://mailboxmover.com/</a></li>
<li> Migrationwiz 10 USD: <a href="http://www.migrationwiz.com/">http://www.migrationwiz.com/</a></li>
<li> Rackspace migration 10 USD: <a href="http://www.rackspace.com/apps/email_hosting/migrations/">http://www.rackspace.com/apps/email_hosting/migrations/</a></li>
<li> Yippiemove 15 USD: <a href="http://www.yippiemove.com">http://www.yippiemove.com/</a></li>
</ul>
<hr/>
@ -483,7 +506,7 @@ alt="Viewable With Any Browser" />
<!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: index.shtml,v 1.99 2011/11/24 09:38:35 gilles Exp gilles $)
($Id: index.shtml,v 1.106 2012/01/08 02:00:53 gilles Exp gilles $)
</p>
</body>

85
memo
View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: memo,v 1.38 2011/11/07 15:12:06 gilles Exp gilles $
# $Id: memo,v 1.40 2012/01/08 05:12:55 gilles Exp gilles $
software_version() {
@ -86,7 +86,7 @@ export TMPDIR
echo statistics_VERSION_getstats
statistics_VERSION_getstats() {
for f in /home/lf/backuplog/linux-france.org.??-??-2011.bz2; do
for f in /home/lf/backuplog/linux-france.org.??-??-201[123456789].bz2; do
b=`basename "$f" .bz2`
#echo "$b"
test -f ${b}.imapsync_VERSION && continue
@ -95,38 +95,43 @@ statistics_VERSION_getstats() {
done
}
echo statistics_VERSION_monthly_ip 08
echo statistics_VERSION_monthly_ip 02 2012
statistics_VERSION_monthly_ip() {
month=${1:-`date '+%m'`}
cut -d ' ' -f 1,12,13,18,19 linux-france.org.??-${month}-2011.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_2011_${month}.ip
year=${2:-`date '+%Y'`}
cut -d ' ' -f 1,12,13,18,19 linux-france.org.??-${month}-${year}.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_${year}_${month}.ip
}
echo statistics_VERSION_monthly_ip_wc 08
echo statistics_VERSION_monthly_ip_wc 02 2012
statistics_VERSION_monthly_ip_wc() {
month=${1:-`date '+%m'`}
test -f stats_imapsync_2011_${month}.ip || statistics_VERSION_monthly_ip $month
wc -l stats_imapsync_2011_${month}.ip
year=${2:-`date '+%Y'`}
test -f stats_imapsync_${year}_${month}.ip || statistics_VERSION_monthly_ip $month ${year}
wc -l stats_imapsync_${year}_${month}.ip
}
echo statistics_VERSION_monthly_runs 08
echo statistics_VERSION_monthly_runs 02 2012
statistics_VERSION_monthly_runs() {
month=${1:-`date '+%m'`}
test -f stats_imapsync_2011_${month}.runs || wc -l linux-france.org.??-${month}-2011.imapsync_VERSION > stats_imapsync_2011_${month}.runs
cat stats_imapsync_2011_${month}.runs
year=${2:-`date '+%Y'`}
test -f stats_imapsync_${year}_${month}.runs || wc -l linux-france.org.??-${month}-${year}.imapsync_VERSION > stats_imapsync_${year}_${month}.runs
cat stats_imapsync_${year}_${month}.runs
}
echo statistics_VERSION_monthly 08
echo statistics_VERSION_monthly 02 2012
statistics_VERSION_monthly() {
month=${1:-`date '+%m'`}
year=${2:-`date '+%Y'`}
(
statistics_VERSION_getstats
statistics_VERSION_monthly_ip $month
statistics_VERSION_monthly_runs $month
statistics_VERSION_monthly_ip_wc $month
statistics_VERSION_monthly_ip $month $year
statistics_VERSION_monthly_runs $month $year
statistics_VERSION_monthly_ip_wc $month $year
)
}
echo statistics_VERSION_yearly_ip
echo statistics_VERSION_yearly_ip 2012
statistics_VERSION_yearly_ip() {
year=${1:-`date '+%Y'`}
(
@ -135,7 +140,7 @@ statistics_VERSION_yearly_ip() {
)
}
echo statistics_VERSION_yearly_os
echo statistics_VERSION_yearly_os 2012
statistics_VERSION_yearly_os() {
year=${1:-`date '+%Y'`}
(
@ -157,7 +162,7 @@ statistics_VERSION_yearly_os() {
}
echo statistics_VERSION_synthesis
echo statistics_VERSION_synthesis 2012
statistics_VERSION_synthesis() {
year=${1:-`date '+%Y'`}
(
@ -200,24 +205,26 @@ statistics_VERSION_getstats() {
echo statistics_VERSION_monthly_ip 08
statistics_VERSION_monthly_ip() {
month=${1:-`date '+%m'`}
year=${2:-`date '+%Y'`}
(
cd /home/imapsync/imapsync_stats
cut -d ' ' -f 1,12,13,18,19 access.log_2011${month}??.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_2011_${month}.ip
cut -d ' ' -f 1,12,13,18,19 access.log_${year}${month}??.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_${year}_${month}.ip
)
}
echo statistics_VERSION_monthly_os 08
statistics_VERSION_monthly_os() {
month=${1:-`date '+%m'`}
year=${2:-`date '+%Y'`}
(
cd /home/imapsync/imapsync_stats
Linux=`grep linux stats_imapsync_2011_${month}.ip | wc -l`
Win32=`grep MSWin32 stats_imapsync_2011_${month}.ip | wc -l`
Darwin=`grep darwin stats_imapsync_2011_${month}.ip | wc -l`
FreeBSD=`grep freebsd stats_imapsync_2011_${month}.ip | wc -l`
Solaris=`grep solaris stats_imapsync_2011_${month}.ip | wc -l`
OpenBSD=`grep openbsd stats_imapsync_2011_${month}.ip | wc -l`
Nb_All=`cat stats_imapsync_2011_${month}.ip | wc -l `
Linux=`grep linux stats_imapsync_${year}_${month}.ip | wc -l`
Win32=`grep MSWin32 stats_imapsync_${year}_${month}.ip | wc -l`
Darwin=`grep darwin stats_imapsync_${year}_${month}.ip | wc -l`
FreeBSD=`grep freebsd stats_imapsync_${year}_${month}.ip | wc -l`
Solaris=`grep solaris stats_imapsync_${year}_${month}.ip | wc -l`
OpenBSD=`grep openbsd stats_imapsync_${year}_${month}.ip | wc -l`
Nb_All=`cat stats_imapsync_${year}_${month}.ip | wc -l `
for OS in Linux Win32 Darwin FreeBSD Solaris OpenBSD; do
#echo $OS `eval "echo \\$$OS"` / $Nb_All
Nb_OS=`eval "echo \\$$OS"`
@ -260,39 +267,41 @@ statistics_VERSION_yearly_ip() {
)
}
echo statistics_VERSION_monthly_ip_wc
echo statistics_VERSION_monthly_ip_wc 01 2012
statistics_VERSION_monthly_ip_wc() {
month=${1:-`date '+%m'`}
year=${2:-`date '+%Y'`}
(
cd /home/imapsync/imapsync_stats
test -f stats_imapsync_2011_${month}.ip || statistics_VERSION_monthly_ip $month
wc -l stats_imapsync_2011_${month}.ip
test -f stats_imapsync_${year}_${month}.ip || statistics_VERSION_monthly_ip $month ${year}
wc -l stats_imapsync_${year}_${month}.ip
)
}
echo statistics_VERSION_monthly_runs
echo statistics_VERSION_monthly_runs 01 2012
statistics_VERSION_monthly_runs() {
month=${1:-`date '+%m'`}
year=${2:-`date '+%Y'`}
(
cd /home/imapsync/imapsync_stats
# test -f stats_imapsync_2011_${month}.runs ||
wc -l access.log_2011${month}??.imapsync_VERSION > stats_imapsync_2011_${month}.runs
cat stats_imapsync_2011_${month}.runs
wc -l access.log_${year}${month}??.imapsync_VERSION > stats_imapsync_${year}_${month}.runs
cat stats_imapsync_${year}_${month}.runs
)
}
echo statistics_VERSION_monthly 08
echo statistics_VERSION_monthly 01 2012
statistics_VERSION_monthly() {
month=${1:-`date '+%m'`}
year=${2:-`date '+%Y'`}
(
statistics_VERSION_getstats
statistics_VERSION_monthly_ip $month
statistics_VERSION_monthly_runs $month
statistics_VERSION_monthly_ip_wc $month
statistics_VERSION_monthly_ip $month $year
statistics_VERSION_monthly_runs $month $year
statistics_VERSION_monthly_ip_wc $month $year
)
}
echo statistics_VERSION_synthesis
echo statistics_VERSION_synthesis 2012
statistics_VERSION_synthesis() {
year=${1:-`date '+%Y'`}
(
@ -309,8 +318,6 @@ statistics_VERSION_synthesis() {
tail -n 5 stats_imapsync_${year}.ip
)
}
}

View File

@ -1,5 +1,5 @@
REM $Id: test2.bat,v 1.6 2011/08/24 21:55:56 gilles Exp gilles $
REM $Id: test2.bat,v 1.7 2012/01/08 06:39:12 gilles Exp gilles $
cd C:\msys\1.0\home\Admin\imapsync
REM perl ./imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --delete2 --expunge2 --folder INBOX
@ -19,6 +19,10 @@ REM --folder INBOX.bigmail
REM perl imapsync
REM perl imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --nofoldersize --folder INBOX.yop.yap --regexflag "s/\\ /\\/g" --debugflags
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) DO imapsync ^
--host1 imap.side1.org --user1 %%G --password1 %%H ^
--host2 imap.side2.org --user2 %%I --password2 %%J
REM FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) DO imapsync ^
REM --host1 imap.side1.org --user1 %%G --password1 %%H ^
REM --host2 imap.side2.org --user2 %%I --password2 %%J
REM imapsync --host1 p --user1 tata --passfile1 secret.tata ^
REM --host2 p --user2 dollar --password2 "$%%&<>|^"^" --justlogin

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: tests.sh,v 1.186 2011/12/10 01:37:20 gilles Exp gilles $
# $Id: tests.sh,v 1.188 2012/01/08 06:38:29 gilles Exp gilles $
# Example 1:
# CMD_PERL='perl -I./Mail-IMAPClient-3.25/lib' sh -x tests.sh
@ -165,12 +165,7 @@ first_sync() {
locallocal() {
if can_send; then
sendtestmessage
else
:
fi
can_send && sendtestmessage
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
@ -178,6 +173,19 @@ locallocal() {
--passfile2 ../../var/pass/secret.titi
}
ll_nofoldersizes()
{
can_send && sendtestmessage
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--nofoldersizes --debug --folder INBOX.yop
}
pidfile() {
$CMD_PERL ./imapsync \
@ -1867,8 +1875,6 @@ dkimap_1() {
}
ll_justlogin() {
# Look in the file ../../var/pass/secret.tptp to see
# strange \ character behavior
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
@ -1888,6 +1894,15 @@ ll_justlogin_backslash_char() {
--justlogin --noauthmd5
}
ll_justlogin_dollar_char() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 dollar \
--passfile2 ../../var/pass/secret.dollar \
--justlogin
}
ll_usecache() {
if can_send; then