This commit is contained in:
Nick Bebout 2011-03-12 02:44:33 +00:00
parent bce9598a84
commit 09be759d48
12 changed files with 296 additions and 32 deletions

11
CREDITS
View file

@ -1,5 +1,8 @@
#!/bin/cat
Marc Jauvin
Found 1.217 slower than 1.182 (80s -> 250s, 2400 mail, 90MB)
If you want to make a donation to the author, Gilles LAMIRAL,
you can use the imapsync wishlist :
http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/
@ -7,6 +10,14 @@ http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/
I thank very much all of these people.
Neil Brown
Made a rpm package of imapsync and gave the
imapsync.spec file.
Olaf Menkens
Valentí Jové
Had problem with flags and revision 1.201
Heiko Kirsch
Found the 24 characters bug in username.
In fact this is 76 in Mail::IMAPClient, md5, MIME::Base64::encode.

View file

@ -1,15 +1,24 @@
RCS file: RCS/imapsync,v
Working file: imapsync
head: 1.217
head: 1.219
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 217; selected revisions: 217
total revisions: 219; selected revisions: 219
description:
----------------------------
revision 1.219
date: 2007/04/04 09:32:20; author: gilles; state: Exp; lines: +18 -12
Added uname info and perl version to the banner.
----------------------------
revision 1.218
date: 2007/04/04 07:52:22; author: gilles; state: Exp; lines: +8 -8
- Zimbra releases
- use prefix1 bugfix for a rpm .spec
----------------------------
revision 1.217
date: 2007/03/06 13:12:23; author: gilles; state: Exp; lines: +103 -6
- Added _cram_md5_2() and authenticate2() to correct a bug

37
FAQ
View file

@ -37,6 +37,15 @@ a) Don't use buggy Eudora.
b) Use the --syncinternaldates option and keep using Eudora :-)
=======================================================================
Q. Flags are not well synchonized. Is it a bug ?
R. It happens with some servers on the first sync.
Also, it was a bug from revision 1.200 to revision 1.207
Solution: run imapsync a second time. imapsync synchronizes flags
on each run unless option --fast is used.
=======================================================================
Q. imapsync failed with a "word too long" error from the imap server,
What can I do ?
@ -89,21 +98,35 @@ headers for each message transfered. The message is
transfered again and again each time you run imapsync. This
is bad of course. The explanation is that imapsync considers
the message is not the same since headers have changed (one
line added) and size too (the header part). You can look at
the headers found by imapsync by using the --debug option
(and search for the message on both part). The way to avoid
this problem is by using options --skipheader and
line added) and size too (the header part).
You can look at the headers found by imapsync by using the
--debug option (and search for the message on both part),
Header lines from the source server begin with a "FH:" prefix,
Header lines from the destination server begin with a "TH:" prefix.
Since --debug is very verbose I suggest to isolate a
email in a specific folder in case you want to forward
me the output.
The way to avoid this problem is by using options --skipheader and
--skipsize, like this (avoid headers beginning whith the
string "X-"):
imapsync ... --skipheader '^X-' --skipsize
You can use --skipheader only one time; if you need to skip
several different headers use the "or" perl regex caracter
which is "|". Example:
To skip several headers you can use --skipheader one time
imapsync ... --skipheader '^X-|^Status|^Bcc'
or several times (same result)
imapsync ... --skipheader '^X-' --skipheader '^Status' --skipheader '^Bcc'
If you think you have too many header to avoid just use
imapsync ... --useheader 'Message-ID' --skipsize
======================================================================
Q. I want to exclude a folder hierarchy like "public"

7
README
View file

