From b62a0dae2a96331f4262b2211671653bae78b9f7 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Mon, 16 Apr 2012 17:34:41 -0500 Subject: [PATCH] 1.488 --- ChangeLog | 17 +- FAQ | 17 +- INSTALL | 21 +- .../Changes | 6 + .../MANIFEST | 0 .../META.yml | 2 +- .../Makefile.PL | 0 .../README | 0 .../examples/build_dist.pl | 0 .../examples/build_ldif.pl | 0 .../examples/cleanTest.pl | 0 .../examples/copy_folder.pl | 0 .../examples/cyrus_expire.pl | 0 .../examples/cyrus_expunge.pl | 0 .../examples/find_dup_msgs.pl | 0 .../examples/idle.pl | 0 .../examples/imap_to_mbox.pl | 0 .../examples/imtestExample.pl | 0 .../examples/migrate_mail2.pl | 0 .../examples/migrate_mbox.pl | 0 .../examples/populate_mailbox.pl | 0 .../examples/sharedFolder.pl | 0 .../lib/Mail/IMAPClient.pm | 67 ++-- .../lib/Mail/IMAPClient.pod | 0 .../lib/Mail/IMAPClient/BodyStructure.pm | 0 .../IMAPClient/BodyStructure/Parse.grammar | 0 .../Mail/IMAPClient/BodyStructure/Parse.pm | 0 .../Mail/IMAPClient/BodyStructure/Parse.pod | 0 .../lib/Mail/IMAPClient/MessageSet.pm | 0 .../lib/Mail/IMAPClient/Thread.grammar | 0 .../lib/Mail/IMAPClient/Thread.pm | 0 .../lib/Mail/IMAPClient/Thread.pod | 0 .../prepare_dist | 0 .../t/basic.t | 0 .../t/body_string.t | 0 .../t/bodystructure.t | 0 .../t/fetch_hash.t | 15 +- .../t/messageset.t | 0 .../t/pod.t | 0 .../t/simple.t | 0 .../t/thread.t | 0 .../test_template.txt | 0 Makefile | 4 +- README | 4 +- TODO | 5 +- VERSION | 2 +- VERSION_EXE | 2 +- W/paypal_reply/memo | 4 +- W/paypal_reply/paypal_bilan | 6 +- .../{paypal_bilan_1.46 => paypal_bilan_1.47} | 29 +- .../paypal_build_invoice_from_email | 293 ++++++++++++++++++ W/paypal_reply/paypal_build_invoices | 30 +- W/paypal_reply/paypal_functions | 29 +- W/paypal_reply/paypal_run_dev | 6 +- i3 | 4 +- imapsync | 16 +- index.shtml | 99 +++--- tests.sh | 74 ++++- 58 files changed, 612 insertions(+), 140 deletions(-) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/Changes (99%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/MANIFEST (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/META.yml (97%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/Makefile.PL (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/README (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/build_dist.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/build_ldif.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/cleanTest.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/copy_folder.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/cyrus_expire.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/cyrus_expunge.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/find_dup_msgs.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/idle.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/imap_to_mbox.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/imtestExample.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/migrate_mail2.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/migrate_mbox.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/populate_mailbox.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/examples/sharedFolder.pl (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient.pm (98%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient.pod (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/BodyStructure.pm (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/BodyStructure/Parse.grammar (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/BodyStructure/Parse.pm (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/BodyStructure/Parse.pod (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/MessageSet.pm (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/Thread.grammar (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/Thread.pm (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/lib/Mail/IMAPClient/Thread.pod (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/prepare_dist (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/basic.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/body_string.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/bodystructure.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/fetch_hash.t (94%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/messageset.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/pod.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/simple.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/t/thread.t (100%) rename {Mail-IMAPClient-3.30 => Mail-IMAPClient-3.31}/test_template.txt (100%) rename W/paypal_reply/{paypal_bilan_1.46 => paypal_bilan_1.47} (97%) create mode 100755 W/paypal_reply/paypal_build_invoice_from_email diff --git a/ChangeLog b/ChangeLog index 4d88439..137a9f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,26 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.487 +head: 1.488 branch: locks: strict - gilles: 1.487 + gilles: 1.488 access list: symbolic names: keyword substitution: kv -total revisions: 487; selected revisions: 487 +total revisions: 488; selected revisions: 488 description: ---------------------------- -revision 1.487 locked by: gilles; +revision 1.488 locked by: gilles; +date: 2012/04/15 17:38:21; author: gilles; state: Exp; lines: +8 -8 +Reverse patch applied in 1.485 +It was "2) eval and --delete2foldersonly --delete2foldersbutnot that need also good escaping." +The "good" escaping was bad. No escaping needed. It permits imapsync variables like ${h2_sep} +in --delete2foldersonly +But good escaping has to be done in parameter value like --delete2foldersbutnot /\[Gmail\]/ +instead of --delete2foldersbutnot /[Gmail]/ (for example). +---------------------------- +revision 1.487 date: 2012/02/29 05:29:21; author: gilles; state: Exp; lines: +7 -7 Fixed a useless Perl warning. ---------------------------- diff --git a/FAQ b/FAQ index c833e01..27dab58 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ,v 1.104 2012/02/20 18:23:29 gilles Exp gilles $ +# $Id: FAQ,v 1.106 2012/04/15 19:18:29 gilles Exp gilles $ +------------------+ | FAQ for imapsync | @@ -43,6 +43,15 @@ like on Unix so in the examples of this FAQ the command containing single quotes ' will fail on Windows. To fix it just replace single quotes ' by double quotes " +======================================================================= +Q. How to verify imapsync.exe I got is the right file bit per bit? + +R. Use md5sum to check integrity of the file. + Get md5sum.exe at http://etree.org/md5com.html + + md5sum imapsync.exe + + Then compare the checksum with the one given by the author. ======================================================================= Q. How to install imapsync? @@ -319,6 +328,12 @@ R2. With option --useuid imapsync doesn't use headers to identify messages on both sides but it uses their imap uid. In that case duplicates on host1 are transfered on host2. +======================================================================= +Q. How can I remove duplicates on a uniq host + +R. Just run imapsync on the same account with option --delete2, + ie with host1 == host2 and user1 == user2 + ======================================================================= Q. I need to log every output on a file named log.txt diff --git a/INSTALL b/INSTALL index e3e71e5..4a976a4 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -# $Id: INSTALL,v 1.23 2012/01/30 19:23:36 gilles Exp gilles $ +# $Id: INSTALL,v 1.24 2012/04/13 09:14:22 gilles Exp gilles $ # # INSTALL file for imapsync # imapsync : IMAP sync or copy tool. @@ -67,19 +67,18 @@ Here is some individual module help: perl -mMail::IMAPClient -e '' - Get the Mail::IMAPClient module here: - http://search.cpan.org/ - http://search.cpan.org/~djkernen/ - http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/ - - In fact I use Mail-IMAPClient-2.2.9 and latest Mail-IMAPClient-2.xx - (xx >= 25) - To know the version you have on your system try : + Get the latest Mail::IMAPClient module here: + http://search.cpan.org/dist/Mail-IMAPClient/ + + In fact I use both Mail-IMAPClient-2.2.9 and latest Mail-IMAPClient-3.xx + (xx >= 25) To know the version you have on your system try : perl -mMail::IMAPClient -e 'print $Mail::IMAPClient::VERSION, "\n"' - New Mail-IMAPClient-3.xx works now with imapsync, - at least with Mail-IMAPClient-3.25 (previous may bug) + New Mail-IMAPClient-3.xx works now very well with imapsync, + better than Mail-IMAPClient-2.2.9 with memory and other things, + at least with Mail-IMAPClient-3.25 (previous may bug). + Don't hesitate to use latest Mail-IMAPClient-3.xx - Perl Digest::MD5 module. try: diff --git a/Mail-IMAPClient-3.30/Changes b/Mail-IMAPClient-3.31/Changes similarity index 99% rename from Mail-IMAPClient-3.30/Changes rename to Mail-IMAPClient-3.31/Changes index eb68a41..f82e6ff 100644 --- a/Mail-IMAPClient-3.30/Changes +++ b/Mail-IMAPClient-3.31/Changes @@ -5,6 +5,12 @@ Changes from 2.99_01 to 3.16 made by Mark Overmeer Changes from 0.09 to 2.99_01 made by David Kernen - Potential compatibility issues from 3.17+ highlighted with '*' +version 3.31: Mon, Mar 19, 2012 11:11:11 AM + - rt.cpan.org#74799: Support for partial data responses in fetch_hash + [Philip Garrett] + + bonus: cleaner handling of BODY.PEEK responses + - properly handle ALL|FULL|FAST fetch macros in fetch_hash + version 3.30: Fri Nov 11 09:37:00 EST 2011 - rt.cpan.org#72347: Starttls array ref argument dereferenced twice [Jonathan Buhacoff] diff --git a/Mail-IMAPClient-3.30/MANIFEST b/Mail-IMAPClient-3.31/MANIFEST similarity index 100% rename from Mail-IMAPClient-3.30/MANIFEST rename to Mail-IMAPClient-3.31/MANIFEST diff --git a/Mail-IMAPClient-3.30/META.yml b/Mail-IMAPClient-3.31/META.yml similarity index 97% rename from Mail-IMAPClient-3.30/META.yml rename to Mail-IMAPClient-3.31/META.yml index 7bbbd07..8edafdb 100644 --- a/Mail-IMAPClient-3.30/META.yml +++ b/Mail-IMAPClient-3.31/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Mail-IMAPClient -version: 3.30 +version: 3.31 abstract: IMAP4 client library author: - Phil Pearl (Lobbes) diff --git a/Mail-IMAPClient-3.30/Makefile.PL b/Mail-IMAPClient-3.31/Makefile.PL similarity index 100% rename from Mail-IMAPClient-3.30/Makefile.PL rename to Mail-IMAPClient-3.31/Makefile.PL diff --git a/Mail-IMAPClient-3.30/README b/Mail-IMAPClient-3.31/README similarity index 100% rename from Mail-IMAPClient-3.30/README rename to Mail-IMAPClient-3.31/README diff --git a/Mail-IMAPClient-3.30/examples/build_dist.pl b/Mail-IMAPClient-3.31/examples/build_dist.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/build_dist.pl rename to Mail-IMAPClient-3.31/examples/build_dist.pl diff --git a/Mail-IMAPClient-3.30/examples/build_ldif.pl b/Mail-IMAPClient-3.31/examples/build_ldif.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/build_ldif.pl rename to Mail-IMAPClient-3.31/examples/build_ldif.pl diff --git a/Mail-IMAPClient-3.30/examples/cleanTest.pl b/Mail-IMAPClient-3.31/examples/cleanTest.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/cleanTest.pl rename to Mail-IMAPClient-3.31/examples/cleanTest.pl diff --git a/Mail-IMAPClient-3.30/examples/copy_folder.pl b/Mail-IMAPClient-3.31/examples/copy_folder.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/copy_folder.pl rename to Mail-IMAPClient-3.31/examples/copy_folder.pl diff --git a/Mail-IMAPClient-3.30/examples/cyrus_expire.pl b/Mail-IMAPClient-3.31/examples/cyrus_expire.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/cyrus_expire.pl rename to Mail-IMAPClient-3.31/examples/cyrus_expire.pl diff --git a/Mail-IMAPClient-3.30/examples/cyrus_expunge.pl b/Mail-IMAPClient-3.31/examples/cyrus_expunge.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/cyrus_expunge.pl rename to Mail-IMAPClient-3.31/examples/cyrus_expunge.pl diff --git a/Mail-IMAPClient-3.30/examples/find_dup_msgs.pl b/Mail-IMAPClient-3.31/examples/find_dup_msgs.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/find_dup_msgs.pl rename to Mail-IMAPClient-3.31/examples/find_dup_msgs.pl diff --git a/Mail-IMAPClient-3.30/examples/idle.pl b/Mail-IMAPClient-3.31/examples/idle.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/idle.pl rename to Mail-IMAPClient-3.31/examples/idle.pl diff --git a/Mail-IMAPClient-3.30/examples/imap_to_mbox.pl b/Mail-IMAPClient-3.31/examples/imap_to_mbox.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/imap_to_mbox.pl rename to Mail-IMAPClient-3.31/examples/imap_to_mbox.pl diff --git a/Mail-IMAPClient-3.30/examples/imtestExample.pl b/Mail-IMAPClient-3.31/examples/imtestExample.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/imtestExample.pl rename to Mail-IMAPClient-3.31/examples/imtestExample.pl diff --git a/Mail-IMAPClient-3.30/examples/migrate_mail2.pl b/Mail-IMAPClient-3.31/examples/migrate_mail2.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/migrate_mail2.pl rename to Mail-IMAPClient-3.31/examples/migrate_mail2.pl diff --git a/Mail-IMAPClient-3.30/examples/migrate_mbox.pl b/Mail-IMAPClient-3.31/examples/migrate_mbox.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/migrate_mbox.pl rename to Mail-IMAPClient-3.31/examples/migrate_mbox.pl diff --git a/Mail-IMAPClient-3.30/examples/populate_mailbox.pl b/Mail-IMAPClient-3.31/examples/populate_mailbox.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/populate_mailbox.pl rename to Mail-IMAPClient-3.31/examples/populate_mailbox.pl diff --git a/Mail-IMAPClient-3.30/examples/sharedFolder.pl b/Mail-IMAPClient-3.31/examples/sharedFolder.pl similarity index 100% rename from Mail-IMAPClient-3.30/examples/sharedFolder.pl rename to Mail-IMAPClient-3.31/examples/sharedFolder.pl diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient.pm b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient.pm similarity index 98% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient.pm rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient.pm index ef09340..c2c446b 100644 --- a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient.pm +++ b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient.pm @@ -7,7 +7,7 @@ use strict; use warnings; package Mail::IMAPClient; -our $VERSION = '3.30'; +our $VERSION = '3.31'; use Mail::IMAPClient::MessageSet; @@ -2130,25 +2130,60 @@ sub fetch_hash { # fetch has similar logic for dealing with message list my $msgs = 'ALL'; if ( $words[0] ) { - if ( $words[0] eq 'ALL' || ref $words[0] ) { + if ( ref $words[0] ) { $msgs = shift @words; } - elsif ( $words[0] =~ s/^([,:\d]+)\s*// ) { - $msgs = $1; - shift @words if $words[0] eq ""; + elsif ( $#words > 0 ) { + if ( $words[0] eq 'ALL' ) { + $msgs = shift @words; + } + elsif ( $words[0] =~ s/^([,:\d]+)\s*// ) { + $msgs = $1; + shift @words if $words[0] eq ""; + } } } # message list (if any) is now removed from @words - my $what = join ' ', @words; + my $what = join( " ", @words ); - for (@words) { - s/([\( ])FAST([\) ])/${1}FLAGS INTERNALDATE RFC822\.SIZE$2/i; -s/([\( ])FULL([\) ])/${1}FLAGS INTERNALDATE RFC822\.SIZE ENVELOPE BODY$2/i; + # RFC 3501: + # fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / "FAST" / + # fetch-att / "(" fetch-att *(SP fetch-att) ")") + my %macro = ( + "ALL" => [qw(FLAGS INTERNALDATE RFC822.SIZE ENVELOPE)], + "FULL" => [qw(FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY)], + "FAST" => [qw(FLAGS INTERNALDATE RFC822.SIZE)], + ); + + if ( $macro{$what} ) { + @words = @{ $macro{$what} }; } - my %words = map { uc($_) => 1 } @words; + else { + $what = "($what)"; + my @twords; + foreach my $word (@words) { + $word = uc($word); - my $output = $self->fetch( $msgs, "($what)" ) + # server response to BODY[]<10.20> is a field named BODY[]<10> + if ( $word =~ /^BODY/ ) { + $word =~ s/<(\d+)\.\d+>$/<$1>/; + + # server response to BODY.PEEK[] is a field named BODY[] + # BUG? allow for BODY.PEEK in response (historical behavior) + if ( $word =~ /^BODY\.PEEK/ ) { + push( @twords, $word ); + $word =~ s/^BODY\.PEEK/BODY/; + } + } + unshift( @twords, $word ); + } + @words = @twords; + } + + my %words = map { $_ => 1 } @words; + + my $output = $self->fetch( $msgs, $what ) or return undef; while ( my $l = shift @$output ) { @@ -2157,7 +2192,7 @@ s/([\( ])FULL([\) ])/${1}FLAGS INTERNALDATE RFC822\.SIZE ENVELOPE BODY$2/i; my ( $key, $value ); ATTR: while ( $l and $l !~ m/\G\s*\)\s*$/gc ) { - if ( $l =~ m/\G\s*([^\s\[]+(?:\[[^\]]*\])?)\s*/gc ) { + if ( $l =~ m/\G\s*([^\s\[]+(?:\[[^\]]*\])?(?:<[^>]*>)?)\s*/gc ) { $key = uc($1); } elsif ( !defined $key ) { @@ -2220,13 +2255,9 @@ s/([\( ])FULL([\) ])/${1}FLAGS INTERNALDATE RFC822\.SIZE ENVELOPE BODY$2/i; $uids->{$mid} = $entry; } + # remove things not asked for (i.e. UID/$mid) for my $word ( keys %$entry ) { - next if exists $words{$word}; - - if ( my ($stuff) = $word =~ m/^BODY(\[.*)$/ ) { - next if exists $words{ "BODY.PEEK" . $stuff }; - } - + next if ( exists $words{$word} ); delete $entry->{$word}; } } diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient.pod b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient.pod similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient.pod rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient.pod diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure.pm b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure.pm similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure.pm rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure.pm diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure/Parse.grammar b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure/Parse.grammar similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure/Parse.grammar rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure/Parse.grammar diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure/Parse.pm b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure/Parse.pm similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure/Parse.pm rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure/Parse.pm diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure/Parse.pod b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure/Parse.pod similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/BodyStructure/Parse.pod rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/BodyStructure/Parse.pod diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/MessageSet.pm b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/MessageSet.pm similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/MessageSet.pm rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/MessageSet.pm diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/Thread.grammar b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/Thread.grammar similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/Thread.grammar rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/Thread.grammar diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/Thread.pm b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/Thread.pm similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/Thread.pm rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/Thread.pm diff --git a/Mail-IMAPClient-3.30/lib/Mail/IMAPClient/Thread.pod b/Mail-IMAPClient-3.31/lib/Mail/IMAPClient/Thread.pod similarity index 100% rename from Mail-IMAPClient-3.30/lib/Mail/IMAPClient/Thread.pod rename to Mail-IMAPClient-3.31/lib/Mail/IMAPClient/Thread.pod diff --git a/Mail-IMAPClient-3.30/prepare_dist b/Mail-IMAPClient-3.31/prepare_dist similarity index 100% rename from Mail-IMAPClient-3.30/prepare_dist rename to Mail-IMAPClient-3.31/prepare_dist diff --git a/Mail-IMAPClient-3.30/t/basic.t b/Mail-IMAPClient-3.31/t/basic.t similarity index 100% rename from Mail-IMAPClient-3.30/t/basic.t rename to Mail-IMAPClient-3.31/t/basic.t diff --git a/Mail-IMAPClient-3.30/t/body_string.t b/Mail-IMAPClient-3.31/t/body_string.t similarity index 100% rename from Mail-IMAPClient-3.30/t/body_string.t rename to Mail-IMAPClient-3.31/t/body_string.t diff --git a/Mail-IMAPClient-3.30/t/bodystructure.t b/Mail-IMAPClient-3.31/t/bodystructure.t similarity index 100% rename from Mail-IMAPClient-3.30/t/bodystructure.t rename to Mail-IMAPClient-3.31/t/bodystructure.t diff --git a/Mail-IMAPClient-3.30/t/fetch_hash.t b/Mail-IMAPClient-3.31/t/fetch_hash.t similarity index 94% rename from Mail-IMAPClient-3.30/t/fetch_hash.t rename to Mail-IMAPClient-3.31/t/fetch_hash.t index c998887..37bd87f 100644 --- a/Mail-IMAPClient-3.30/t/fetch_hash.t +++ b/Mail-IMAPClient-3.31/t/fetch_hash.t @@ -1,6 +1,5 @@ #!/usr/bin/perl # -# # tests for fetch_hash() # # fetch_hash() calls fetch() internally. rather than refactor @@ -9,7 +8,7 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More tests => 22; BEGIN { use_ok('Mail::IMAPClient') or exit; } @@ -110,6 +109,18 @@ my @tests = ( [ [1], qw(BODY.PEEK[]) ], { "1" => { "BODY.PEEK[]" => q{foo}, }, }, ], + [ + "BODY[]<0.1024> requests match BODY[]<0> responses", + [ q{* 1 FETCH (BODY[]<0>}, q{foo}, ")\r\n" ], + [ [1], qw(BODY[]<0.1024>) ], + { "1" => { "BODY[]<0>" => q{foo}, }, }, + ], + [ + "BODY.PEEK[]<0.1024> requests match BODY[]<0> responses", + [ q{* 1 FETCH (BODY[]<0>}, q{foo}, ")\r\n" ], + [ [1], qw(BODY.PEEK[]<0.1024>) ], + { "1" => { "BODY[]<0>" => q{foo}, }, }, + ], [ "escaped ENVELOPE subject", [ diff --git a/Mail-IMAPClient-3.30/t/messageset.t b/Mail-IMAPClient-3.31/t/messageset.t similarity index 100% rename from Mail-IMAPClient-3.30/t/messageset.t rename to Mail-IMAPClient-3.31/t/messageset.t diff --git a/Mail-IMAPClient-3.30/t/pod.t b/Mail-IMAPClient-3.31/t/pod.t similarity index 100% rename from Mail-IMAPClient-3.30/t/pod.t rename to Mail-IMAPClient-3.31/t/pod.t diff --git a/Mail-IMAPClient-3.30/t/simple.t b/Mail-IMAPClient-3.31/t/simple.t similarity index 100% rename from Mail-IMAPClient-3.30/t/simple.t rename to Mail-IMAPClient-3.31/t/simple.t diff --git a/Mail-IMAPClient-3.30/t/thread.t b/Mail-IMAPClient-3.31/t/thread.t similarity index 100% rename from Mail-IMAPClient-3.30/t/thread.t rename to Mail-IMAPClient-3.31/t/thread.t diff --git a/Mail-IMAPClient-3.30/test_template.txt b/Mail-IMAPClient-3.31/test_template.txt similarity index 100% rename from Mail-IMAPClient-3.30/test_template.txt rename to Mail-IMAPClient-3.31/test_template.txt diff --git a/Makefile b/Makefile index 025cb21..1a9696c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.93 2012/02/07 10:55:04 gilles Exp gilles $ +# $Id: Makefile,v 1.94 2012/04/15 19:19:14 gilles Exp gilles $ .PHONY: help usage all @@ -32,7 +32,7 @@ VERSION_EXE=$(shell cat ./VERSION_EXE) HELLO=$(shell date;uname -a) IMAPClient_2xx=./Mail-IMAPClient-2.2.9 -IMAPClient_3xx=./Mail-IMAPClient-3.30/lib +IMAPClient_3xx=./Mail-IMAPClient-3.31/lib IMAPClient=$(IMAPClient_3xx) hello: diff --git a/README b/README index 5e9564f..cd11de3 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 44 different IMAP server softwares supported with success. - $Revision: 1.487 $ + $Revision: 1.488 $ SYNOPSIS To synchronise imap account "foo" on "imap.truc.org" to imap account @@ -444,5 +444,5 @@ SIMILAR SOFTWARES Feedback (good or bad) will often be welcome. - $Id: imapsync,v 1.487 2012/02/29 05:29:21 gilles Exp gilles $ + $Id: imapsync,v 1.488 2012/04/15 17:38:21 gilles Exp gilles $ diff --git a/TODO b/TODO index 0f0d892..5f6f773 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: TODO,v 1.110 2012/02/07 00:20:32 gilles Exp gilles $ +# $Id: TODO,v 1.111 2012/04/15 19:18:54 gilles Exp gilles $ TODO file for imapsync ---------------------- @@ -62,6 +62,9 @@ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503159 http://www.linux-france.org/prj/imapsync_list/msg00022.html http://mail.google.com/support/bin/answer.py?hl=en&answer=77657 http://mail.google.com/support/bin/answer.py?answer=78892 +Look at larch https://github.com/rgrove/larch/ +http://wonko.com/ + Add and option to sync to & from files. diff --git a/VERSION b/VERSION index 7f91fad..17e1788 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.487 +1.488 diff --git a/VERSION_EXE b/VERSION_EXE index 7f91fad..17e1788 100644 --- a/VERSION_EXE +++ b/VERSION_EXE @@ -1 +1 @@ -1.487 +1.488 diff --git a/W/paypal_reply/memo b/W/paypal_reply/memo index 6b143bc..9a97a6f 100644 --- a/W/paypal_reply/memo +++ b/W/paypal_reply/memo @@ -5,10 +5,10 @@ echo paypal_bilan_tests_invoice paypal_bilan_tests_invoice() { -# DID output no diff between paypal_bilan_1.46 and 1.47 +# DID output no diff between paypal_bilan_1.47 and 1.48 ( #set -x -/g/public_html/imapsync/W/paypal_reply/paypal_bilan_1.46 --bnc --debug --debug_invoice --first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' /g/paypal/paypal_201?_??_complet.csv \ +/g/public_html/imapsync/W/paypal_reply/paypal_bilan_1.47 --bnc --debug --debug_invoice --first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' /g/paypal/paypal_201?_??_complet.csv \ > /g/var/paypal_bilan/tests/paypal_invoice.out1 2>&1 /g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug --debug_invoice --first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334' /g/paypal/paypal_201?_??_complet.csv \ > /g/var/paypal_bilan/tests/paypal_invoice.out2 2>&1 diff --git a/W/paypal_reply/paypal_bilan b/W/paypal_reply/paypal_bilan index db7df17..92cc7e6 100755 --- a/W/paypal_reply/paypal_bilan +++ b/W/paypal_reply/paypal_bilan @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Id: paypal_bilan,v 1.47 2012/02/24 12:22:05 gilles Exp gilles $ +# $Id: paypal_bilan,v 1.48 2012/04/15 09:24:49 gilles Exp gilles $ use strict; use warnings; @@ -477,8 +477,10 @@ sub compute_line { $FR_flag = ' FR' if $Pays eq 'France' ; my $IND_flag = '' ; $IND_flag = ' IND' if ('imapsync usage' eq $Nom_Option_1 and 'individual' eq $Valeur_Option_1 ) ; + my $SUPPORT_flag = '' ; + $SUPPORT_flag = ' support' if ( 'imapsync support' eq $Titre_de_l_objet ) ; print "FE $invoice$FR_flag$IND_flag\n" ; - print "FE $invoice$FR_flag$IND_flag imapsync $Nom\n" ; + print "FE $invoice$FR_flag$IND_flag imapsync$SUPPORT_flag $Nom\n" ; printf( "%.2f [EUR %.2f]\n", $Montant, $MontantEUR ) ; } } diff --git a/W/paypal_reply/paypal_bilan_1.46 b/W/paypal_reply/paypal_bilan_1.47 similarity index 97% rename from W/paypal_reply/paypal_bilan_1.46 rename to W/paypal_reply/paypal_bilan_1.47 index efe7251..db7df17 100755 --- a/W/paypal_reply/paypal_bilan_1.46 +++ b/W/paypal_reply/paypal_bilan_1.47 @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Id: paypal_bilan,v 1.46 2012/02/24 11:53:06 gilles Exp gilles $ +# $Id: paypal_bilan,v 1.47 2012/02/24 12:22:05 gilles Exp gilles $ use strict; use warnings; @@ -27,6 +27,7 @@ my $total_eur_invoice = 0 ; my $nb_invoice = 0 ; my $nb_invoice_refund = 0 ; my $nb_invoice_suspended = 0 ; +my $nb_invoice_canceled = 0 ; my ( $tests, $testeur ) ; my $debug ; @@ -41,6 +42,7 @@ my $bnc = '' ; my $usdeur = 1.2981 ; my $invoices ; my %invoice_refund ; +my %invoice_canceled ; my %invoice_suspended ; my $write_invoices = 0 ; my $avoid_numbers ; @@ -148,6 +150,10 @@ foreach my $invoice ( @invoices_wanted ) { my $nb_invoice_sent = scalar( @invoice_sent ) ; @invoice_not_sent = sort { $a <=> $b } keys( %invoice_not_sent ) ; +my @invoice_canceled = sort { $a <=> $b } keys( %invoice_canceled ) ; +my @invoice_suspended = sort { $a <=> $b } keys( %invoice_suspended ) ; +my @invoice_refund = sort { $a <=> $b } keys( %invoice_refund ) ; + print "USD banque $total_usd_received\n" ; print "USD invoice $total_usd_invoice\n" ; my $total_eur_from_usd ; @@ -174,8 +180,9 @@ print "EUR total TVA $total_TVA_EUR\n" ; print "EUR total HT sup $total_HT_EUR_sup\n" ; print "EUR total TVA sup $total_TVA_EUR_sup\n" ; print "Nb invoice $nb_invoice ( from $first_invoice_paypal to $last_invoice )\n" ; -print "Nb invoice refund $nb_invoice_refund\n" ; -print "Nb invoice suspended $nb_invoice_suspended\n" ; +print "Nb invoice canceled $nb_invoice_canceled @invoice_canceled\n" ; +print "Nb invoice suspended $nb_invoice_suspended @invoice_suspended\n" ; +print "Nb invoice refund $nb_invoice_refund @invoice_refund\n" ; print "Nb invoice sent $nb_invoice_sent\n" ; print "Have to send invoices @invoice_not_sent\n" if ( @invoice_not_sent ) ; @@ -420,7 +427,6 @@ sub compute_line { and 'EUR' eq $Devise and 'Remboursé' eq $Etat ) { - #$invoice = $first_invoice + $nb_invoice ; $invoice = next_invoice( ) ; $nb_invoice++ ; $nb_invoice_refund++; @@ -429,12 +435,24 @@ sub compute_line { $print_details and print ( "[$invoice] [$Date] [$Heure] [$Fuseau_horaire] [$Nom] [$Type] [$Etat] [$Devise] [$Montant] [$Numero_davis_de_reception] [$Solde]\n" ) ; } + if ( + 'Paiement sur site marchand reçu' eq $Type + and 'EUR' eq $Devise + and 'Annulé' eq $Etat + ) { + $invoice = next_invoice( ) ; + $nb_invoice++ ; + $nb_invoice_canceled++; + $invoice_canceled{ $invoice }++ ; + + $print_details and print ( "[$invoice] [$Date] [$Heure] [$Fuseau_horaire] [$Nom] [$Type] [$Etat] [$Devise] [$Montant] [$Numero_davis_de_reception] [$Solde]\n" ) ; + } + if ( 'Paiement sur site marchand reçu' eq $Type and 'EUR' eq $Devise and 'Suspendu' eq $Etat ) { - #$invoice = $first_invoice + $nb_invoice ; $invoice = next_invoice( ) ; $nb_invoice++ ; $nb_invoice_suspended++; @@ -448,7 +466,6 @@ sub compute_line { and 'EUR' eq $Devise and 'Non compensé' eq $Etat ) { - #$invoice = $first_invoice + $nb_invoice ; $invoice = next_invoice( ) ; $nb_invoice++ ; $print_details and print ( "[$invoice] [$Date] [$Heure] [$Fuseau_horaire] [$Nom] [$Type] [$Etat] [$Devise] [$Montant] [$Numero_davis_de_reception] [$Solde]\n" ) ; diff --git a/W/paypal_reply/paypal_build_invoice_from_email b/W/paypal_reply/paypal_build_invoice_from_email new file mode 100755 index 0000000..be078f0 --- /dev/null +++ b/W/paypal_reply/paypal_build_invoice_from_email @@ -0,0 +1,293 @@ +#!/usr/bin/perl + +# $Id: paypal_build_invoice_from_email,v 1.1 2012/03/14 00:24:50 gilles Exp gilles $ + +use warnings; +use strict; +use Getopt::Long; +use Test::More 'no_plan'; + + +my ($msg_id_file, $msg_id); +my ($amount, $name, $email); +my ( + $paypal_line, $paypal_info, + $buyer, $description, $object, + $url, $release, $release_exe, +) ; + +my( $day, $month, $year, $hour, $min, $sec, $fuseau, $transaction, + $postal_address ) ; + +my ( $help, $debug, $tests ) ; + +my $numopt = scalar( @ARGV ) ; + +my $test_builder = Test::More->builder; +$test_builder->no_ending(1); + +my $opt_ret = GetOptions( + "help" => \$help, + "debug!" => \$debug, + "tests!" => \$tests, +); + +if ($tests) { + $test_builder->no_ending(0); + tests(); + exit; +} + + +usage() and exit if ($help or ! $numopt) ; + +$msg_id_file = $ARGV[1]; +$msg_id = firstline($msg_id_file); + +$debug and print "Hi!\n" ; + +while(<>) { + $debug and print "LINE 1:$_" ; + next if ( ! /^(.*Num.+ro de transaction.*)$/ ); + $paypal_line = $1; + $paypal_info = "===== Paypal id =====\n$paypal_line\n"; + $debug and print "paypal_line: [$paypal_line]\n" ; + ( $day, $month, $year, $hour, $min, $sec, $fuseau, $transaction ) + = paypal_infos( $paypal_line ) ; + $debug and print "$day, $month, $year, $hour, $min, $sec, $fuseau, $transaction\n" ; + last; +} +while(<>) { + $debug and print "LINE 2:$_" ; + if ( /^Vous avez re.*paiement d'un montant de (.*) de la part de (.*) \((.*)\)/) { + ($amount, $name, $email) = ($1, $2, $3); + last; + } + if ( /^Vous avez re.*paiement d'un montant de (.*) de la part de (.*)/) { + ($amount, $name, $email) = ($1, "", $2); + last; + } +} + + +$release = firstline( '/g/public_html/imapsync/VERSION' ) ; +$release_exe = firstline( '/g/public_html/imapsync/VERSION_EXE' ) ; +my $path_last = firstline( '/g/public_html/imapsync/dist/path_last.txt' ) ; + +$url = "http://ks.lamiral.info/imapsync/dist/$path_last/" ; + +#print "[$amount] [$name] [$email] [$paypal_line]\n"; + + +while(<>) { + $debug and print "LINE 3:$_" ; + if ( /^Acheteur/ ) { + $buyer .= "===== Acheteur =====\n"; + last; + } + if ( /^Informations sur l'acheteur/ ) { + $buyer .= "===== Acheteur =====\n"; + chomp( $name = <> ); + $buyer .= "$name\n" ; + last; + } +} + +while(<>) { + $debug and print "LINE 4a:$_" ; + $buyer .= $_ if ( ! /^Adresse de livraison/ ); + last if ( /^Adresse de livraison/ ); +} + + +while(<>) { + $debug and print "LINE 4b:$_" ; + $postal_address .= $_ if ( ! /^Instructions .* l'attention du marchand/ and "\n" ne $_ ); + last if ( /^Instructions .* l'attention du marchand/ ); +} + +my @postal_address = split( "\n", $postal_address ) ; +my $country = $postal_address[-1] ; + +while(<>) { + $debug and print "LINE 4c:$_" ; + $buyer .= $_ if ( ! /^-----------------------------------/ ); + last if ( /^-----------------------------------/ ); +} + +while(<>) { + $debug and print "LINE 5:$_" ; + next if ( ! /^Description :(.*)/ ); + $object = $1 ; + $description = "===== Details =====\n"; + $description .= $_; + last; +} + + + +while(<>) { + $debug and print "LINE 6:$_" ; + $description .= $_; + last if ( /^Paiement envoy/ ); + last if ( /^N.*d'avis de r.*ception/ ); +} + + +my $address = 'gilles.lamiral@laposte.net'; +my $address2 = 'gilles@lamiral.info'; +my $rcstag = '$Id: paypal_build_invoice_from_email,v 1.1 2012/03/14 00:24:50 gilles Exp gilles $'; + +my $download_info = "You will find the latest imapsync.exe binary (release $release_exe) +and the latest imapsync source code (release $release) at the following link: +$url" ; + +my $next_releases = +"Next imapsync releases will be available to you for one year without extra payment. +You'll be subscribed to a newsletter [imapsync_update] announcing new releases. +Just keep this message and ask for the new links in case you miss the newsletter. +Run imapsync without any argument to know if a new release is available." ; + + +my $thanks_software = "I thank you for buying and using imapsync, +I wish you successful transfers!" ; + +my $thanks_support = "I thank you for buying support and using imapsync, +I wish you successful transfers, I will help you to succeed." ; + +my $support_info = 'Now you have access to imapsync professional support. + +You can contact me (Gilles LAMIRAL) by email or phone. + +Email address: gilles.lamiral@laposte.net. +Professionnal phone number: +33 951 84 42 42 (France) +Mobile phone number: +33 620 79 76 06 (France). + +I can call you back for free in many countries on landline telephone numbers +and to mobile numbers in the United States and France. So do not hesitate +to send me a note if you need vocal support.' ; + + +my $text_software = "$download_info\n +$next_releases\n +You will receive an invoice soon.\n +$thanks_software" ; + +my $text_support = "$support_info\n +You will receive an invoice soon.\n +$thanks_support" ; + +my $subject_software = "[imapsync download] imapsync release $release [$email]" ; + +my $subject_support = "[imapsync support] imapsync release $release [$email]" ; + +my $subject ; + +my $text ; +if ( 'imapsync support' eq $object ) { + $text = $text_support ; + $subject = $subject_support ; +}else{ + $text = $text_software ; + $subject = $subject_software ; +} + + +my $message = < +To: <$email> +Bcc: Gilles LAMIRAL <$address>, <$address2> +Subject: $subject + +Hello $name, + +$text + +$paypal_info +$buyer +$description +==== Vendeur ==== +Gilles LAMIRAL +4 La Billais +35580 Baulon +FRANCE + +Tel: +33 951 84 42 42 +Mob: +33 620 79 76 06 +Fax: +33 956 84 42 42 + +email: $address + +-- +Au revoir, 09 51 84 42 42 +Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06 +EOM +; + +=pod +=cut + + +#print $message; +#print "[$amount] [$name] [$email] [$paypal_line] [$object]\n"; +print "[$postal_address] +@postal_address +$country +\n" ; + +sub firstline { + # extract the first line of a file (without \n) + + my($file) = @_; + my $line = ""; + + open FILE, $file or die("error [$file]: $! "); + chomp($line = ); + close FILE; + $line = ($line) ? $line: "error !EMPTY! [$file]"; + return $line; +} + +sub tests { + + SKIP: { + skip "No test in normal run" if ( not $tests ) ; + tests_paypal_infos() ; + } +} + +sub paypal_infos { + + my $paypal_infos = shift ; + $paypal_infos =~ /(\d{1,2}) (.*) (\d{4}) (\d\d):(\d\d):(\d\d) (.*) \| Num.*ro de transaction : (.*)/ ; + my( $day, $month, $year, $hour, $min, $sec, $fuseau, $transaction ) + = ( $1, $2, $3, $4, $5, $6, $7, $8 ) ; + #print "$day, $month, $year, $hour, $min, $sec, $fuseau, $transaction\n" ; + return( $day, $month, $year, $hour, $min, $sec, $fuseau, $transaction ) ; + +} + +sub tests_paypal_infos { + #ok( 1 == 1 ) ; + my( $day, $month, $year, $hour, $min, $sec, $fuseau, $transaction ) + = paypal_infos( "14 mar 2012 01:47:55 CET | Numéro de transaction : 75E02654YS4206549" ) ; + ok( '14' eq $day, 'paypal_infos: day' ) ; + ok( 'mar' eq $month, 'paypal_infos: month' ) ; + ok( '2012' eq $year, 'paypal_infos: year' ) ; + ok( '01' eq $hour, 'paypal_infos: hour' ) ; + ok( '47' eq $min, 'paypal_infos: min' ) ; + ok( '55' eq $sec, 'paypal_infos: sec' ) ; + ok( 'CET' eq $fuseau, 'paypal_infos: fuseau' ) ; + ok( '75E02654YS4206549' eq $transaction, 'paypal_infos: transaction' ) ; + + ( $day, $month, $year, $hour, $min, $sec, $fuseau, $transaction ) + = paypal_infos( "1 fév 2012 20:18:10 CET | Numéro de transaction : 5HF11160SD123724S" ) ; + ok( '1' eq $day, 'paypal_infos: day' ) ; + ok( 'fév' eq $month, 'paypal_infos: month' ) ; + + +} + + diff --git a/W/paypal_reply/paypal_build_invoices b/W/paypal_reply/paypal_build_invoices index 53dba5e..49425dc 100755 --- a/W/paypal_reply/paypal_build_invoices +++ b/W/paypal_reply/paypal_build_invoices @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: paypal_build_invoices,v 1.26 2012/02/24 12:32:56 gilles Exp gilles $ +# $Id: paypal_build_invoices,v 1.29 2012/04/13 10:42:44 gilles Exp gilles $ # usage: sh paypal_build_invoices /g/var/paypal_invoices/???? @@ -22,24 +22,28 @@ set -x #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1094 /g/paypal/paypal_2011_10_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1185 /g/paypal/paypal_2011_11_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1263 /g/paypal/paypal_2011_12_complet.csv -/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1335 /g/paypal/paypal_2012_01_complet.csv -/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1417 /g/paypal/paypal_2012_02_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1335 /g/paypal/paypal_2012_01_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1417 /g/paypal/paypal_2012_02_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1508 /g/paypal/paypal_2012_03_complet.csv +/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 1575 /g/paypal/paypal_2012_04_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 294 --usdeur 1.3385 /g/paypal/paypal_2011_01_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 382 /g/paypal/paypal_2011_02_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 473 /g/paypal/paypal_2011_03_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 570 /g/paypal/paypal_2011_04_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 645 /g/paypal/paypal_2011_05_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 733 /g/paypal/paypal_2011_06_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 824 /g/paypal/paypal_2011_07_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 917 /g/paypal/paypal_2011_08_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1094 /g/paypal/paypal_2011_10_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1185 /g/paypal/paypal_2011_11_complet.csv -: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1263 /g/paypal/paypal_2011_12_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 382 --usdeur 1.3692 /g/paypal/paypal_2011_02_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 473 --usdeur 1.3809 /g/paypal/paypal_2011_03_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 570 --usdeur 1.4172 /g/paypal/paypal_2011_04_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 645 --usdeur 1.4810 /g/paypal/paypal_2011_05_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 733 --usdeur 1.4395 /g/paypal/paypal_2011_06_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 824 --usdeur 1.4496 /g/paypal/paypal_2011_07_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 917 --usdeur 1.4397 /g/paypal/paypal_2011_08_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1094 --usdeur 1.4380 /g/paypal/paypal_2011_10_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1185 --usdeur 1.3387 /g/paypal/paypal_2011_11_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1263 --usdeur 1.3856 /g/paypal/paypal_2011_12_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1335 /g/paypal/paypal_2012_01_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1417 /g/paypal/paypal_2012_02_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1508 /g/paypal/paypal_2012_03_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1575 /g/paypal/paypal_2012_04_complet.csv set +x # La totale diff --git a/W/paypal_reply/paypal_functions b/W/paypal_reply/paypal_functions index 01f85b8..cf0c3b1 100755 --- a/W/paypal_reply/paypal_functions +++ b/W/paypal_reply/paypal_functions @@ -83,7 +83,7 @@ extract_mail() { convert_utf8() { mkdir -p $tmpdir/msg_out_utf8/ - test -z "`ls $tmpdir/msg_out/`" && echo no mail && return + test -z "`ls $tmpdir/msg_out/*_d/*.txt`" && echo no mail && return for f in $tmpdir/msg_out/*_d/*.txt; do b=`basename "$f"` d=`dirname "$f"` @@ -113,8 +113,9 @@ troncate_last_2_chars() { build_reply() { mkdir -p $tmpdir/msg_reply/ + test -z "`ls $tmpdir/msg_out/`" && echo no mail && return for f in $tmpdir/msg_out_utf8/*/*.txt; do - #echo "$f" + echo "$f" d=`dirname "$f"` bd=`basename "$d"` file_id=`troncate_last_2_chars $bd` @@ -122,6 +123,7 @@ build_reply() { test -f "$d_reply/$file_id.txt" && continue mkdir -p "$d_reply" echo building "$d_reply/$file_id.txt" + echo paypal_build_reply "$f" "$tmpdir/msg_id/$file_id" paypal_build_reply "$f" "$tmpdir/msg_id/$file_id" > "$d_reply/$file_id.txt" done } @@ -139,21 +141,38 @@ build_reply_arg() { done } + +build_invoice_arg() { + for f in "$@"; do + #echo "$f" + d=`dirname "$f"` + bd=`basename "$d"` + file_id=`troncate_last_2_chars $bd` + d_invoice="$tmpdir/invoices/$file_id" + echo building "$d_invoice/imapsync_var.tex" + echo paypal_build_invoice_from_email "$f" "$tmpdir/msg_id/$file_id" + paypal_build_invoice_from_email "$f" "$tmpdir/msg_id/$file_id" + done +} + + + debug_mode() { - #return 0 + return 0 return 1 } send_reply() { mkdir -p $tmpdir/msg_sent/ + test -z "`ls $tmpdir/msg_reply/*/*.txt`" && echo no mail && return for f in $tmpdir/msg_reply/*/*.txt; do b=`basename "$f"` d=`dirname "$f"` bd=`basename "$d"` d_sent="$tmpdir/msg_sent/$bd" - debug_mode && echo "paypal_send $f" test -f "$d_sent/$b" && continue mkdir -p "$d_sent" + debug_mode && echo "paypal_send $f" test X"--send" = X"$1" && paypal_send --send --subscribe "$f" && touch "$d_sent/$b" #test X"--send" = X"$1" && touch "$d_sent/$b" test X"" = X"$1" && paypal_send "$f" @@ -218,9 +237,9 @@ paypal_all_dev() { build_reply echo "Done build_reply in $tmpdir/msg_reply/" echo "Will send_reply $@" - send_reply "$@" echo "Done send_reply $@" + } diff --git a/W/paypal_reply/paypal_run_dev b/W/paypal_reply/paypal_run_dev index 0c35253..6cd5833 100755 --- a/W/paypal_reply/paypal_run_dev +++ b/W/paypal_reply/paypal_run_dev @@ -5,24 +5,20 @@ set -e #set -x - # Add path to commands at home PATH=$PATH:/g/public_html/imapsync/W/paypal_reply -PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.28/lib +PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.30/lib export PERL5LIB test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \ && . /g/public_html/imapsync/W/paypal_reply/paypal_functions - DATE_1=`date` echo "==== paypal_reply_test ====" paypal_reply_petite_dev "$@" echo - - DATE_2=`date` echo "Debut : $DATE_1" diff --git a/i3 b/i3 index 95412a2..5d1b01e 100755 --- a/i3 +++ b/i3 @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: i3,v 1.8 2011/11/12 21:49:00 gilles Exp gilles $ +# $Id: i3,v 1.9 2012/04/15 19:18:02 gilles Exp gilles $ BASE=`dirname $0` -perl -I${BASE}/Mail-IMAPClient-3.30/lib ${BASE}/imapsync "$@" +perl -I${BASE}/Mail-IMAPClient-3.31/lib ${BASE}/imapsync "$@" diff --git a/imapsync b/imapsync index ed22fd2..f2c5131 100755 --- a/imapsync +++ b/imapsync @@ -20,7 +20,7 @@ Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 44 different IMAP server softwares supported with success. -$Revision: 1.487 $ +$Revision: 1.488 $ =head1 SYNOPSIS @@ -519,7 +519,7 @@ Entries for imapsync: Feedback (good or bad) will often be welcome. -$Id: imapsync,v 1.487 2012/02/29 05:29:21 gilles Exp gilles $ +$Id: imapsync,v 1.488 2012/04/15 17:38:21 gilles Exp gilles $ =cut @@ -636,7 +636,7 @@ my( # global variables initialisation -$rcs = '$Id: imapsync,v 1.487 2012/02/29 05:29:21 gilles Exp gilles $ '; +$rcs = '$Id: imapsync,v 1.488 2012/04/15 17:38:21 gilles Exp gilles $ '; $total_bytes_transferred = 0; $total_bytes_skipped = 0; @@ -1868,8 +1868,8 @@ sub banner_imapsync { my @argv_copy = @_; my $banner_imapsync = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.487 $ ', - '$Date: 2012/02/29 05:29:21 $ ', + '$Revision: 1.488 $ ', + '$Date: 2012/04/15 17:38:21 $ ', "\n",localhost_info(), "\n", "Command line used:\n", "$0 ", command_line_nopassword(@argv_copy), "\n", @@ -3674,7 +3674,7 @@ sub check_last_release { } sub imapsync_version { - my $rcs = '$Id: imapsync,v 1.487 2012/02/29 05:29:21 gilles Exp gilles $ '; + my $rcs = '$Id: imapsync,v 1.488 2012/04/15 17:38:21 gilles Exp gilles $ '; $rcs =~ m/,v (\d+\.\d+)/; my $VERSION = ($1) ? $1: "UNKNOWN"; return($VERSION); @@ -4262,11 +4262,11 @@ sub delete_folders_in_2_not_in_1 { my $dry_message = ''; $dry_message = "\t(not really since --dry mode)" if $dry; foreach my $folder (@h2_folders_not_in_1) { - if ( defined( $delete2foldersonly ) and eval( "\$folder !~ \$delete2foldersonly" ) ) { + if ( defined( $delete2foldersonly ) and eval( "\$folder !~ $delete2foldersonly" ) ) { print "Not deleting $folder because of --delete2foldersonly $delete2foldersonly\n"; next; } - if ( defined( $delete2foldersbutnot ) and eval( "\$folder =~ \$delete2foldersbutnot" ) ) { + if ( defined( $delete2foldersbutnot ) and eval( "\$folder =~ $delete2foldersbutnot" ) ) { print "Not deleting $folder because of --delete2foldersbutnot $delete2foldersbutnot\n"; next; } diff --git a/index.shtml b/index.shtml index 193615c..1d795a2 100644 --- a/index.shtml +++ b/index.shtml @@ -5,7 +5,7 @@ Imapsync: an IMAP migration tool ( release <!--#exec cmd="cat VERSION"--> ) - + @@ -31,7 +31,7 @@ @@ -63,12 +63,12 @@ for 2 ways synchronizations.

Alternatives to imapsync are listed in the Similar softwares section.

-

Some numbers for past year 2011

+

Some numbers for 2011

  • Number of imapsync users per month: between 2 and 3 thousands users
  • -
  • Number of imapsync transfers between 3 and 25 millions mailboxes transfers per month, 93 millions in 2011
  • -
  • Pourcentage between operating systems users running imapsync: +
  • Number of imapsync transfers between 3 and 25 millions mailboxes transfers per month, total is 93 millions in 2011
  • +
  • Percentage between operating systems users running imapsync:
    • Linux: 65 %
    • Win32: 18 %
    • @@ -93,6 +93,29 @@ for 2 ways synchronizations.

      New features or bugfixes since previous releases:

      +
        +
      • 1.488
      • +
      • Bug fix: Reverse half of the last patch about --delete2foldersonly since it destroyed a good feature permitting imapsync variables like ${h2_sep} +in --delete2foldersonly, the good escaping has to be done in the parameter value: +
          +
        • --delete2foldersonly --delete2foldersbutnot need good escaping in call, not in code. Example: --delete2foldersbutnot "/\[Gmail\]/"
        • +
        +
      • +
      • Bug fix: removed several useless Perl warnings in different contexts.
      • +
      + +
        +
      • 1.487
      • +
      • Bug fix: for example the issue was brackets in [Gmail] folder names in the context of cache --useuid. +Thanks to Pierre GUILLAUME, applied patch about: +
          +
        • $cache_dir and bsd_globs() that needs escaped characters.
        • +
        • eval and --delete2foldersonly --delete2foldersbutnot that need also good escaping.
        • +
        +
      • +
      • Bug fix: removed several useless Perl warnings in different contexts.
      • +
      + --> -

      Basic usage

      +

      Simple transfer on Windows

      See imapsync_example.bat.txt batch file example @@ -143,7 +167,7 @@ that you can easily adapt with your parameters (remove .txt extension in order t

      -

      Huge usage

      +

      Massive transfers

      See file.txt example for batch massive migration @@ -171,20 +195,22 @@ See file.txt example for batch massive migrat

      Buy latest imapsync Perl source code for 42 EUR

      -

      -+ One year of imapsync updates without extra payment.
      -+ 30 days money-back guarantee!
      -+ A little support. -

      - -

      -42 EUR is equal to around 54 USD, no problem to pay in USD (or any currency) with paypal: -

      -

      The Perl imapsync source code will run anywhere a Perl interpreter can run: any Unix, Linux, Windows, or Mac OS operating system.

      +

      ++ One year of imapsync updates without extra payment.
      ++ 30 days money-back guarantee!
      ++ Limited support. +

      + +

      +Payment by Paypal account and credit card accepted.
      +Price 42 EUR is equal to around 54 USD, no problem to pay in USD (or any currency) via paypal: +

      + +

      @@ -203,15 +229,16 @@ name="submit" alt="PayPal - The safer, easier way to pay online!"/>

      You will receive a download link just after the payment.

      -

      Buy professional support for imapsync

      +

      Buy full professional support for imapsync

      -

      You will be able to expose your issues by email or phone and to converse until your issues are solved. +

      You will be able to expose your issues by email or phone and we'll work together until complete success.

      -

      For 180 EUR buy imapsync support by the developper who wrote and maintains imapsync. +

      For 90 EUR buy imapsync full support done by the imapsync designer/developper.

      -180 EUR is equal to around 230 USD, no problem to pay in USD (or any currency) with paypal: +Payment by Paypal account and credit card accepted.
      +90 EUR is equal to around 120 USD, no problem to pay in USD (or any currency) with paypal:

      @@ -239,12 +266,12 @@ buying the latest win32 standalone imapsync.exe for 42 EUR

      + One year of imapsync updates without extra payment.
      + 30 days money-back guarantee!
      -+ A little support. ++ Limited support.

      -

      -42 EUR is equal to around 54 USD, no problem to pay in USD (or any currency) with paypal: +Payment by Paypal account and credit card accepted.
      +Price 42 EUR is equal to around 54 USD, no problem to pay in USD (or any currency) via paypal:

      @@ -284,8 +311,7 @@ The build system for imapsync.exe is XP Pro SP2 on a Intel Celeron 400 MHz 256 M

      The FAQ file presents Frequently Asked Questions (and not so frequently asked ones).

      -

      The TODO file list what may be coded or done in the future.
      -See also the wanted section. +

      The TODO file list what may be coded or done in the future.

      All the people I thank are in the CREDITS file. @@ -343,20 +369,6 @@ See also the wanted section.

      -

      WANTED!

      - -

      I fix bugs as soon as possible and I code new features when I find them useful.
      -Don't hesitate to ask for them. -

      - -

      Some features and their time to be done evaluation:

      - - - - - - -
      DONEFeature Time guessedTime spent
      NoBackup to files 20 hours 60 min
      NoEfficient Gmail backup 20 hours 80 min
      NoBetter error reporting 5 hours 0 min

      Lists of imap server software failures and success stories

      @@ -481,7 +493,8 @@ Prices are given par mailbox and may be outdated (december 2011).

    • Migrationwiz 10 USD: http://www.migrationwiz.com/
    • Rackspace migration 10 USD: http://www.rackspace.com/apps/email_hosting/migrations/
    • Yippiemove 15 USD: http://www.yippiemove.com/
    • -
    • Trueswitch 29.5 USD: http://www.trueswitch.com
    • +
    • Audriga Gmbh 14.99 EUR : https://www.email-umzug.de/
    • +
    • Trueswitch 29.5 USD: http://www.trueswitch.com

    @@ -510,7 +523,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: index.shtml,v 1.112 2012/02/20 18:23:06 gilles Exp gilles $) +($Id: index.shtml,v 1.117 2012/04/15 19:16:51 gilles Exp gilles $)

    diff --git a/tests.sh b/tests.sh index 571de74..fdad81a 100644 --- a/tests.sh +++ b/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: tests.sh,v 1.192 2012/02/25 14:41:47 gilles Exp gilles $ +# $Id: tests.sh,v 1.194 2012/04/15 19:17:33 gilles Exp gilles $ # Example 1: # CMD_PERL='perl -I./Mail-IMAPClient-3.25/lib' sh -x tests.sh @@ -23,7 +23,7 @@ echo HOST2=$HOST2 # few debugging tests use: CMD_PERL_2xx='perl -I./Mail-IMAPClient-2.2.9' -CMD_PERL_3xx='perl -I./Mail-IMAPClient-3.30/lib' +CMD_PERL_3xx='perl -I./Mail-IMAPClient-3.31/lib' CMD_PERL=${CMD_PERL:-$CMD_PERL_3xx} @@ -248,6 +248,8 @@ ll_folder() { --folder INBOX.yop --folder INBOX.Trash } + + ll_folder_noexist() { ! $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -449,7 +451,8 @@ ll_delete2foldersonly() { --justfolders --nofoldersizes \ --regextrans2 's,${h1_prefix}(.*),${h2_prefix}NEW${h2_sep}$1,' \ --regextrans2 's,^INBOX$,${h2_prefix}NEW${h2_sep}INBOX,' \ - --delete2foldersonly '/${h2_prefix}NEW/' + --delete2foldersonly '/${h2_prefix}NEW/' --dry +# --delete2foldersonly '${h2_prefix}NEW' } ll_delete2foldersonly_tmp() { @@ -471,7 +474,7 @@ ll_delete2foldersbutnot() { --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --justfolders --nofoldersizes \ - --delete2foldersbutnot '/NEW_2|NEW_3/' \ + --delete2foldersbutnot '/NEW_2|NEW_3|\[abc\]/' \ --dry } @@ -1260,6 +1263,32 @@ ll_regexmess_scwchu() echo 'rm /home/vmail/titi/.scwchu/cur/*' } +ll_regexmess_wong() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX.scwchu \ + --regexmess 's{\A}{Content-Type: text/plain; charset="big5"\n}gxms' \ + --debugcontent --debug + echo "sudo sh -c 'rm /home/vmail/titi/.scwchu/cur/*'" +} + +ll_regexmess_wong_2() +{ +#Received: from hkuhp22.hku.hk + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX.scwchu \ + --regexmess 's{\A(.*?(?!^$))^(Received: from hkuhp22.hku.hk.*?)$}{$1Content-Type: text/plain; charset="big5"\n$2}gms' \ + --debugcontent --debug --dry + echo "sudo sh -c 'rm /home/vmail/titi/.scwchu/cur/*'" +} ll_flags() { @@ -1648,6 +1677,17 @@ ll_memory_consumption() { } +ll_remove_duplicates() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST1 --user2 tata \ + --passfile2 ../../var/pass/secret.tata \ + --folder INBOX.duplicates --delete2 +} + + + msw() { if can_send; then sendtestmessage toto @@ -1678,13 +1718,13 @@ msw2() { xxxxx_gmail() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 $HOST2 \ + --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ --host2 imap.gmail.com \ --ssl2 \ --user2 gilles.lamiral@gmail.com \ --passfile2 ../../var/pass/secret.gilles_gmail \ - --host1 $HOST2 \ - --user1 tata \ - --passfile1 ../../var/pass/secret.tata \ --nofoldersizes \ --justfolders --regextrans2 's/ //g' --exclude 'INBOX.yop.YAP' --exclude Gmail } @@ -1763,13 +1803,13 @@ xxxxx_gmail_5_justlogin() { xxxxx_gmail_6() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 $HOST2 \ + --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ --host2 imap.gmail.com \ --ssl2 \ --user2 gilles.lamiral@gmail.com \ --passfile2 ../../var/pass/secret.gilles_gmail \ - --host1 $HOST2 \ - --user1 tata \ - --passfile1 ../../var/pass/secret.tata \ --nofoldersizes \ --justfolders \ --regextrans2 "s, +$,,g" --regextrans2 "s, +/,/,g" \ @@ -1778,6 +1818,20 @@ xxxxx_gmail_6() { #--dry --prefix2 '[Gmail]/' } +xxxxx_gmail_7() { + + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 $HOST2 \ + --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 gilles.lamiral@gmail.com \ + --passfile2 ../../var/pass/secret.gilles_gmail \ + --nofoldersizes \ + --folder INBOX.yop.yap +} + gmail_xxxxx() {