This commit is contained in:
Nick Bebout 2011-03-12 02:44:19 +00:00
parent 05cda6e79b
commit 028e94e1f1
5 changed files with 27 additions and 18 deletions

View file

@ -1,5 +1,8 @@
#!/bin/cat #!/bin/cat
Michael Menge
Patch made --regextrans2 a multiple option
Arnaud Launay Arnaud Launay
Bug about --expunge12 (no option code) Bug about --expunge12 (no option code)

View file

@ -1,17 +1,20 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 1.142 head: 1.143
branch: branch:
locks: strict locks: strict
gilles: 1.142
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 142; selected revisions: 142 total revisions: 143; selected revisions: 143
description: description:
---------------------------- ----------------------------
revision 1.142 locked by: gilles; revision 1.143
date: 2005/11/27 20:36:12; author: gilles; state: Exp; lines: +12 -10
made --regextrans2 a multiple option
----------------------------
revision 1.142
date: 2005/11/16 01:08:49; author: gilles; state: Exp; lines: +7 -5 date: 2005/11/16 01:08:49; author: gilles; state: Exp; lines: +7 -5
Added expunge1 and expunge2 getoption code Added expunge1 and expunge2 getoption code
---------------------------- ----------------------------

7
README
View file

@ -2,7 +2,7 @@ NAME
imapsync - IMAP synchronization, copy or migration tool. Synchronize imapsync - IMAP synchronization, copy or migration tool. Synchronize
mailboxes between two imap servers. Good at IMAP migration. mailboxes between two imap servers. Good at IMAP migration.
$Revision: 1.142 $ $Revision: 1.143 $
INSTALL INSTALL
imapsync works fine under any Unix OS. imapsync works fine under any Unix OS.
@ -35,7 +35,8 @@ SYNOPSIS
[--noauthmd5] [--noauthmd5]
[--folder <string> --folder <string> ...] [--folder <string> --folder <string> ...]
[--include <regex>] [--exclude <regex>] [--include <regex>] [--exclude <regex>]
[--prefix2 <string>] [--regextrans2 <regex>] [--prefix2 <string>]
[--regextrans2 <regex> --regextrans2 <regex> ...]
[--sep1 <char>] [--sep1 <char>]
[--sep2 <char>] [--sep2 <char>]
[--justfolders] [--justconnect] [--justfolders] [--justconnect]
@ -261,5 +262,5 @@ AUTHOR
teaching free open and gratis softwares. Don't hesitate to pay him for teaching free open and gratis softwares. Don't hesitate to pay him for
that services. that services.
$Id: imapsync,v 1.142 2005/11/16 01:08:49 gilles Exp gilles $ $Id: imapsync,v 1.143 2005/11/27 20:36:12 gilles Exp $

View file

@ -1 +1 @@
1.142 1.143

View file