@ -1,9 +1,8 @@
NAME
imapsync - IMAP synchronisation, sync, copy or migration tool.
Synchronise mailboxes between two imap servers. Good at IMAP migration.
More than 32 different IMAP server softwares supported with success.
$Revision: 1.217 $
$Revision: 1.219 $
INSTALL
imapsync works fine under any Unix OS with perl.
@ -255,7 +254,7 @@ IMAP SERVERS
(http://www.washington.edu/imap/)
- 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, 5.5.
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 5.5.
Please report to the author any success or bad story with imapsync and
don't forget to mention the IMAP server software names and version on
@ -320,5 +319,5 @@ SIMILAR SOFTWARES
Feedback (good or bad) will be always welcome.
$Id: imapsync,v 1.217 2007/03/06 13:12:23 gilles Exp $
$Id: imapsync,v 1.219 2007/04/04 09:32:20 gilles Exp $

6
TODO
View file

@ -1,6 +1,12 @@
TODO file for imapsync
----------------------
Compare speed between 1.182 and 1.217
"un mailbox de 90MB, ~2400 fichiers prends 80s avec la version 1.182
vs 250s avec la version 1.217". Marc Jauvin
Add LITERAL+ [RFC 2088] support to imapsync.
Add an option to make imapsync automatically
reconnect when the connection drops

View file

@ -1 +1 @@
1.217
1.219

View file

@ -5,14 +5,15 @@
#RELEASE_FOCUS="Code cleanup"
#RELEASE_FOCUS="Minor feature enhancements"
#RELEASE_FOCUS="Major feature enhancements"
#RELEASE_FOCUS="Minor bugfixes"
RELEASE_FOCUS="Major bugfixes"
RELEASE_FOCUS="Minor bugfixes"
#RELEASE_FOCUS="Major bugfixes"
#RELEASE_FOCUS="Minor security fixes"
#RELEASE_FOCUS="Major security fixes"
#TEXT_BODY="Syntax cleanup"
#TEXT_BODY="Updated documentation"
#TEXT_BODY="Bug fix: be case insensitive with header keywords."
TEXT_BODY="Bug fix: rewrote the way to store messages to avoid freeze problems with some imap servers"
#TEXT_BODY="Bug fix: rewrote the way to store messages to avoid freeze problems with some imap servers"
TEXT_BODY="Bug fix: Allow long usernames with md5 authentification."

View file

@ -1,5 +1,6 @@
#!/usr/bin/perl -w
=pod
=head1 NAME
imapsync - IMAP synchronisation, sync, copy or migration
@ -7,7 +8,7 @@ tool. Synchronise mailboxes between two imap servers. Good
at IMAP migration. More than 32 different IMAP server softwares
supported with success.
$Revision: 1.217 $
$Revision: 1.219 $
=head1 INSTALL
@ -285,7 +286,7 @@ Success stories reported with the following 32 imap servers
(http://www.washington.edu/imap/)
- 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, 5.5.
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 5.5.
Please report to the author any success or bad story with
imapsync and don't forget to mention the IMAP server
@ -371,7 +372,7 @@ Entries for imapsync:
Feedback (good or bad) will be always welcome.
$Id: imapsync,v 1.217 2007/03/06 13:12:23 gilles Exp $
$Id: imapsync,v 1.219 2007/04/04 09:32:20 gilles Exp $
@ -430,7 +431,7 @@ my(
use vars qw ($opt_G); # missing code for this will be option.
$rcs = ' $Id: imapsync,v 1.217 2007/03/06 13:12:23 gilles Exp $ ';
$rcs = ' $Id: imapsync,v 1.219 2007/04/04 09:32:20 gilles Exp $ ';
$rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN";
@ -467,9 +468,9 @@ $error=0;
my $banner = join("",
'$RCSfile: imapsync,v $ ',
'$Revision: 1.217 $ ',
'$Date: 2007/03/06 13:12:23 $ ',
"\n",
'$Revision: 1.219 $ ',
'$Date: 2007/04/04 09:32:20 $ ',
"\n",localhost_info(),
"Mail::IMAPClient version used here is ",
$VERSION_IMAPClient,"\n",
"Command line used :\n",
@ -511,16 +512,21 @@ sub connect_imap {
or die "Can not open imap connection on [$host] : $@\n";
}
sub localhost_info {
my($infos) = join("", "Here is a $OSNAME system",
" ", join(" ", uname()),
")\nwith perl ",
sprintf("%vd", $PERL_VERSION), "\n");
return($infos);
}
if ($justconnect) {
my $from = ();
my $to = ();
print "Here is a $OSNAME system (",
join(" ", uname()),
")\nwith perl ",
sprintf("%vd", $PERL_VERSION), "\n";
$from = connect_imap($host1, $port1);
print "From software : ", server_banner($from);
print "From capability : ", join(" ", $from->capability()), "\n";
@ -1541,8 +1547,8 @@ Several options are mandatory.
--exclude <regex> : or this one, etc.
--prefix1 <string> : remove prefix to all destination folders
(usually INBOX. for cyrus imap servers)
use --prefix1 if your source imap server does not
have NAMESPACE capability.
you can use --prefix1 if your source imap server
does not have NAMESPACE capability.
--prefix2 <string> : add prefix to all destination folders
(usually INBOX. for cyrus imap servers)
use --prefix2 if your target imap server does not

52
learn/rpm/imapsync.spec Normal file
View file

@ -0,0 +1,52 @@
Summary: imapsync a tool to migrate across IMAP servers
URL: http://freshmeat.net/projects/imapsync/
Name: imapsync
Version: 1.217
Release: 1
License: GPL
Group: DICE/Utils
Source: http://www.linux-france.org/prj/imapsync/dist/imapsync-1.217.tgz
Source99: filter-requires-imapsync.sh
BuildArch: noarch
BuildRoot: /var/tmp/%{name}-build
Packager: Neil Brown <neilb@inf.ed.ac.uk>
Requires: perl(Mail::IMAPClient), perl(Net::SSLeay), perl(IO::Socket::SSL)
# Working around perl dependency problem, its wrongly matching
# on "use --prefix" in the docs embeded in the code
%define __perl_requires %{SOURCE99}
%description
imapsync is a tool for facilitating incremental recursive IMAP
transfers from one mailbox to another. It is useful for mailbox
migration, and reduces the amount of data transferred by only copying
messages that are not present on both servers. Read, unread, and
deleted flags are preserved, and the process can be stopped and
resumed. The original messages can optionally be deleted after a
successful transfer.
%prep
%setup
%build
%install
make DESTDIR=$RPM_BUILD_ROOT install
%files
%defattr(-,root,root)
%doc ChangeLog README INSTALL FAQ CREDITS TODO GPL
/usr/bin/imapsync
/usr/share/man
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Mar 19 2007 Neil Brown <neilb@inf.ed.ac.uk>
- Packaged up source tarball into the RPM. Had to add a fix
- to stop the perl_requires script wrongly matching on "use --prefix"
- in the docs as a genuine perl "use module;"

47
tmp_imapsync_28408 Normal file
View file

@ -0,0 +1,47 @@
Return-Path: <www-data@mail-relay-outgoing.prod.imvu.com>
Delivered-To: paulwoods@blastbeat.org
Received: (qmail 5807 invoked by uid 512); 26 Nov 2006 01:29:43 +0000
Received: from 208.64.184.229 by server2.rushedsunlight.com (envelope-from <www-data@mail-relay-outgoing.prod.imvu.com>, uid 514) with qmail-scanner-1.24-st-qms
(clamdscan: 0.85.1/889. spamassassin: 3.0.4. perlscan: 1.24-st-qms.
Clear:RC:0(208.64.184.229):SA:0(-0.7/2.0):.
Processed in 4.151186 secs); 26 Nov 2006 01:29:43 -0000
X-Spam-Status: No, hits=-0.7 required=2.0
X-Antivirus-RSLW-Mail-From: www-data@mail-relay-outgoing.prod.imvu.com via server2.rushedsunlight.com
X-Antivirus-RSLW: 1.24-st-qms (Clear:RC:0(208.64.184.229):SA:0(-0.7/2.0):. Processed in 4.151186 secs Process 5771)
Received: from prod-mail-relay-06.imvu.com (HELO mail-relay-outgoing.prod.imvu.com) (208.64.184.229)
by email1.rslw.com with SMTP; 26 Nov 2006 01:29:39 +0000
Received: from AF001161.prod.imvu.com (unknown [10.5.4.137])
by mail-relay-outgoing.prod.imvu.com (Postfix) with ESMTP id 7A018140291E8
for <paulwoods@blastbeat.org>; Sat, 25 Nov 2006 17:21:18 -0800 (PST)
Received: from AF001161.prod.imvu.com (localhost [127.0.0.1])
by AF001161.prod.imvu.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id kAQ1LIV0015006
for <paulwoods@blastbeat.org>; Sat, 25 Nov 2006 17:21:18 -0800
Received: (from www-data@localhost)
by AF001161.prod.imvu.com (8.13.4/8.13.4/Submit) id kAQ1LIEt015005;
Sat, 25 Nov 2006 17:21:18 -0800
Date: Sat, 25 Nov 2006 17:21:18 -0800
Message-Id: <200611260121.kAQ1LIEt015005@AF001161.prod.imvu.com>
To: "paulwoods@blastbeat.org" <paulwoods@blastbeat.org>
Subject: smugz182@hotmail.com wants to 3D IM w/ you on IMVU
From: "MisterMagooo" <smugz182@hotmail.com>
MIME-Version: 1.0
X-Mailer: osCommerce Mailer
Content-Type: multipart/alternative;
boundary="=_76259bbeb72fb7f8f369967bb24140f4"
--=_76259bbeb72fb7f8f369967bb24140f4
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
MisterMagooo (smugz182@hotmail.com) has sent you this invitation to chat in 3D. Hi, Download this its sweet!! IMVU is a FREE 3D instant messaging software download. It's an easy way to chat with friends and meet new people. Build a customized, animated 3D identity from over 200,000 user created options. Decorate your Avatar home page with stickers and powerful editing tools. Have fun exploring cool 3D locations and animating your avatar! It's free, and doesn't take long to set up. Sign up now! If you have questions about IMVU or would like to contact us, please visit our website http://www.imvu.com Your buddy MisterMagooo (smugz182@hotmail.com) has invited you to chat in 3D! IMVU is the worlds greatest 3D instant messenger! Get IMVU now! You are receiving this email because someone who knows you sent you an invitation to join them on imvu.com.&nbsp; If you want to prevent any future e-mail from IMVU, you can remove yourself from by pointing your web browser to http://www.imvu.com/catalog/web_nonregisteredoptout.php?code=9b68d8&email=paulwoods@blastbeat.org.&nbsp; Your opt-out confirmation code is 9b68d8
--=_76259bbeb72fb7f8f369967bb24140f4
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<font face=3D"Verdana" size=3D"2"> MisterMagooo (smugz182@hotmail.com) has=
sent you this invitation to chat in 3D. <p> Hi, Download this its sweet=
!! <p> IMVU is a FREE 3D instant messaging software download.<br> It's=
an easy way to chat with friends and meet new people.<br> Build a customi=
zed, animated 3D identity from over 200,000 user created options.<br> Deco=
rate your Avatar hom

99
tmp_imapsync_28490 Normal file
View file

@ -0,0 +1,99 @@
Return-Path: <owner-nolist-seg80167*paulwoods**blastbeat*-org@ntls.digitalriver.com>
X-Original-To: paulwoods@blastbeat.org
Delivered-To: paulwoods@blastbeat.org
Received: from localhost (localhost.localdomain [127.0.0.1])
by layer2.rslw.com (Postfix) with ESMTP id C63E395400E
for <paulwoods@blastbeat.org>; Thu, 8 Mar 2007 13:53:28 +0000 (GMT)
Received: from layer2.rslw.com ([127.0.0.1])
by localhost (layer2.rslw.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 25475-06 for <paulwoods@blastbeat.org>;
Thu, 8 Mar 2007 13:53:12 +0000 (GMT)
Received: from dc1img05.digitalriver.com (localhost.localdomain [127.0.0.1])
by layer2.rslw.com (Postfix) with ESMTP id 3131895400B
for <paulwoods@blastbeat.org>; Thu, 8 Mar 2007 13:53:11 +0000 (GMT)
Received: from 66.192.69.6 ([66.192.69.6] helo=dc1img05.digitalriver.com)
by ASSP.nospam; 8 Mar 2007 13:53:11 +0000
Date: 08 Mar 2007 07:44:21 -0600
From: "Allume Systems - A Smith Micro Company" <AllumeSystems@reply.digitalriver.com>
X-Complaints-to: abuse@digitalriver.com
To: "Paul" <paulwoods@blastbeat.org>
Reply-To: "Allume Systems - A Smith Micro Company" <AllumeSystems@reply.digitalriver.com>
Message-ID: <17392.Reply.80167.202005833@dc1img01.digitalriver.com>
Subject: Special Offer - Trend Micro Internet Security 2007 - Save 15%
X-MID: 1839-rgd2fz7bz7iijdru3
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------06986E0E1E196312E032AFBC"
X-Assp-Received-SPF: neutral (ASSP.nospam: local policy) client-ip=66.192.69.6;
envelope-from=owner-nolist-seg80167*paulwoods**blastbeat*-org@ntls.digitalriver.com;
helo=dc1img05.digitalriver.com;
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at localhost
This is a multi-part message in MIME format. If you can see this
message, perhaps your mail reader doesn't support MIME. You should
still be able to see the text version of the e-mail message, which
follows below.
Unsubscribe: http://www.digitalriver.com/v2.0-bin/ecm/opt-out?uid=rgd2fz7bz7iijdru3
--------------06986E0E1E196312E032AFBC
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Description: text-format
Dear Valued Customer,
Smith Micro has partnered with Trend Micro to offer you the newest
Trend Micro Internet Security 2007 an exclusive discount of 15%!
INSTALL TREND MICRO INTERNET SECURITY 2007 ON UP TO 3PC's!
BUY NOW: 1 year license - ONLY $42.50 instead of $49.95
http://www.digitalriver.com/promo=176952
BUY NOW: 2 year license - ONLY $72.20 instead of $84.95
http://www.digitalriver.com/promo=176953
BUY NOW: 3 year license - ONLY $101.95 instead of $119.95
http://www.digitalriver.com/promo=176954
As a Smith Micro customer you know not to take internet security lightly.
Online menaces and internet threats constantly evolve. You need to be free
to do what you want, and have the confidence Trend Micro Internet Security 2007
provides, with advances in both identity theft protection, superior threat
protection and Virus detection.
Trend Micro Internet Security users also receive access to the latest online
services and software through the new TrendSecure online security portal.
Don't wait any longer, purchase Trend Internet Security 2007 now to receive
your exclusive discount!
Kind regards,
Jonathan Kahn,
Smith Micro Software
This email was sent to: paulwoods@blastbeat.org
We value your privacy. If you would prefer not to receive our news
and special offers in the future, please click here:
http://www.digitalriver.com/v2.0-bin/ecm/opt-out?uid=rgd2fz7bz7iijdru3
Alternately, you may reply to this email for assistance.
For offline assistance, please contact us at
Customer Service/Allume Systems unsubscribe request,
9625 West 76th Street, Suite 150, Eden Prairie, MN 55344
--------------06986E0E1E196312E032AFBC
Content-Type: text/html; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Description: htm

11
tmp_imapsync_28777 Normal file
View file

@ -0,0 +1,11 @@
Return-Path: <gilles@louloutte.dyndns.org>
Received: by louloutte.dyndns.org (Postfix, from userid 1000)
id 4AB81FBC7; Mon, 28 Nov 2005 02:02:33 +0100 (CET)
To: tata@louloutte.dyndns.org
Subject: test:zajahzuushacemie
Message-Id: <20051128010233.4AB81FBC7@louloutte.dyndns.org>
Date: Mon, 28 Nov 2005 02:02:33 +0100 (CET)
From: gilles@louloutte.dyndns.org (Gilles Lamiral)
test:zajahzuushacemie