mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-07 21:25:23 +02:00
1.53
This commit is contained in:
parent
901af35fb8
commit
1e4ee2aa4f
5 changed files with 113 additions and 29 deletions
29
ChangeLog
29
ChangeLog
|
@ -1,17 +1,38 @@
|
||||||
|
|
||||||
RCS file: RCS/imapsync,v
|
RCS file: RCS/imapsync,v
|
||||||
Working file: imapsync
|
Working file: imapsync
|
||||||
head: 1.48
|
head: 1.53
|
||||||
branch:
|
branch:
|
||||||
locks: strict
|
locks: strict
|
||||||
gilles: 1.48
|
|
||||||
access list:
|
access list:
|
||||||
symbolic names:
|
symbolic names:
|
||||||
keyword substitution: kv
|
keyword substitution: kv
|
||||||
total revisions: 48; selected revisions: 48
|
total revisions: 53; selected revisions: 53
|
||||||
description:
|
description:
|
||||||
----------------------------
|
----------------------------
|
||||||
revision 1.48 locked by: gilles;
|
revision 1.53
|
||||||
|
date: 2003/12/12 17:34:45; author: gilles; state: Exp; lines: +17 -6
|
||||||
|
Added comments.
|
||||||
|
Added subscribe code.
|
||||||
|
----------------------------
|
||||||
|
revision 1.52
|
||||||
|
date: 2003/12/12 17:16:51; author: gilles; state: Exp; lines: +12 -4
|
||||||
|
Use join() for the banner (less ugly).
|
||||||
|
----------------------------
|
||||||
|
revision 1.51
|
||||||
|
date: 2003/12/12 17:12:39; author: gilles; state: Exp; lines: +25 -9
|
||||||
|
Updated the INSTALL pod doc.
|
||||||
|
Prepared the --subscribe option.
|
||||||
|
----------------------------
|
||||||
|
revision 1.50
|
||||||
|
date: 2003/12/01 16:32:15; author: gilles; state: Exp; lines: +6 -4
|
||||||
|
Added Mail::IMAPClient::VERSION
|
||||||
|
----------------------------
|
||||||
|
revision 1.49
|
||||||
|
date: 2003/12/01 16:19:46; author: gilles; state: Exp; lines: +6 -6
|
||||||
|
Updated success stories.
|
||||||
|
----------------------------
|
||||||
|
revision 1.48
|
||||||
date: 2003/11/21 04:23:10; author: gilles; state: Exp; lines: +26 -4
|
date: 2003/11/21 04:23:10; author: gilles; state: Exp; lines: +26 -4
|
||||||
Added "HUGE MIGRATION" pod section. (Thanks
|
Added "HUGE MIGRATION" pod section. (Thanks
|
||||||
Tommi Lätti
|
Tommi Lätti
|
||||||
|
|
26
README
26
README
|
@ -1,13 +1,22 @@
|
||||||
NAME
|
NAME
|
||||||
imapsync - synchronize mailboxes between two imap servers.
|
imapsync - synchronize mailboxes between two imap servers.
|
||||||
|
|
||||||
$Revision: 1.48 $
|
$Revision: 1.53 $
|
||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
Get imapsync at http://www.linux-france.org/prj/imapsync/dist/
|
Get imapsync at
|
||||||
tar xzvf imapsync-x.xx.tgz # x.xx is the version number
|
http://www.linux-france.org/prj/imapsync/dist/
|
||||||
Read the INSTALL file.
|
|
||||||
freshmeat record: http://freshmeat.net/projects/imapsync/
|
You'll find a compressed tarball called imapsync-x.xx.tgz
|
||||||
|
where x.xx is the version number. Untar the tarball where
|
||||||
|
you want :
|
||||||
|
|
||||||
|
tar xzvf imapsync-x.xx.tgz
|
||||||
|
|
||||||
|
Go into the directory imapsync-x.xx and read the INSTALL
|
||||||
|
file.
|
||||||
|
|
||||||
|
The freshmeat record is http://freshmeat.net/projects/imapsync/
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
imapsync [options]
|
imapsync [options]
|
||||||
|
@ -121,8 +130,8 @@ BUGS
|
||||||
IMAP SERVERS
|
IMAP SERVERS
|
||||||
Success stories reported :
|
Success stories reported :
|
||||||
|
|
||||||
- Courier IMAP 1.5.1
|
- Courier IMAP 1.5.1, 2.1.1
|
||||||
- Cyrus IMAP 1.5, 1.6, 2.1
|
- Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.2.1
|
||||||
- Netscape Mail Server 3.6 (Wintel)
|
- Netscape Mail Server 3.6 (Wintel)
|
||||||
- CommunicatePro server (Redhat 8.0)
|
- CommunicatePro server (Redhat 8.0)
|
||||||
- SunONE Messaging server 5.2
|
- SunONE Messaging server 5.2
|
||||||
|
@ -157,6 +166,7 @@ HUGE MIGRATION
|
||||||
|
|
||||||
Welcome in shell programming !
|
Welcome in shell programming !
|
||||||
|
|
||||||
|
Hacking
|
||||||
SIMILAR SOFTWARES
|
SIMILAR SOFTWARES
|
||||||
offlineimap : http://gopher.quux.org:70/devel/offlineimap/
|
offlineimap : http://gopher.quux.org:70/devel/offlineimap/
|
||||||
mailsync : http://mailsync.sourceforge.net/
|
mailsync : http://mailsync.sourceforge.net/
|
||||||
|
@ -165,5 +175,5 @@ SIMILAR SOFTWARES
|
||||||
|
|
||||||
Feedback (good or bad) will be always welcome.
|
Feedback (good or bad) will be always welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.48 2003/11/21 04:23:10 gilles Exp gilles $
|
$Id: imapsync,v 1.53 2003/12/12 17:34:45 gilles Exp $
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.48
|
1.53
|
||||||
|
|
59
imapsync
59
imapsync
|
@ -4,14 +4,23 @@
|
||||||
|
|
||||||
imapsync - synchronize mailboxes between two imap servers.
|
imapsync - synchronize mailboxes between two imap servers.
|
||||||
|
|
||||||
$Revision: 1.48 $
|
$Revision: 1.53 $
|
||||||
|
|
||||||
=head1 INSTALL
|
=head1 INSTALL
|
||||||
|
|
||||||
Get imapsync at http://www.linux-france.org/prj/imapsync/dist/
|
Get imapsync at
|
||||||
tar xzvf imapsync-x.xx.tgz # x.xx is the version number
|
http://www.linux-france.org/prj/imapsync/dist/
|
||||||
Read the INSTALL file.
|
|
||||||
freshmeat record: http://freshmeat.net/projects/imapsync/
|
You'll find a compressed tarball called imapsync-x.xx.tgz
|
||||||
|
where x.xx is the version number. Untar the tarball where
|
||||||
|
you want :
|
||||||
|
|
||||||
|
tar xzvf imapsync-x.xx.tgz
|
||||||
|
|
||||||
|
Go into the directory imapsync-x.xx and read the INSTALL
|
||||||
|
file.
|
||||||
|
|
||||||
|
The freshmeat record is http://freshmeat.net/projects/imapsync/
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
@ -143,8 +152,8 @@ Report any bugs to the author: lamiral@linux-france.org
|
||||||
|
|
||||||
Success stories reported :
|
Success stories reported :
|
||||||
|
|
||||||
- Courier IMAP 1.5.1
|
- Courier IMAP 1.5.1, 2.1.1
|
||||||
- Cyrus IMAP 1.5, 1.6, 2.1
|
- Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.2.1
|
||||||
- Netscape Mail Server 3.6 (Wintel)
|
- Netscape Mail Server 3.6 (Wintel)
|
||||||
- CommunicatePro server (Redhat 8.0)
|
- CommunicatePro server (Redhat 8.0)
|
||||||
- SunONE Messaging server 5.2
|
- SunONE Messaging server 5.2
|
||||||
|
@ -185,6 +194,10 @@ done ; } < file.csv
|
||||||
|
|
||||||
Welcome in shell programming !
|
Welcome in shell programming !
|
||||||
|
|
||||||
|
=head1 Hacking
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=head1 SIMILAR SOFTWARES
|
=head1 SIMILAR SOFTWARES
|
||||||
|
|
||||||
offlineimap : http://gopher.quux.org:70/devel/offlineimap/
|
offlineimap : http://gopher.quux.org:70/devel/offlineimap/
|
||||||
|
@ -194,7 +207,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.48 2003/11/21 04:23:10 gilles Exp gilles $
|
$Id: imapsync,v 1.53 2003/12/12 17:34:45 gilles Exp $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
@ -215,19 +228,28 @@ my(
|
||||||
@folder, $prefix2,
|
@folder, $prefix2,
|
||||||
$sep1, $sep2,
|
$sep1, $sep2,
|
||||||
$syncinternaldates,
|
$syncinternaldates,
|
||||||
$delete, $expunge, $dry, $subscribed,
|
$delete, $expunge, $dry, $subscribed, $subscribe,
|
||||||
$version, $VERSION, $help,
|
$version, $VERSION, $help,
|
||||||
);
|
);
|
||||||
|
|
||||||
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.48 2003/11/21 04:23:10 gilles Exp gilles $ ';
|
$rcs = ' $Id: imapsync,v 1.53 2003/12/12 17:34:45 gilles Exp $ ';
|
||||||
$rcs =~ m/,v (\d+\.\d+)/;
|
$rcs =~ m/,v (\d+\.\d+)/;
|
||||||
$VERSION = ($1) ? $1 : "UNKNOWN";
|
$VERSION = ($1) ? $1 : "UNKNOWN";
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
my $banner = '$RCSfile: imapsync,v $ ' . '$Revision: 1.48 $ ' . '$Date: 2003/11/21 04:23:10 $ ' . "\n";
|
my $banner = join("",
|
||||||
|
'$RCSfile: imapsync,v $ ',
|
||||||
|
'$Revision: 1.53 $ ',
|
||||||
|
'$Date: 2003/12/12 17:34:45 $ ',
|
||||||
|
"\n",
|
||||||
|
"Mail::IMAPClient version used here is ",
|
||||||
|
$Mail::IMAPClient::VERSION,
|
||||||
|
"\n"
|
||||||
|
);
|
||||||
|
|
||||||
unless(defined(&_SYSEXITS_H)) {
|
unless(defined(&_SYSEXITS_H)) {
|
||||||
# 64 on my linux box.
|
# 64 on my linux box.
|
||||||
|
@ -388,6 +410,11 @@ FOLDER: foreach my $f_fold (@f_folders) {
|
||||||
$to->expunge();
|
$to->expunge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($subscribe) {
|
||||||
|
print "Subscribing to folder $t_fold on destination server\n";
|
||||||
|
$to->subscribe($t_fold);
|
||||||
|
}
|
||||||
|
|
||||||
my @f_msgs = $from->search("ALL");
|
my @f_msgs = $from->search("ALL");
|
||||||
$debug and print "LIST FROM : @f_msgs\n";
|
$debug and print "LIST FROM : @f_msgs\n";
|
||||||
my @t_msgs = $to->search("ALL");
|
my @t_msgs = $to->search("ALL");
|
||||||
|
@ -528,13 +555,20 @@ sub get_options
|
||||||
"dry!" => \$dry,
|
"dry!" => \$dry,
|
||||||
"expunge!" => \$expunge,
|
"expunge!" => \$expunge,
|
||||||
"subscribed!" => \$subscribed,
|
"subscribed!" => \$subscribed,
|
||||||
|
"subscribe!" => \$subscribe,
|
||||||
"version" => \$version,
|
"version" => \$version,
|
||||||
"help" => \$help,
|
"help" => \$help,
|
||||||
);
|
);
|
||||||
|
|
||||||
$debug and print "get options: [$opt_ret]\n";
|
$debug and print "get options: [$opt_ret]\n";
|
||||||
|
|
||||||
|
# just the version
|
||||||
print "$VERSION\n" and exit if ($version) ;
|
print "$VERSION\n" and exit if ($version) ;
|
||||||
|
|
||||||
|
# exit with --help option or no option at all
|
||||||
usage() and exit if ($help or ! $numopt) ;
|
usage() and exit if ($help or ! $numopt) ;
|
||||||
|
|
||||||
|
# don't go on if options are not all known.
|
||||||
exit(EX_USAGE()) unless ($opt_ret) ;
|
exit(EX_USAGE()) unless ($opt_ret) ;
|
||||||
|
|
||||||
|
|
||||||
|
@ -613,6 +647,8 @@ Several options are mandatory.
|
||||||
--syncinternaldates : set the internal dates on host2 same as host1
|
--syncinternaldates : set the internal dates on host2 same as host1
|
||||||
--dry : do nothing, just print what would be done.
|
--dry : do nothing, just print what would be done.
|
||||||
--subscribed : transfer only subscribed folders.
|
--subscribed : transfer only subscribed folders.
|
||||||
|
--subscribe : subscribe to the folders transfered on the
|
||||||
|
"destination" server.
|
||||||
--debug : debug mode.
|
--debug : debug mode.
|
||||||
--debugimap : imap debug mode.
|
--debugimap : imap debug mode.
|
||||||
--version : print sotfware version.
|
--version : print sotfware version.
|
||||||
|
@ -626,6 +662,7 @@ $0 \\
|
||||||
--host2 imap.trac.org --user2 bar --passfile2 /etc/secret2
|
--host2 imap.trac.org --user2 bar --passfile2 /etc/secret2
|
||||||
|
|
||||||
|
|
||||||
|
Mail::IMAPClient version is $Mail::IMAPClient::VERSION
|
||||||
$rcs
|
$rcs
|
||||||
imapsync copyleft is the GNU General Public License.
|
imapsync copyleft is the GNU General Public License.
|
||||||
See http://www.gnu.org/copyleft/gpl.html
|
See http://www.gnu.org/copyleft/gpl.html
|
||||||
|
|
26
tests.sh
26
tests.sh
|
@ -1,8 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: tests.sh,v 1.10 2003/11/21 03:20:14 gilles Exp $
|
# $Id: tests.sh,v 1.11 2003/12/12 17:48:02 gilles Exp $
|
||||||
|
|
||||||
# $Log: tests.sh,v $
|
# $Log: tests.sh,v $
|
||||||
|
# Revision 1.11 2003/12/12 17:48:02 gilles
|
||||||
|
# Added lp_subscribe() test
|
||||||
|
#
|
||||||
# Revision 1.10 2003/11/21 03:20:14 gilles
|
# Revision 1.10 2003/11/21 03:20:14 gilles
|
||||||
# Renamed lp_folder_qqq() pl_folder_qqq()
|
# Renamed lp_folder_qqq() pl_folder_qqq()
|
||||||
# Removed --prefix2 INBOX. in pl_folder_qqq()
|
# Removed --prefix2 INBOX. in pl_folder_qqq()
|
||||||
|
@ -205,12 +208,24 @@ lp_subscribed()
|
||||||
else
|
else
|
||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
lp_subscribe()
|
||||||
|
{
|
||||||
|
if test X`hostname` = X"plume"; then
|
||||||
|
echo3 Here is plume
|
||||||
|
./imapsync \
|
||||||
|
--host2 plume --user2 tata@est.belle \
|
||||||
|
--passfile2 /var/tmp/secret.tata \
|
||||||
|
--host1 loul --user1 tata \
|
||||||
|
--passfile1 /var/tmp/secret.tata \
|
||||||
|
--subscribed --subscribe
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# mandatory tests
|
# mandatory tests
|
||||||
|
|
||||||
|
@ -227,7 +242,8 @@ test $# -eq 0 && run_tests \
|
||||||
pl_folder \
|
pl_folder \
|
||||||
pl_folder_qqq \
|
pl_folder_qqq \
|
||||||
lp_internaldate \
|
lp_internaldate \
|
||||||
lp_subscribed
|
lp_subscribed \
|
||||||
|
lp_subscribe \
|
||||||
|
|
||||||
# selective tests
|
# selective tests
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue