mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-06 04:37:18 +02:00
1.252
This commit is contained in:
parent
c739d9e680
commit
2ab8a06dbc
10 changed files with 36516 additions and 39 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,17 +1,25 @@
|
||||||
|
|
||||||
RCS file: RCS/imapsync,v
|
RCS file: RCS/imapsync,v
|
||||||
Working file: imapsync
|
Working file: imapsync
|
||||||
head: 1.250
|
head: 1.252
|
||||||
branch:
|
branch:
|
||||||
locks: strict
|
locks: strict
|
||||||
gilles: 1.250
|
gilles: 1.252
|
||||||
access list:
|
access list:
|
||||||
symbolic names:
|
symbolic names:
|
||||||
keyword substitution: kv
|
keyword substitution: kv
|
||||||
total revisions: 250; selected revisions: 250
|
total revisions: 252; selected revisions: 252
|
||||||
description:
|
description:
|
||||||
----------------------------
|
----------------------------
|
||||||
revision 1.250 locked by: gilles;
|
revision 1.252 locked by: gilles;
|
||||||
|
date: 2008/05/08 02:30:17; author: gilles; state: Exp; lines: +36 -6
|
||||||
|
Added mailing list information.
|
||||||
|
----------------------------
|
||||||
|
revision 1.251
|
||||||
|
date: 2008/05/08 02:08:44; author: gilles; state: Exp; lines: +56 -14
|
||||||
|
Fixed message_string returning empty message when < expected size.
|
||||||
|
----------------------------
|
||||||
|
revision 1.250
|
||||||
date: 2008/04/21 03:46:01; author: gilles; state: Exp; lines: +11 -7
|
date: 2008/04/21 03:46:01; author: gilles; state: Exp; lines: +11 -7
|
||||||
Bug fix "parse_headers want an ARRAY ref"
|
Bug fix "parse_headers want an ARRAY ref"
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
7
FAQ
7
FAQ
|
@ -86,6 +86,11 @@ b) Use the --syncinternaldates option and keep using Eudora :-)
|
||||||
c) Use the script learn/adjust_time.pl to change the internal dates
|
c) Use the script learn/adjust_time.pl to change the internal dates
|
||||||
from the "Date:" header.
|
from the "Date:" header.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. The option --subscribe does not seem to work
|
||||||
|
|
||||||
|
R. Use it with --subscribed
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. Does imapsync retain the \Answered and $Forwarded flags?
|
Q. Does imapsync retain the \Answered and $Forwarded flags?
|
||||||
|
|
||||||
|
@ -549,7 +554,7 @@ R. GroupWise 7 seems buggy. Apply GroupWise 7 support pack 1
|
||||||
Q. Migrating from David Tobit V8
|
Q. Migrating from David Tobit V8
|
||||||
|
|
||||||
R. Use the following options :
|
R. Use the following options :
|
||||||
imapsync ... --prefix1 INBOX. --sep1 / --subscribe
|
imapsync ... --prefix1 INBOX. --sep1 / --subscribe --subscribed
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. I need to migrate 1250 mailboxes from one cyrus-IMAP server to another
|
Q. I need to migrate 1250 mailboxes from one cyrus-IMAP server to another
|
||||||
|
|
35
README
35
README
|
@ -3,7 +3,7 @@ NAME
|
||||||
Synchronise mailboxes between two imap servers. Good at IMAP migration.
|
Synchronise mailboxes between two imap servers. Good at IMAP migration.
|
||||||
More than 32 different IMAP server softwares supported with success.
|
More than 32 different IMAP server softwares supported with success.
|
||||||
|
|
||||||
$Revision: 1.250 $
|
$Revision: 1.252 $
|
||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
imapsync works fine under any Unix OS with perl.
|
imapsync works fine under any Unix OS with perl.
|
||||||
|
@ -175,9 +175,36 @@ LICENSE
|
||||||
General Public License. See the GPL file included in the distribution or
|
General Public License. See the GPL file included in the distribution or
|
||||||
the web site http://www.gnu.org/licenses/licenses.html
|
the web site http://www.gnu.org/licenses/licenses.html
|
||||||
|
|
||||||
|
MAILING-LIST
|
||||||
|
Here is the welcome message:
|
||||||
|
|
||||||
|
Welcome on the imapsync mailing-list.
|
||||||
|
|
||||||
|
This list is dedicated to the users of imapsync
|
||||||
|
http://www.linux-france.org/prj/imapsync/
|
||||||
|
|
||||||
|
To write on the list, the address is: mailto:imapsync@linux-france.org
|
||||||
|
|
||||||
|
To unsubscribe, send a message to:
|
||||||
|
mailto:imapsync-unsubscribe@listes.linux-france.org
|
||||||
|
|
||||||
|
To subscribe, send a message to:
|
||||||
|
mailto:imapsync-subscribe@listes.linux-france.org
|
||||||
|
|
||||||
|
To contact the person in charge for the list:
|
||||||
|
mailto:imapsync-request@listes.linux-france.org
|
||||||
|
|
||||||
|
The list archives may be available at:
|
||||||
|
http://www.linux-france.org/prj/imapsync_list/ So consider that the list
|
||||||
|
is public, anyone can see your post. Use a pseudonym or do not post to
|
||||||
|
this list if you want to stay private.
|
||||||
|
|
||||||
|
Thank you for your participation.
|
||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
No known serious bug. Report any bug to the author. Before reporting
|
No known serious bug. Report any bug or feature request to the author or
|
||||||
bugs, read the FAQ, this README and the TODO files.
|
the mailing-list. Before reporting bugs, read the FAQ, this README and
|
||||||
|
the TODO files.
|
||||||
|
|
||||||
Don't write imapsync in uppercase in the email title, I'll know you run
|
Don't write imapsync in uppercase in the email title, I'll know you run
|
||||||
windows.
|
windows.
|
||||||
|
@ -333,5 +360,5 @@ SIMILAR SOFTWARES
|
||||||
|
|
||||||
Feedback (good or bad) will be always welcome.
|
Feedback (good or bad) will be always welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.250 2008/04/21 03:46:01 gilles Exp gilles $
|
$Id: imapsync,v 1.252 2008/05/08 02:30:17 gilles Exp gilles $
|
||||||
|
|
||||||
|
|
1
TODO
1
TODO
|
@ -1,6 +1,7 @@
|
||||||
TODO file for imapsync
|
TODO file for imapsync
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
Add kerberos authentification
|
||||||
|
|
||||||
Add NOOP commands to avoid timeouts.
|
Add NOOP commands to avoid timeouts.
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.250
|
1.252
|
||||||
|
|
|
@ -16,6 +16,6 @@ RELEASE_FOCUS="Major bugfixes"
|
||||||
#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."
|
#TEXT_BODY="Bug fix: Allow long usernames with md5 authentification."
|
||||||
TEXT_BODY="Bug fixes:
|
TEXT_BODY="Bug fixes:
|
||||||
- Bug fix to the "parse_headers want an ARRAY ref" crash.
|
- Bug really fixed: "parse_headers want an ARRAY ref" crash (second time).
|
||||||
- Many thanks to the freshmeat folk that correct my bad and poorly English !
|
- Many thanks to the freshmeat folk that correct my bad and poorly English !
|
||||||
"
|
"
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
Project: imapsync
|
Project: imapsync
|
||||||
Version: 1.249
|
Version: 1.250
|
||||||
Release-Focus: Minor feature enhancements
|
Release-Focus: Major bugfixes
|
||||||
Hide: N
|
Hide: N
|
||||||
Home-Page-URL: http://www.linux-france.org/prj/imapsync/
|
Home-Page-URL: http://www.linux-france.org/prj/imapsync/
|
||||||
Gzipped-Tar-URL: http://www.linux-france.org/prj/imapsync/dist/
|
Gzipped-Tar-URL: http://www.linux-france.org/prj/imapsync/dist/
|
||||||
|
|
||||||
Bug fixes:
|
|
||||||
- Turned on --syncinternaldates option by default.
|
|
||||||
- Set timezone TZ=GMT if no timezone is set (MSWindows bug).
|
|
||||||
- Ignore message when it has no header.
|
|
||||||
- Added message id in output warning when no header found.
|
|
||||||
- Removed public freshmeat annoucement access since 1.241 was not mine (no problem) and not correct (problem).
|
|
||||||
- Can run with IMAPClient_3.x.x without redefine any function (but 3.x.x is still buggy and to be avoided)
|
|
||||||
- Started unit tests.
|
|
||||||
- Many thanks to the freshmeat folk that correct my bad and poorly English !
|
|
||||||
|
|
||||||
|
|
||||||
|
|
100
imapsync
100
imapsync
|
@ -9,7 +9,7 @@ tool. Synchronise mailboxes between two imap servers. Good
|
||||||
at IMAP migration. More than 32 different IMAP server softwares
|
at IMAP migration. More than 32 different IMAP server softwares
|
||||||
supported with success.
|
supported with success.
|
||||||
|
|
||||||
$Revision: 1.250 $
|
$Revision: 1.252 $
|
||||||
|
|
||||||
=head1 INSTALL
|
=head1 INSTALL
|
||||||
|
|
||||||
|
@ -205,9 +205,39 @@ the GNU General Public License. See the GPL file included in
|
||||||
the distribution or the web site
|
the distribution or the web site
|
||||||
http://www.gnu.org/licenses/licenses.html
|
http://www.gnu.org/licenses/licenses.html
|
||||||
|
|
||||||
|
=head1 MAILING-LIST
|
||||||
|
|
||||||
|
Here is the welcome message:
|
||||||
|
|
||||||
|
Welcome on the imapsync mailing-list.
|
||||||
|
|
||||||
|
This list is dedicated to the users of imapsync
|
||||||
|
http://www.linux-france.org/prj/imapsync/
|
||||||
|
|
||||||
|
To write on the list, the address is:
|
||||||
|
mailto:imapsync@linux-france.org
|
||||||
|
|
||||||
|
To unsubscribe, send a message to:
|
||||||
|
mailto:imapsync-unsubscribe@listes.linux-france.org
|
||||||
|
|
||||||
|
To subscribe, send a message to:
|
||||||
|
mailto:imapsync-subscribe@listes.linux-france.org
|
||||||
|
|
||||||
|
To contact the person in charge for the list:
|
||||||
|
mailto:imapsync-request@listes.linux-france.org
|
||||||
|
|
||||||
|
The list archives may be available at:
|
||||||
|
http://www.linux-france.org/prj/imapsync_list/
|
||||||
|
So consider that the list is public, anyone
|
||||||
|
can see your post. Use a pseudonym or do not
|
||||||
|
post to this list if you want to stay private.
|
||||||
|
|
||||||
|
Thank you for your participation.
|
||||||
|
|
||||||
=head1 BUGS
|
=head1 BUGS
|
||||||
|
|
||||||
No known serious bug. Report any bug to the author.
|
No known serious bug. Report any bug or feature request to the author
|
||||||
|
or the mailing-list.
|
||||||
Before reporting bugs, read the FAQ, this README and the
|
Before reporting bugs, read the FAQ, this README and the
|
||||||
TODO files.
|
TODO files.
|
||||||
|
|
||||||
|
@ -387,7 +417,7 @@ Entries for imapsync:
|
||||||
|
|
||||||
Feedback (good or bad) will be always welcome.
|
Feedback (good or bad) will be always welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.250 2008/04/21 03:46:01 gilles Exp gilles $
|
$Id: imapsync,v 1.252 2008/05/08 02:30:17 gilles Exp gilles $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -452,7 +482,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.250 2008/04/21 03:46:01 gilles Exp gilles $ ';
|
$rcs = ' $Id: imapsync,v 1.252 2008/05/08 02:30:17 gilles Exp gilles $ ';
|
||||||
$rcs =~ m/,v (\d+\.\d+)/;
|
$rcs =~ m/,v (\d+\.\d+)/;
|
||||||
$VERSION = ($1) ? $1 : "UNKNOWN";
|
$VERSION = ($1) ? $1 : "UNKNOWN";
|
||||||
|
|
||||||
|
@ -486,8 +516,8 @@ $error=0;
|
||||||
|
|
||||||
my $banner = join("",
|
my $banner = join("",
|
||||||
'$RCSfile: imapsync,v $ ',
|
'$RCSfile: imapsync,v $ ',
|
||||||
'$Revision: 1.250 $ ',
|
'$Revision: 1.252 $ ',
|
||||||
'$Date: 2008/04/21 03:46:01 $ ',
|
'$Date: 2008/05/08 02:30:17 $ ',
|
||||||
"\n",localhost_info(),
|
"\n",localhost_info(),
|
||||||
" and the module Mail::IMAPClient version used here is ",
|
" and the module Mail::IMAPClient version used here is ",
|
||||||
$VERSION_IMAPClient,"\n",
|
$VERSION_IMAPClient,"\n",
|
||||||
|
@ -2192,14 +2222,16 @@ use constant NonFolderArg => 1; # Value to pass to Massage to
|
||||||
my($self,$msgspec_all,@fields) = @_;
|
my($self,$msgspec_all,@fields) = @_;
|
||||||
my(%fieldmap) = map { ( lc($_),$_ ) } @fields;
|
my(%fieldmap) = map { ( lc($_),$_ ) } @fields;
|
||||||
my $msg; my $string; my $field;
|
my $msg; my $string; my $field;
|
||||||
|
#print ref($msgspec_all), "\n";
|
||||||
if(ref($msgspec_all) eq 'HASH') {
|
#if(ref($msgspec_all) eq 'HASH') {
|
||||||
$msgspec_all = [$msgspec_all];
|
# print ref($msgspec_all), "\n";
|
||||||
}
|
#$msgspec_all = [$msgspec_all];
|
||||||
|
#}
|
||||||
|
|
||||||
unless(ref($msgspec_all) eq 'ARRAY') {
|
unless(ref($msgspec_all) eq 'ARRAY') {
|
||||||
print "parse_headers want an ARRAY ref\n";
|
print "parse_headers want an ARRAY ref\n";
|
||||||
exit 1;
|
#exit 1;
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $headers = {}; # hash from message ids to header hash
|
my $headers = {}; # hash from message ids to header hash
|
||||||
|
@ -2278,22 +2310,28 @@ use constant NonFolderArg => 1; # Value to pass to Massage to
|
||||||
my $hdr = $header;
|
my $hdr = $header;
|
||||||
chomp $hdr;
|
chomp $hdr;
|
||||||
$hdr =~ s/\r$//;
|
$hdr =~ s/\r$//;
|
||||||
#print "W[$hdr]\n";
|
#print "W[$hdr]", ref($hdr), "!\n";
|
||||||
|
#next if ( ! defined($hdr));
|
||||||
|
#print "X[$hdr]\n";
|
||||||
|
|
||||||
if (defined($hdr) and $hdr =~ s/^(\S+):\s*//) {
|
if (defined($hdr) and ($hdr =~ s/^(\S+):\s*//)) {
|
||||||
#print "X";
|
# if ($hdr =~ s/^(\S+):\s*//) {
|
||||||
|
#print "X1\n";
|
||||||
$field = exists $fieldmap{lc($1)} ? $fieldmap{lc($1)} : $1 ;
|
$field = exists $fieldmap{lc($1)} ? $fieldmap{lc($1)} : $1 ;
|
||||||
push @{$h->{$field}} , $hdr ;
|
push @{$h->{$field}} , $hdr ;
|
||||||
} elsif ($hdr =~ s/^.*FETCH\s\(.*BODY\[HEADER\.FIELDS.*\)\]\s(\S+):\s*//) {
|
} elsif ($hdr =~ s/^.*FETCH\s\(.*BODY\[HEADER\.FIELDS.*\)\]\s(\S+):\s*//) {
|
||||||
|
#print "X2\n";
|
||||||
$field = exists $fieldmap{lc($1)} ? $fieldmap{lc($1)} : $1 ;
|
$field = exists $fieldmap{lc($1)} ? $fieldmap{lc($1)} : $1 ;
|
||||||
push @{$h->{$field}} , $hdr ;
|
push @{$h->{$field}} , $hdr ;
|
||||||
} elsif ( ref($h->{$field}) eq 'ARRAY') {
|
} elsif ( ref($h->{$field}) eq 'ARRAY') {
|
||||||
|
#print "X3\n";
|
||||||
|
|
||||||
$hdr =~ s/^\s+/ /;
|
$hdr =~ s/^\s+/ /;
|
||||||
$h->{$field}[-1] .= $hdr ;
|
$h->{$field}[-1] .= $hdr ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
use warnings;
|
||||||
my $candump = 0;
|
my $candump = 0;
|
||||||
if ($self->Debug) {
|
if ($self->Debug) {
|
||||||
eval {
|
eval {
|
||||||
|
@ -2410,6 +2448,40 @@ use constant NonFolderArg => 1; # Value to pass to Massage to
|
||||||
return MIME::Base64::encode($client->User() . " $hmac", "");
|
return MIME::Base64::encode($client->User() . " $hmac", "");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
*Mail::IMAPClient::message_string = sub {
|
||||||
|
my $self = shift;
|
||||||
|
my $msg = shift;
|
||||||
|
my $expected_size = $self->size($msg);
|
||||||
|
return undef unless(defined $expected_size); # unable to get size
|
||||||
|
my $cmd = $self->has_capability('IMAP4REV1') ?
|
||||||
|
"BODY" . ( $self->Peek ? '.PEEK[]' : '[]' ) :
|
||||||
|
"RFC822" . ( $self->Peek ? '.PEEK' : '' ) ;
|
||||||
|
|
||||||
|
$self->fetch($msg,$cmd) or return undef;
|
||||||
|
|
||||||
|
my $string = "";
|
||||||
|
|
||||||
|
foreach my $result (@{$self->{"History"}{$self->Transaction}}) {
|
||||||
|
$string .= $result->[DATA]
|
||||||
|
if defined($result) and $self->_is_literal($result) ;
|
||||||
|
}
|
||||||
|
# BUG? should probably return undef if length != expected
|
||||||
|
if ( length($string) != $expected_size ) {
|
||||||
|
carp "${self}::message_string: " .
|
||||||
|
"expected $expected_size bytes but received " .
|
||||||
|
length($string);
|
||||||
|
}
|
||||||
|
if ( length($string) > $expected_size )
|
||||||
|
{ $string = substr($string,0,$expected_size) }
|
||||||
|
if ( length($string) < $expected_size ) {
|
||||||
|
$self->LastError("${self}::message_string: expected ".
|
||||||
|
"$expected_size bytes but received " .
|
||||||
|
length($string)."\n");
|
||||||
|
return $string;
|
||||||
|
#return undef;
|
||||||
|
}
|
||||||
|
return $string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
4
tests.sh
4
tests.sh
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: tests.sh,v 1.72 2008/04/21 03:44:35 gilles Exp gilles $
|
# $Id: tests.sh,v 1.73 2008/05/08 02:10:31 gilles Exp gilles $
|
||||||
|
|
||||||
#### Shell pragmas
|
#### Shell pragmas
|
||||||
|
|
||||||
|
@ -1012,7 +1012,7 @@ test $# -eq 0 && run_tests \
|
||||||
ll_delete2 \
|
ll_delete2 \
|
||||||
ll_folderrec \
|
ll_folderrec \
|
||||||
ll_bigmail \
|
ll_bigmail \
|
||||||
msw
|
# msw
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue