This commit is contained in:
Nick Bebout 2011-03-12 02:44:12 +00:00
parent c7f1a38411
commit ce5693f206
7 changed files with 216 additions and 15 deletions

View file

@ -6,7 +6,7 @@ imapsync - IMAP synchronization, copy or migration
tool. Synchronize mailboxes between two imap servers. Good
at IMAP migration.
$Revision: 1.118 $
$Revision: 1.120 $
=head1 INSTALL
@ -188,7 +188,7 @@ Success stories reported (softwares in alphabetic order) :
- BincImap 1.2.3
- 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, 2.2.1
- 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.
- DBMail 1.2.1
@ -196,6 +196,7 @@ Success stories reported (softwares in alphabetic order) :
- Domino (Notes) 6.5, 5.0.6
- iPlanet Messaging server 4.15, 5.1
- IMail 7.15 (Ipswitch/Win2003), 8.12
- MDaemon 7.0.1
- MS Exchange Server 5.5
- Netscape Mail Server 3.6 (Wintel !)
- OpenWave
@ -281,7 +282,7 @@ Gilles LAMIRAL earn his living writing, installing,
configuring and teaching free open and gratis
softwares. Don't hesitate to pay him for that services.
$Id: imapsync,v 1.118 2005/01/17 14:45:25 gilles Exp $
$Id: imapsync,v 1.120 2005/02/01 02:38:38 gilles Exp $
=cut
@ -324,7 +325,7 @@ my(
use vars qw ($opt_G); # missing code for this will be option.
$rcs = ' $Id: imapsync,v 1.118 2005/01/17 14:45:25 gilles Exp $ ';
$rcs = ' $Id: imapsync,v 1.120 2005/02/01 02:38:38 gilles Exp $ ';
$rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN";
@ -361,8 +362,8 @@ $error=0;
my $banner = join("",
'$RCSfile: imapsync,v $ ',
'$Revision: 1.118 $ ',
'$Date: 2005/01/17 14:45:25 $ ',
'$Revision: 1.120 $ ',
'$Date: 2005/02/01 02:38:38 $ ',
"\n",
"Mail::IMAPClient version used here is ",
$VERSION_IMAPClient, " auth md5 : $md5_supported",
@ -801,6 +802,7 @@ FOLDER: foreach my $f_fold (@f_folders) {
}
my $flags_f = join(" ", @{$from->flags($f_msg)});
# RFC 2060 : This flag can not be altered by the client
$flags_f =~ s@\\Recent@@g;
@ -834,16 +836,20 @@ FOLDER: foreach my $f_fold (@f_folders) {
#$debug and print "MESSAGE $m_id\n";
my $t_size = $t_hash{$m_id}{'s'};
my $t_msg = $t_hash{$m_id}{'m'};
$debug and print "Setting flags\n";
my (@flags_f,@flags_t);
@flags_f = @{$from->flags($f_msg)};
my $flags_f_rv = $from->flags($f_msg);
@flags_f = @{$flags_f_rv} if ref($flags_f_rv);
# No flag \Recent here, no ?
$to->store($t_msg,
"+FLAGS (" . join(" ", @flags_f) . ")"
) unless ($dry) ;
@flags_t = @{$to->flags($t_msg)};
my $flags_t_rv = $to->flags($t_msg);
@flags_t = @{$flags_t_rv} if ref($flags_t_rv);
$debug and print
"flags from : @flags_f\n",
"flags to : @flags_t\n";