mirror of
https://github.com/imapsync/imapsync.git
synced 2024-11-17 00:02:29 +01:00
1.40
This commit is contained in:
parent
1ae8613d80
commit
a50a15a2c1
17
ChangeLog
17
ChangeLog
@ -1,15 +1,28 @@
|
||||
|
||||
RCS file: RCS/imapsync,v
|
||||
Working file: imapsync
|
||||
head: 1.37
|
||||
head: 1.40
|
||||
branch:
|
||||
locks: strict
|
||||
access list:
|
||||
symbolic names:
|
||||
keyword substitution: kv
|
||||
total revisions: 37; selected revisions: 37
|
||||
total revisions: 40; selected revisions: 40
|
||||
description:
|
||||
----------------------------
|
||||
revision 1.40
|
||||
date: 2003/10/17 01:34:59; author: gilles; state: Exp; lines: +5 -5
|
||||
Added condition to add prefix2
|
||||
----------------------------
|
||||
revision 1.39
|
||||
date: 2003/10/17 01:26:20; author: gilles; state: Exp; lines: +4 -14
|
||||
Removed commented code
|
||||
----------------------------
|
||||
revision 1.38
|
||||
date: 2003/10/17 01:25:40; author: gilles; state: Exp; lines: +12 -7
|
||||
Added --prefix2 option for the INBOX. namespace problem
|
||||
with cyrus imap servers.
|
||||
----------------------------
|
||||
revision 1.37
|
||||
date: 2003/10/16 01:37:52; author: gilles; state: Exp; lines: +9 -8
|
||||
Added a loop in case there is several identical key header
|
||||
|
5
README
5
README
@ -1,7 +1,7 @@
|
||||
NAME
|
||||
imapsync - synchronize mailboxes between two imap servers.
|
||||
|
||||
$Revision: 1.37 $
|
||||
$Revision: 1.40 $
|
||||
|
||||
INSTALL
|
||||
Get imapsync at http://www.linux-france.org/prj/imapsync/dist/
|
||||
@ -20,6 +20,7 @@ SYNOPSIS
|
||||
[--host2 server2] [--port2 <num>]
|
||||
[--user2 <string>] [--passfile2 <string>]
|
||||
[--folder <string> --folder <string> ...]
|
||||
[--prefix2 <string>]
|
||||
[--delete] [--expunge]
|
||||
[--dry]
|
||||
[--debug] [--debugimap]
|
||||
@ -126,5 +127,5 @@ SIMILAR SOFTWARES
|
||||
|
||||
Feedback (good or bad) will be always welcome.
|
||||
|
||||
$Id: imapsync,v 1.37 2003/10/16 01:37:52 gilles Exp $
|
||||
$Id: imapsync,v 1.40 2003/10/17 01:34:59 gilles Exp $
|
||||
|
||||
|
25
imapsync
25
imapsync
@ -4,7 +4,7 @@
|
||||
|
||||
imapsync - synchronize mailboxes between two imap servers.
|
||||
|
||||
$Revision: 1.37 $
|
||||
$Revision: 1.40 $
|
||||
|
||||
=head1 INSTALL
|
||||
|
||||
@ -25,6 +25,7 @@ $Revision: 1.37 $
|
||||
[--host2 server2] [--port2 <num>]
|
||||
[--user2 <string>] [--passfile2 <string>]
|
||||
[--folder <string> --folder <string> ...]
|
||||
[--prefix2 <string>]
|
||||
[--delete] [--expunge]
|
||||
[--dry]
|
||||
[--debug] [--debugimap]
|
||||
@ -146,7 +147,7 @@ Rate imapsync : http://freshmeat.net/projects/imapsync/
|
||||
|
||||
Feedback (good or bad) will be always welcome.
|
||||
|
||||
$Id: imapsync,v 1.37 2003/10/16 01:37:52 gilles Exp $
|
||||
$Id: imapsync,v 1.40 2003/10/17 01:34:59 gilles Exp $
|
||||
|
||||
=cut
|
||||
|
||||
@ -161,7 +162,7 @@ my(
|
||||
$rcs, $debug, $debugimap, $error,
|
||||
$host1, $host2, $port1, $port2,
|
||||
$user1, $user2, $password1, $password2, $passfile1, $passfile2,
|
||||
@folder,
|
||||
@folder, $prefix2,
|
||||
$delete, $expunge, $dry,
|
||||
$version, $VERSION, $help,
|
||||
);
|
||||
@ -169,12 +170,12 @@ my(
|
||||
use vars qw ($opt_G); # missing code for this will be option.
|
||||
|
||||
|
||||
$rcs = ' $Id: imapsync,v 1.37 2003/10/16 01:37:52 gilles Exp $ ';
|
||||
$rcs = ' $Id: imapsync,v 1.40 2003/10/17 01:34:59 gilles Exp $ ';
|
||||
$rcs =~ m/,v (\d+\.\d+)/;
|
||||
$VERSION = ($1) ? $1 : "UNKNOWN";
|
||||
$error=0;
|
||||
|
||||
my $banner = '$RCSfile: imapsync,v $ ' . '$Revision: 1.37 $ ' . '$Date: 2003/10/16 01:37:52 $ ' . "\n";
|
||||
my $banner = '$RCSfile: imapsync,v $ ' . '$Revision: 1.40 $ ' . '$Date: 2003/10/17 01:34:59 $ ' . "\n";
|
||||
|
||||
|
||||
get_options();
|
||||
@ -248,16 +249,6 @@ print "To separator : [$t_sep]\n";
|
||||
# needed for setting flags
|
||||
my $tohasuidplus = $to->has_capability("UIDPLUS");
|
||||
|
||||
#if (scalar(@folder)) {
|
||||
# # folders are given as argument.
|
||||
# foreach my $f_fold (@folder) {
|
||||
# push (@f_folders, @{$from->folders($f_fold)});
|
||||
# }
|
||||
#}else{
|
||||
# # no folder given so select all
|
||||
# @f_folders = @{$from->folders()};
|
||||
#}
|
||||
|
||||
|
||||
@t_folders = @{$to->folders()};
|
||||
print
|
||||
@ -270,6 +261,7 @@ FOLDER: foreach my $f_fold (@f_folders) {
|
||||
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 = $prefix2 . $t_fold if ($prefix2);
|
||||
print "To Folder [$t_fold]\n";
|
||||
unless ($from->select($f_fold)) {
|
||||
warn
|
||||
@ -435,6 +427,7 @@ sub get_options
|
||||
"passfile1=s" => \$passfile1,
|
||||
"passfile2=s" => \$passfile2,
|
||||
"folder=s" => \@folder,
|
||||
"prefix2=s" => \$prefix2,
|
||||
"delete!" => \$delete,
|
||||
"dry!" => \$dry,
|
||||
"expunge!" => \$expunge,
|
||||
@ -509,6 +502,8 @@ Several options are mandatory.
|
||||
--folder <string> : sync only this folder and its children.
|
||||
--folder <string> : and this one (and its children).
|
||||
--folder <string> : and this one, etc.
|
||||
--prefix2 <string> : Add prefix to all destination folders
|
||||
(usually INBOX. for cyrus imap servers)
|
||||
--delete : delete messages in "from" imap server after
|
||||
a successful transfert. useful in case you
|
||||
want to migrate from one server to another one.
|
||||
|
29
tests.sh
29
tests.sh
@ -1,8 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $Id: tests.sh,v 1.6 2003/08/24 01:56:49 gilles Exp $
|
||||
# $Id: tests.sh,v 1.7 2003/10/17 01:34:16 gilles Exp $
|
||||
|
||||
# $Log: tests.sh,v $
|
||||
# Revision 1.7 2003/10/17 01:34:16 gilles
|
||||
# Added lp_folder_qqq() test
|
||||
#
|
||||
# Revision 1.6 2003/08/24 01:56:49 gilles
|
||||
# Indented long lines
|
||||
#
|
||||
@ -125,6 +128,24 @@ lp_folder() {
|
||||
fi
|
||||
}
|
||||
|
||||
lp_folder_qqq() {
|
||||
if test X`hostname` = X"plume"; then
|
||||
echo3 Here is plume
|
||||
./imapsync \
|
||||
--host2 plume --user2 tata@est.belle \
|
||||
--passfile2 /var/tmp/secret.tata \
|
||||
--folder INBOX.qqq \
|
||||
--prefix2 INBOX. \
|
||||
--host1 loul --user1 tata \
|
||||
--passfile1 /var/tmp/secret.tata
|
||||
else
|
||||
:
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
pl_folder() {
|
||||
if test X`hostname` = X"plume"; then
|
||||
echo3 Here is plume
|
||||
@ -140,6 +161,9 @@ pl_folder() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# mandatory tests
|
||||
|
||||
run_tests perl_syntax
|
||||
@ -152,7 +176,8 @@ test $# -eq 0 && run_tests \
|
||||
loulplume \
|
||||
plumeloul \
|
||||
lp_folder \
|
||||
pl_folder
|
||||
pl_folder \
|
||||
lp_folder_qqq
|
||||
|
||||
# selective tests
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user