mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-12 23:44:52 +02:00
1.72
This commit is contained in:
parent
1f3e4ec56b
commit
8d7bb14b19
6 changed files with 75 additions and 16 deletions
3
CREDITS
3
CREDITS
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
Holger Mauermann
|
||||||
|
Bug about missing "AUTH=CRAM-MD5" (also copy-paste mistake in login_imap)
|
||||||
|
|
||||||
Kaspar Brand
|
Kaspar Brand
|
||||||
Wrote code implementing options
|
Wrote code implementing options
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
|
|
||||||
RCS file: RCS/imapsync,v
|
RCS file: RCS/imapsync,v
|
||||||
Working file: imapsync
|
Working file: imapsync
|
||||||
head: 1.71
|
head: 1.72
|
||||||
branch:
|
branch:
|
||||||
locks: strict
|
locks: strict
|
||||||
access list:
|
access list:
|
||||||
symbolic names:
|
symbolic names:
|
||||||
keyword substitution: kv
|
keyword substitution: kv
|
||||||
total revisions: 71; selected revisions: 71
|
total revisions: 72; selected revisions: 72
|
||||||
description:
|
description:
|
||||||
----------------------------
|
----------------------------
|
||||||
|
revision 1.72
|
||||||
|
date: 2004/02/09 15:42:33; author: gilles; state: Exp; lines: +39 -9
|
||||||
|
Better MD5 handling
|
||||||
|
----------------------------
|
||||||
revision 1.71
|
revision 1.71
|
||||||
date: 2004/01/29 04:28:36; author: gilles; state: Exp; lines: +23 -7
|
date: 2004/01/29 04:28:36; author: gilles; state: Exp; lines: +23 -7
|
||||||
Added statistics about bytes transfered, skipped
|
Added statistics about bytes transfered, skipped
|
||||||
|
|
4
README
4
README
|
@ -2,7 +2,7 @@ NAME
|
||||||
imapsync - IMAP sync or copy tool. Synchronize mailboxes between two
|
imapsync - IMAP sync or copy tool. Synchronize mailboxes between two
|
||||||
imap servers.
|
imap servers.
|
||||||
|
|
||||||
$Revision: 1.71 $
|
$Revision: 1.72 $
|
||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
imapsync works fine under any Unix OS.
|
imapsync works fine under any Unix OS.
|
||||||
|
@ -193,5 +193,5 @@ SIMILAR SOFTWARES
|
||||||
|
|
||||||
Feedback (good or bad) will be always welcome.
|
Feedback (good or bad) will be always welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.71 2004/01/29 04:28:36 gilles Exp $
|
$Id: imapsync,v 1.72 2004/02/09 15:42:33 gilles Exp $
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.71
|
1.72
|
||||||
|
|
48
imapsync
48
imapsync
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
imapsync - IMAP sync or copy tool. Synchronize mailboxes between two imap servers.
|
imapsync - IMAP sync or copy tool. Synchronize mailboxes between two imap servers.
|
||||||
|
|
||||||
$Revision: 1.71 $
|
$Revision: 1.72 $
|
||||||
|
|
||||||
=head1 INSTALL
|
=head1 INSTALL
|
||||||
|
|
||||||
|
@ -229,7 +229,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.71 2004/01/29 04:28:36 gilles Exp $
|
$Id: imapsync,v 1.72 2004/02/09 15:42:33 gilles Exp $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
@ -264,7 +264,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.71 2004/01/29 04:28:36 gilles Exp $ ';
|
$rcs = ' $Id: imapsync,v 1.72 2004/02/09 15:42:33 gilles Exp $ ';
|
||||||
$rcs =~ m/,v (\d+\.\d+)/;
|
$rcs =~ m/,v (\d+\.\d+)/;
|
||||||
$VERSION = ($1) ? $1 : "UNKNOWN";
|
$VERSION = ($1) ? $1 : "UNKNOWN";
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ $mess_size_total_error = 0;
|
||||||
sub md5_supported {
|
sub md5_supported {
|
||||||
|
|
||||||
# before 2.2.6 no md5 native
|
# before 2.2.6 no md5 native
|
||||||
# I know this is ugly I should write a sort function
|
# I know this is ugly, I should write a sort function
|
||||||
if ($VERSION_IMAPClient =~ m/(\d+)\.(\d+)\.(\d+)/) {
|
if ($VERSION_IMAPClient =~ m/(\d+)\.(\d+)\.(\d+)/) {
|
||||||
$debug and print "VERSION_IMAPClient $1 $2 $3\n";
|
$debug and print "VERSION_IMAPClient $1 $2 $3\n";
|
||||||
my($major,$minor,$sub) = ($1, $2, $3);
|
my($major,$minor,$sub) = ($1, $2, $3);
|
||||||
|
@ -299,8 +299,8 @@ $error=0;
|
||||||
|
|
||||||
my $banner = join("",
|
my $banner = join("",
|
||||||
'$RCSfile: imapsync,v $ ',
|
'$RCSfile: imapsync,v $ ',
|
||||||
'$Revision: 1.71 $ ',
|
'$Revision: 1.72 $ ',
|
||||||
'$Date: 2004/01/29 04:28:36 $ ',
|
'$Date: 2004/02/09 15:42:33 $ ',
|
||||||
"\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",
|
||||||
|
@ -340,6 +340,14 @@ my $to = ();
|
||||||
|
|
||||||
my $authmech = "CRAM-MD5";
|
my $authmech = "CRAM-MD5";
|
||||||
|
|
||||||
|
unless ($md5_supported) {
|
||||||
|
print "Auth $authmech not supported by IMAPClient $VERSION_IMAPClient\n";
|
||||||
|
}else{
|
||||||
|
print "Auth $authmech supported by IMAPClient $VERSION_IMAPClient\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$debugimap and print "From connection\n";
|
$debugimap and print "From connection\n";
|
||||||
$from = login_imap($host1, $port1, $user1, $password1, $debugimap);
|
$from = login_imap($host1, $port1, $user1, $password1, $debugimap);
|
||||||
|
|
||||||
|
@ -359,14 +367,36 @@ sub login_imap {
|
||||||
or die "can't open imap connection on [$host] with user [$user] : $@\n";
|
or die "can't open imap connection on [$host] with user [$user] : $@\n";
|
||||||
$imap->User($user);
|
$imap->User($user);
|
||||||
$imap->Password($password);
|
$imap->Password($password);
|
||||||
$md5_supported and $imap->has_capability($authmech)
|
md5auth($imap);
|
||||||
and $to->Authmechanism($authmech);
|
|
||||||
|
|
||||||
$imap->login();
|
$imap->login();
|
||||||
return($imap);
|
return($imap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub md5auth() {
|
||||||
|
my ($imap) = @_;
|
||||||
|
unless ($md5_supported) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($imap->has_capability($authmech)
|
||||||
|
or $imap->has_capability("AUTH=$authmech")) {
|
||||||
|
print "Server [", $imap->Server,
|
||||||
|
"] has capability $authmech\n";
|
||||||
|
}else{
|
||||||
|
print "Server [", $imap->Server,
|
||||||
|
"] has NOT capability $authmech\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($imap->Authmechanism($authmech)) {
|
||||||
|
print "Using $authmech authentification\n";
|
||||||
|
}else{
|
||||||
|
print "Can NOT use $authmech authentification, using plain\n";
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print "From software : ", ($from->Report())[0];
|
print "From software : ", ($from->Report())[0];
|
||||||
print "To software : ", ($to->Report())[0];
|
print "To software : ", ($to->Report())[0];
|
||||||
|
|
||||||
|
|
26
tests.sh
26
tests.sh
|
@ -1,8 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: tests.sh,v 1.13 2004/01/29 04:21:54 gilles Exp $
|
# $Id: tests.sh,v 1.14 2004/02/07 03:34:35 gilles Exp $
|
||||||
|
|
||||||
# $Log: tests.sh,v $
|
# $Log: tests.sh,v $
|
||||||
|
# Revision 1.14 2004/02/07 03:34:35 gilles
|
||||||
|
# Added lp_include()
|
||||||
|
#
|
||||||
# Revision 1.13 2004/01/29 04:21:54 gilles
|
# Revision 1.13 2004/01/29 04:21:54 gilles
|
||||||
# Added lp_maxage
|
# Added lp_maxage
|
||||||
# Added lp_maxsize
|
# Added lp_maxsize
|
||||||
|
@ -298,6 +301,24 @@ lp_maxsize()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lp_include()
|
||||||
|
{
|
||||||
|
sendtestmessage
|
||||||
|
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 \
|
||||||
|
--include 'INBOX.yop'
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# mandatory tests
|
# mandatory tests
|
||||||
|
|
||||||
run_tests perl_syntax
|
run_tests perl_syntax
|
||||||
|
@ -318,7 +339,8 @@ test $# -eq 0 && run_tests \
|
||||||
lp_justconnect \
|
lp_justconnect \
|
||||||
lp_md5auth \
|
lp_md5auth \
|
||||||
lp_maxage \
|
lp_maxage \
|
||||||
lp_maxsize
|
lp_maxsize \
|
||||||
|
lp_include
|
||||||
|
|
||||||
# selective tests
|
# selective tests
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue