This commit is contained in:
Nick Bebout 2011-03-12 02:44:20 +00:00
parent 02b830ba86
commit 471328efae
7 changed files with 76 additions and 16 deletions

19
CREDITS
View file

@ -1,5 +1,24 @@
#!/bin/cat #!/bin/cat
Jim Rosenberg
Had problems with dbmail.
Thomas Stegbauer
Suggested the mailing list creation.
Stan Novogroudski
Made me wrote the learn/subscribe script example.
René Pfeiffer
Paid me 100 euros for just an imapsync success story
and little help from me. René also wrote a LinuxGazette
article about imapsync in april/may 2006
Mike
Gave "Mdaemon 8.1" success story.
(Pb with folders containing 2000 messages,
had to split them to 800 messages)
Nicolai Rasmussen Nicolai Rasmussen
Suggested the --minage option and asked Suggested the --minage option and asked
a friend of him to code it. a friend of him to code it.

View file

@ -1,15 +1,24 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 1.145 head: 1.147
branch: branch:
locks: strict locks: strict
gilles: 1.147
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 145; selected revisions: 145 total revisions: 147; selected revisions: 147
description: description:
---------------------------- ----------------------------
revision 1.147 locked by: gilles;
date: 2006/02/08 07:54:46; author: gilles; state: Exp; lines: +7 -9
Just a little debug for Jim.
----------------------------
revision 1.146
date: 2006/01/13 02:43:18; author: gilles; state: Exp; lines: +6 -6
MDaemon
----------------------------
revision 1.145 revision 1.145
date: 2005/12/04 01:58:54; author: gilles; state: Exp; lines: +54 -12 date: 2005/12/04 01:58:54; author: gilles; state: Exp; lines: +54 -12
Added --minage option Added --minage option

6
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.145 $ $Revision: 1.147 $
INSTALL INSTALL
imapsync works fine under any Unix OS. imapsync works fine under any Unix OS.
@ -188,7 +188,7 @@ IMAP SERVERS
- Groupwise IMAP (Novell). Buggy so see the FAQ. - Groupwise IMAP (Novell). Buggy so see the FAQ.
- iPlanet Messaging server 4.15, 5.1 - iPlanet Messaging server 4.15, 5.1
- IMail 7.15 (Ipswitch/Win2003), 8.12 - IMail 7.15 (Ipswitch/Win2003), 8.12
- MDaemon 7.0.1 - MDaemon 7.0.1, 8.1
- MS Exchange Server 5.5 - MS Exchange Server 5.5
- Netscape Mail Server 3.6 (Wintel !) - Netscape Mail Server 3.6 (Wintel !)
- Netscape Messaging Server 4.15 Patch 7 - Netscape Messaging Server 4.15 Patch 7
@ -263,5 +263,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.145 2005/12/04 01:58:54 gilles Exp $ $Id: imapsync,v 1.147 2006/02/08 07:54:46 gilles Exp gilles $

10
TODO
View file

@ -1,6 +1,16 @@
TODO file for imapsync TODO file for imapsync
---------------------- ----------------------
Create a imapsync mailing list.
Add features from Herman (patch against 1.139)
- Support for authenticating as different (admin) user
- Support for different auth mechanisms (we needed PLAIN)
Add my amazon wishlist link.
Add an --exactsync option to remove target messages Add an --exactsync option to remove target messages
that are not on source. that are not on source.

View file

@ -1 +1 @@
1.145 1.147

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.145 $ $Revision: 1.147 $
=head1 INSTALL =head1 INSTALL
@ -213,7 +213,7 @@ Success stories reported with the following imap servers
- Groupwise IMAP (Novell). Buggy so see the FAQ. - Groupwise IMAP (Novell). Buggy so see the FAQ.
- iPlanet Messaging server 4.15, 5.1 - iPlanet Messaging server 4.15, 5.1
- IMail 7.15 (Ipswitch/Win2003), 8.12 - IMail 7.15 (Ipswitch/Win2003), 8.12
- MDaemon 7.0.1 - MDaemon 7.0.1, 8.1
- MS Exchange Server 5.5 - MS Exchange Server 5.5
- Netscape Mail Server 3.6 (Wintel !) - Netscape Mail Server 3.6 (Wintel !)
- Netscape Messaging Server 4.15 Patch 7 - Netscape Messaging Server 4.15 Patch 7
@ -308,7 +308,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.145 2005/12/04 01:58:54 gilles Exp $ $Id: imapsync,v 1.147 2006/02/08 07:54:46 gilles Exp gilles $
=cut =cut
@ -355,7 +355,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.145 2005/12/04 01:58:54 gilles Exp $ '; $rcs = ' $Id: imapsync,v 1.147 2006/02/08 07:54:46 gilles Exp gilles $ ';
$rcs =~ m/,v (\d+\.\d+)/; $rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN"; $VERSION = ($1) ? $1 : "UNKNOWN";
@ -392,8 +392,8 @@ $error=0;
my $banner = join("", my $banner = join("",
'$RCSfile: imapsync,v $ ', '$RCSfile: imapsync,v $ ',
'$Revision: 1.145 $ ', '$Revision: 1.147 $ ',
'$Date: 2005/12/04 01:58:54 $ ', '$Date: 2006/02/08 07:54:46 $ ',
"\n", "\n",
"Mail::IMAPClient version used here is ", "Mail::IMAPClient version used here is ",
$VERSION_IMAPClient,"\n" $VERSION_IMAPClient,"\n"
@ -822,18 +822,16 @@ FOLDER: foreach my $f_fold (@f_folders) {
$debug and print "LIST FROM : @f_msgs\n"; $debug and print "LIST FROM : [@f_msgs]\n";
# internal dates on "TO" are after the ones on "FROM" # internal dates on "TO" are after the ones on "FROM"
# normally... # normally...
my @t_msgs = select_msgs($to); my @t_msgs = select_msgs($to);
$debug and print "LIST TO : @t_msgs\n"; $debug and print "LIST TO : [@t_msgs]\n";
my %f_hash = (); my %f_hash = ();
my %t_hash = (); my %t_hash = ();
print "++++ From [$f_fold] Parse 1 ++++\n"; print "++++ From [$f_fold] Parse 1 ++++\n";
my $f_heads = $from->parse_headers($from->Range([@f_msgs]),@useheader) my $f_heads = $from->parse_headers($from->Range([@f_msgs]),@useheader)

24
learn/subscribe Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/perl -w
use Mail::IMAPClient;
$ARGV[1] or die "usage: $0 user password\n";
$host = "localhost";
$user = $ARGV[0];
$password = $ARGV[1];
my $imap = Mail::IMAPClient->new();
#$imap->Debug(1);
$imap->Server($host);
$imap->connect() or die;
$imap->User($user);
$imap->Password($password);
$imap->login() or die;
$imap->subscribe("shared.Spam") or die;
print "$user subscribed to\n",
join("\n", $imap->subscribed()),
"\n";
$imap->close();