@ -6,7 +6,7 @@ imapsync - IMAP synchronization, copy or migration
tool. Synchronize mailboxes between two imap servers. Good tool. Synchronize mailboxes between two imap servers. Good
at IMAP migration. at IMAP migration.
$Revision: 1.142 $ $Revision: 1.143 $
=head1 INSTALL =head1 INSTALL
@ -41,7 +41,8 @@ $Revision: 1.142 $
[--noauthmd5] [--noauthmd5]
[--folder <string> --folder <string> ...] [--folder <string> --folder <string> ...]
[--include <regex>] [--exclude <regex>] [--include <regex>] [--exclude <regex>]
[--prefix2 <string>] [--regextrans2 <regex>] [--prefix2 <string>]
[--regextrans2 <regex> --regextrans2 <regex> ...]
[--sep1 <char>] [--sep1 <char>]
[--sep2 <char>] [--sep2 <char>]
[--justfolders] [--justconnect] [--justfolders] [--justconnect]
@ -305,7 +306,7 @@ Gilles LAMIRAL earn his living writing, installing,
configuring and teaching free open and gratis configuring and teaching free open and gratis
softwares. Don't hesitate to pay him for that services. softwares. Don't hesitate to pay him for that services.
$Id: imapsync,v 1.142 2005/11/16 01:08:49 gilles Exp gilles $ $Id: imapsync,v 1.143 2005/11/27 20:36:12 gilles Exp $
=cut =cut
@ -325,7 +326,7 @@ my(
$rcs, $debug, $debugimap, $error, $rcs, $debug, $debugimap, $error,
$host1, $host2, $port1, $port2, $host1, $host2, $port1, $port2,
$user1, $user2, $password1, $password2, $passfile1, $passfile2, $user1, $user2, $password1, $password2, $passfile1, $passfile2,
@folder, $include, $exclude, $prefix2, $regextrans2, @regexmess, @folder, $include, $exclude, $prefix2, @regextrans2, @regexmess,
$sep1, $sep2, $sep1, $sep2,
$syncinternaldates, $syncacls, $syncinternaldates, $syncacls,
$fastio1, $fastio2, $fastio1, $fastio2,
@ -350,7 +351,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.142 2005/11/16 01:08:49 gilles Exp gilles $ '; $rcs = ' $Id: imapsync,v 1.143 2005/11/27 20:36:12 gilles Exp $ ';
$rcs =~ m/,v (\d+\.\d+)/; $rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN"; $VERSION = ($1) ? $1 : "UNKNOWN";
@ -387,8 +388,8 @@ $error=0;
my $banner = join("", my $banner = join("",
'$RCSfile: imapsync,v $ ', '$RCSfile: imapsync,v $ ',
'$Revision: 1.142 $ ', '$Revision: 1.143 $ ',
'$Date: 2005/11/16 01:08:49 $ ', '$Date: 2005/11/27 20:36:12 $ ',
"\n", "\n",
"Mail::IMAPClient version used here is ", "Mail::IMAPClient version used here is ",
$VERSION_IMAPClient,"\n" $VERSION_IMAPClient,"\n"
@ -709,8 +710,8 @@ FOLDER: foreach my $f_fold (@f_folders) {
# Adding the prefix supplied by the --prefix2 option # Adding the prefix supplied by the --prefix2 option
$t_fold = $prefix2 . $t_fold if ($prefix2); $t_fold = $prefix2 . $t_fold if ($prefix2);
# Transforming the folder name by the --regextrans2 option # Transforming the folder name by the --regextrans2 option(s)
if ($regextrans2) { foreach my $regextrans2 (@regextrans2) {
$debug and print "eval \$t_fold =~ $regextrans2\n"; $debug and print "eval \$t_fold =~ $regextrans2\n";
eval("\$t_fold =~ $regextrans2"); eval("\$t_fold =~ $regextrans2");
} }
@ -1018,7 +1019,7 @@ sub get_options
"include=s" => \$include, "include=s" => \$include,
"exclude=s" => \$exclude, "exclude=s" => \$exclude,
"prefix2=s" => \$prefix2, "prefix2=s" => \$prefix2,
"regextrans2=s" => \$regextrans2, "regextrans2=s" => \@regextrans2,
"regexmess=s" => \@regexmess, "regexmess=s" => \@regexmess,
"delete!" => \$delete, "delete!" => \$delete,
"syncinternaldates!" => \$syncinternaldates, "syncinternaldates!" => \$syncinternaldates,
@ -1151,6 +1152,7 @@ Several options are mandatory.
--prefix2 <string> : add prefix to all destination folders --prefix2 <string> : add prefix to all destination folders
(usually INBOX. for cyrus imap servers) (usually INBOX. for cyrus imap servers)
--regextrans2 <regex> : Apply the whole regex to each destination folders. --regextrans2 <regex> : Apply the whole regex to each destination folders.
--regextrans2 <regex> : and this one. etc.
--regexmess <regex> : Apply the whole regex to each message before transfer. --regexmess <regex> : Apply the whole regex to each message before transfer.
Exemple : 's/\\000/ /g' # to replace null by space. Exemple : 's/\\000/ /g' # to replace null by space.
--regexmess <regex> : and this one. --regexmess <regex> : and this one.