imapsync/imapsync.patch
Nick Bebout 3ad00c786c 1.55
2011-03-12 02:43:49 +00:00

89 lines
2.2 KiB
Diff

*** imapsync.org Sat Dec 13 11:09:08 2003
--- imapsync Sat Dec 13 12:32:01 2003
***************
*** 39,45 ****
[--sep2 <char>]
[--syncinternaldate]
[--delete] [--expunge]
! [--subscribed]
[--dry]
[--debug] [--debugimap]
[--version] [--help]
--- 39,45 ----
[--sep2 <char>]
[--syncinternaldate]
[--delete] [--expunge]
! [--subscribed] [--subscribe]
[--dry]
[--debug] [--debugimap]
[--version] [--help]
***************
*** 229,235 ****
$sep1, $sep2,
$syncinternaldates,
$delete, $expunge, $dry, $subscribed, $subscribe,
! $version, $VERSION, $help,
);
use vars qw ($opt_G); # missing code for this will be option.
--- 229,235 ----
$sep1, $sep2,
$syncinternaldates,
$delete, $expunge, $dry, $subscribed, $subscribe,
! $version, $VERSION, $help, %s_folders
);
use vars qw ($opt_G); # missing code for this will be option.
***************
*** 317,328 ****
#@f_folders = (scalar(@folder)) ? @folder : @{$from->folders()};
if (scalar(@folder)) {
# folders given by option --folder
@f_folders = @folder;
}elsif ($subscribed) {
# option --subscribed
! @f_folders = $from->subscribed();
}else {
# no option, all folders
@f_folders = $from->folders()
--- 317,332 ----
#@f_folders = (scalar(@folder)) ? @folder : @{$from->folders()};
+ foreach my $folder ($from->subscribed()) {
+ $s_folders{$folder}=1;
+ }
+
if (scalar(@folder)) {
# folders given by option --folder
@f_folders = @folder;
}elsif ($subscribed) {
# option --subscribed
! @f_folders = keys (%s_folders);
}else {
# no option, all folders
@f_folders = $from->folders()
***************
*** 410,418 ****
$to->expunge();
}
! if ($subscribe) {
print "Subscribing to folder $t_fold on destination server\n";
! $to->subscribe($t_fold);
}
my @f_msgs = $from->search("ALL");
--- 414,422 ----
$to->expunge();
}
! if ($subscribe and exists $s_folders{$f_fold}) {
print "Subscribing to folder $t_fold on destination server\n";
! unless($dry) $to->subscribe($t_fold);
}
my @f_msgs = $from->search("ALL");