mirror of
https://github.com/imapsync/imapsync.git
synced 2025-07-31 14:26:08 +02:00
1.86
This commit is contained in:
parent
f66d0cf0dc
commit
671f394a91
7 changed files with 971 additions and 16 deletions
29
imapsync
29
imapsync
|
@ -4,7 +4,7 @@
|
|||
|
||||
imapsync - IMAP sync or copy tool. Synchronize mailboxes between two imap servers.
|
||||
|
||||
$Revision: 1.84 $
|
||||
$Revision: 1.86 $
|
||||
|
||||
=head1 INSTALL
|
||||
|
||||
|
@ -44,6 +44,8 @@ $Revision: 1.84 $
|
|||
[--syncinternaldates]
|
||||
[--maxsize <int>]
|
||||
[--maxage <int>]
|
||||
[--skipheader <regex>]
|
||||
[--skipsize]
|
||||
[--delete] [--expunge]
|
||||
[--subscribed] [--subscribe]
|
||||
[--dry]
|
||||
|
@ -166,7 +168,8 @@ Success stories reported (softwares in alphabetic order) :
|
|||
- Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.1.16, 2.2.1, Cyrus 2.2.2-BETA
|
||||
- DBMail 1.2.1
|
||||
- Dovecot 0.99.10.4
|
||||
- iPlanet Messaging server 4.15
|
||||
- Domino (Notes) 6.5
|
||||
- iPlanet Messaging server 4.15, 5.1
|
||||
- IMail 7.15 (Ipswitch/Win2003)
|
||||
- Netscape Mail Server 3.6 (Wintel !)
|
||||
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System)
|
||||
|
@ -249,7 +252,7 @@ Gilles LAMIRAL earn his living writing, installing,
|
|||
configuring and teaching free open and gratis
|
||||
softwares. Don't hesitate to pay him for that services.
|
||||
|
||||
$Id: imapsync,v 1.84 2004/03/13 03:43:34 gilles Exp $
|
||||
$Id: imapsync,v 1.86 2004/03/21 23:25:47 gilles Exp $
|
||||
|
||||
=cut
|
||||
|
||||
|
@ -272,6 +275,7 @@ my(
|
|||
$sep1, $sep2,
|
||||
$syncinternaldates,
|
||||
$maxsize, $maxage,
|
||||
$skipheader, $skipsize,
|
||||
$delete, $expunge, $dry,
|
||||
$authmd5,
|
||||
$subscribed, $subscribe,
|
||||
|
@ -286,7 +290,7 @@ my(
|
|||
use vars qw ($opt_G); # missing code for this will be option.
|
||||
|
||||
|
||||
$rcs = ' $Id: imapsync,v 1.84 2004/03/13 03:43:34 gilles Exp $ ';
|
||||
$rcs = ' $Id: imapsync,v 1.86 2004/03/21 23:25:47 gilles Exp $ ';
|
||||
$rcs =~ m/,v (\d+\.\d+)/;
|
||||
$VERSION = ($1) ? $1 : "UNKNOWN";
|
||||
|
||||
|
@ -322,8 +326,8 @@ $error=0;
|
|||
|
||||
my $banner = join("",
|
||||
'$RCSfile: imapsync,v $ ',
|
||||
'$Revision: 1.84 $ ',
|
||||
'$Date: 2004/03/13 03:43:34 $ ',
|
||||
'$Revision: 1.86 $ ',
|
||||
'$Date: 2004/03/21 23:25:47 $ ',
|
||||
"\n",
|
||||
"Mail::IMAPClient version used here is ",
|
||||
$VERSION_IMAPClient, " auth md5 : $md5_supported",
|
||||
|
@ -750,8 +754,10 @@ sub get_options
|
|||
"version" => \$version,
|
||||
"help" => \$help,
|
||||
"timeout=i" => \$timeout,
|
||||
"skipheader=s" => \$skipheader,
|
||||
"skipsize!" => \$skipsize,
|
||||
);
|
||||
|
||||
|
||||
$debug and print "get options: [$opt_ret]\n";
|
||||
|
||||
# just the version
|
||||
|
@ -784,13 +790,17 @@ sub parse_header_msg {
|
|||
$val =~ s/^\s+//;
|
||||
# show stuff in debug mode
|
||||
$debug and print "${s}H $h:", $val, "\n";
|
||||
if ($skipheader and $h =~ m/$skipheader/) {
|
||||
$debug and print "Skipping header $h\n";
|
||||
next;
|
||||
}
|
||||
$headstr .= "$h:". $val;
|
||||
}
|
||||
}
|
||||
my $m_md5 = md5_base64($headstr);
|
||||
my $size = $imap->size($m);
|
||||
$debug and print "$s msg $m:$m_md5:$size\n";
|
||||
|
||||
$size = 0 if ($skipsize);
|
||||
$s_hash->{"$m_md5:$size"}{'5'} = "$m_md5:$size";
|
||||
$s_hash->{"$m_md5:$size"}{'s'} = $size;
|
||||
$s_hash->{"$m_md5:$size"}{'m'} = $m;
|
||||
|
@ -853,6 +863,9 @@ Several options are mandatory.
|
|||
--maxsize <int> : skip messages larger than <int> bytes
|
||||
--maxage <int> : skip messages older than <int> days.
|
||||
final stats (skipped) don't count older messages
|
||||
--skipheader <regex> : Don't take into account header keyword
|
||||
matching <string> ex: --skipheader 'X.*'
|
||||
--skipsize : Don't take message size into account.
|
||||
--dry : do nothing, just print what would be done.
|
||||
--subscribed : transfer only subscribed folders.
|
||||
--subscribe : subscribe to the folders transfered on the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue