This commit is contained in:
Nick Bebout 2011-03-12 02:44:22 +00:00
parent cdefaa6ccf
commit 79f17648bd
9 changed files with 109 additions and 18 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.158 $
$Revision: 1.159 $
=head1 INSTALL
@ -205,7 +205,8 @@ Failure stories reported with the following imap servers :
- MailEnable 1.54 (Proprietary) http://www.mailenable.com/
- DBMail 2.0.7 (GPL). But DBMail 1.2.1 works.
Patient and confident testers are welcome.
- dkimap4 2.39
Success stories reported with the following imap servers
(softwares names are in alphabetic order) :
@ -322,7 +323,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.158 2006/03/02 06:28:30 gilles Exp $
$Id: imapsync,v 1.159 2006/03/11 13:00:52 gilles Exp $
=cut
@ -370,7 +371,7 @@ my(
use vars qw ($opt_G); # missing code for this will be option.
$rcs = ' $Id: imapsync,v 1.158 2006/03/02 06:28:30 gilles Exp $ ';
$rcs = ' $Id: imapsync,v 1.159 2006/03/11 13:00:52 gilles Exp $ ';
$rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN";
@ -407,8 +408,8 @@ $error=0;
my $banner = join("",
'$RCSfile: imapsync,v $ ',
'$Revision: 1.158 $ ',
'$Date: 2006/03/02 06:28:30 $ ',
'$Revision: 1.159 $ ',
'$Date: 2006/03/11 13:00:52 $ ',
"\n",
"Mail::IMAPClient version used here is ",
$VERSION_IMAPClient,"\n"
@ -1084,16 +1085,18 @@ sub select_msgs {
return(@msgs);
}
if (defined($maxage)) {
@max = $imap->since(time - 86400 * $maxage);
@max = $imap->sentsince(time - 86400 * $maxage);
}
if (defined($minage)) {
@min = $imap->before(time - 86400 * $minage);
@min = $imap->sentbefore(time - 86400 * $minage);
}
SWITCH: {
unless(defined($minage)) {@msgs = @max; last SWITCH};
unless(defined($maxage)) {@msgs = @min; last SWITCH};
my (%union, %inter);
foreach my $m (@min, @max) {$union{$m}++ && $inter{$m}++}
@inter = keys(%inter);
@union = keys(%union);
# normal case
if ($minage <= $maxage) {@msgs = @inter; last SWITCH};
# just exclude messages between