mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-08 13:44:31 +02:00
1.65
This commit is contained in:
parent
06b00d41e4
commit
60f3bae1be
8 changed files with 59 additions and 30 deletions
|
@ -1,15 +1,20 @@
|
||||||
|
|
||||||
RCS file: RCS/imapsync,v
|
RCS file: RCS/imapsync,v
|
||||||
Working file: imapsync
|
Working file: imapsync
|
||||||
head: 1.64
|
head: 1.65
|
||||||
branch:
|
branch:
|
||||||
locks: strict
|
locks: strict
|
||||||
access list:
|
access list:
|
||||||
symbolic names:
|
symbolic names:
|
||||||
keyword substitution: kv
|
keyword substitution: kv
|
||||||
total revisions: 64; selected revisions: 64
|
total revisions: 65; selected revisions: 65
|
||||||
description:
|
description:
|
||||||
----------------------------
|
----------------------------
|
||||||
|
revision 1.65
|
||||||
|
date: 2003/12/24 03:04:34; author: gilles; state: Exp; lines: +20 -7
|
||||||
|
Wrote separator_invert()
|
||||||
|
Use separator_invert() to transform separators
|
||||||
|
----------------------------
|
||||||
revision 1.64
|
revision 1.64
|
||||||
date: 2003/12/23 19:45:46; author: gilles; state: Exp; lines: +5 -8
|
date: 2003/12/23 19:45:46; author: gilles; state: Exp; lines: +5 -8
|
||||||
Removed auth capability debug
|
Removed auth capability debug
|
||||||
|
|
4
README
4
README
|
@ -1,7 +1,7 @@
|
||||||
NAME
|
NAME
|
||||||
imapsync - synchronize mailboxes between two imap servers.
|
imapsync - synchronize mailboxes between two imap servers.
|
||||||
|
|
||||||
$Revision: 1.64 $
|
$Revision: 1.65 $
|
||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
Get imapsync at
|
Get imapsync at
|
||||||
|
@ -184,5 +184,5 @@ SIMILAR SOFTWARES
|
||||||
|
|
||||||
Feedback (good or bad) will be always welcome.
|
Feedback (good or bad) will be always welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.64 2003/12/23 19:45:46 gilles Exp $
|
$Id: imapsync,v 1.65 2003/12/24 03:04:34 gilles Exp $
|
||||||
|
|
||||||
|
|
4
TODO
4
TODO
|
@ -6,10 +6,10 @@ Add a --recurse option.
|
||||||
|
|
||||||
Add --prefix1 option. Don't know what is the need exactly.
|
Add --prefix1 option. Don't know what is the need exactly.
|
||||||
|
|
||||||
Pb if "to separator" is in "from folder" name.
|
DONE. Pb if "to separator" is in "from folder" name.
|
||||||
Have to choose a caracter != to separator and
|
Have to choose a caracter != to separator and
|
||||||
not in from folders. The solution can be to
|
not in from folders. The solution can be to
|
||||||
just exchange the two caracters.
|
just exchange the two separator caracters.
|
||||||
|
|
||||||
DONE. Look at the separator() function in Mail::IMAPClient
|
DONE. Look at the separator() function in Mail::IMAPClient
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.64
|
1.65
|
||||||
|
|
27
imapsync
27
imapsync
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
imapsync - synchronize mailboxes between two imap servers.
|
imapsync - synchronize mailboxes between two imap servers.
|
||||||
|
|
||||||
$Revision: 1.64 $
|
$Revision: 1.65 $
|
||||||
|
|
||||||
=head1 INSTALL
|
=head1 INSTALL
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ Welcome in shell programming !
|
||||||
|
|
||||||
Feedback (good or bad) will be always welcome.
|
Feedback (good or bad) will be always welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.64 2003/12/23 19:45:46 gilles Exp $
|
$Id: imapsync,v 1.65 2003/12/24 03:04:34 gilles Exp $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
@ -251,7 +251,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.64 2003/12/23 19:45:46 gilles Exp $ ';
|
$rcs = ' $Id: imapsync,v 1.65 2003/12/24 03:04:34 gilles Exp $ ';
|
||||||
$rcs =~ m/,v (\d+\.\d+)/;
|
$rcs =~ m/,v (\d+\.\d+)/;
|
||||||
$VERSION = ($1) ? $1 : "UNKNOWN";
|
$VERSION = ($1) ? $1 : "UNKNOWN";
|
||||||
|
|
||||||
|
@ -282,8 +282,8 @@ $error=0;
|
||||||
|
|
||||||
my $banner = join("",
|
my $banner = join("",
|
||||||
'$RCSfile: imapsync,v $ ',
|
'$RCSfile: imapsync,v $ ',
|
||||||
'$Revision: 1.64 $ ',
|
'$Revision: 1.65 $ ',
|
||||||
'$Date: 2003/12/23 19:45:46 $ ',
|
'$Date: 2003/12/24 03:04:34 $ ',
|
||||||
"\n",
|
"\n",
|
||||||
"Mail::IMAPClient version used here is ",
|
"Mail::IMAPClient version used here is ",
|
||||||
$VERSION_IMAPClient, " auth md5 : $md5_supported",
|
$VERSION_IMAPClient, " auth md5 : $md5_supported",
|
||||||
|
@ -423,13 +423,26 @@ print
|
||||||
print
|
print
|
||||||
"From subscribed folders : ", map("[$_] ", keys(%fs_folders)), "\n";
|
"From subscribed folders : ", map("[$_] ", keys(%fs_folders)), "\n";
|
||||||
|
|
||||||
|
sub separator_invert {
|
||||||
|
my $o_sep="\000";
|
||||||
|
|
||||||
|
my($f_fold, $f_sep, $t_sep) = @_;
|
||||||
|
|
||||||
|
my $t_fold = $f_fold;
|
||||||
|
$t_fold =~ s@\Q$t_sep@$o_sep@g;
|
||||||
|
$t_fold =~ s@\Q$f_sep@$t_sep@g;
|
||||||
|
$t_fold =~ s@\Q$o_sep@$f_sep@g;
|
||||||
|
return($t_fold);
|
||||||
|
}
|
||||||
|
|
||||||
FOLDER: foreach my $f_fold (@f_folders) {
|
FOLDER: foreach my $f_fold (@f_folders) {
|
||||||
my $t_fold;
|
my $t_fold;
|
||||||
print "From Folder [$f_fold]\n";
|
print "From Folder [$f_fold]\n";
|
||||||
$t_fold = $f_fold;
|
|
||||||
$t_fold =~ s@\Q$f_sep@$t_sep@g unless ($f_sep eq $t_sep);
|
$t_fold = separator_invert($f_fold,$f_sep, $t_sep);
|
||||||
$t_fold = $prefix2 . $t_fold if ($prefix2);
|
$t_fold = $prefix2 . $t_fold if ($prefix2);
|
||||||
print "To Folder [$t_fold]\n";
|
print "To Folder [$t_fold]\n";
|
||||||
|
|
||||||
unless ($from->select($f_fold)) {
|
unless ($from->select($f_fold)) {
|
||||||
warn
|
warn
|
||||||
"From Folder $f_fold : Could not select ",
|
"From Folder $f_fold : Could not select ",
|
||||||
|
|
0
learn/hugemigr
Normal file → Executable file
0
learn/hugemigr
Normal file → Executable file
27
learn/separator
Executable file
27
learn/separator
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
my $f_sep="/";
|
||||||
|
my $t_sep=".";
|
||||||
|
my $o_sep="\000";
|
||||||
|
|
||||||
|
foreach my $f_fold ("testsub/testsub3", "testsub.testsub3", "a.b/c.d/e" ) {
|
||||||
|
my $t_fold;
|
||||||
|
print "From Folder [$f_fold]\n";
|
||||||
|
$t_fold = $f_fold;
|
||||||
|
my $t_fold2 = $t_fold3 = $f_fold;
|
||||||
|
|
||||||
|
$t_fold =~ s@\Q$f_sep@$t_sep@g;
|
||||||
|
$t_fold2 =~ s@\Q$t_sep@$f_sep@g;
|
||||||
|
$t_fold3 =~ s@\Q$t_sep@$o_sep@g;
|
||||||
|
$t_fold4 = $t_fold3;
|
||||||
|
$t_fold4 =~ s@\Q$f_sep@$t_sep@g;
|
||||||
|
$t_fold5 = $t_fold4;
|
||||||
|
$t_fold5 =~ s@\Q$o_sep@$f_sep@g;
|
||||||
|
|
||||||
|
#$t_fold =~ s@/@.@g;
|
||||||
|
print "To /. Folder [$t_fold]\n";
|
||||||
|
print "To ./ Folder2[$t_fold2]\n";
|
||||||
|
print "To .0 Folder3[$t_fold3]\n";
|
||||||
|
print "To .0 Folder4[$t_fold4]\n";
|
||||||
|
print "To 0/ Folder5[$t_fold5]\n\n";
|
||||||
|
}
|
16
learn/zz
16
learn/zz
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
my $f_sep="/";
|
|
||||||
my $t_sep=".";
|
|
||||||
|
|
||||||
foreach my $f_fold ("testsub/testsub3", "testsub.testsub3" ) {
|
|
||||||
my $t_fold;
|
|
||||||
print "From Folder [$f_fold]\n";
|
|
||||||
$t_fold = $f_fold;
|
|
||||||
my $t_fold2 = $f_fold;
|
|
||||||
$t_fold =~ s@\Q$f_sep@$t_sep@g;
|
|
||||||
$t_fold2 =~ s@\Q$t_sep@$f_sep@g;
|
|
||||||
#$t_fold =~ s@/@.@g;
|
|
||||||
print "To /. Folder [$t_fold]\n";
|
|
||||||
print "To ./ Folder2[$t_fold2]\n\n";
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue