From 1b3773e80f94a8479a66f093cdf8c9780f9da81f Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sun, 25 Sep 2011 15:31:48 -0500 Subject: [PATCH] 1.456 --- ChangeLog | 24 +++- FAQ | 125 +++++++++++++++------ Makefile | 9 +- README | 27 ++++- TIME | 2 + TODO | 4 +- VERSION | 2 +- VERSION_EXE | 2 +- W/paypal_reply/paypal_bilan | 18 ++- W/paypal_reply/paypal_build_invoices | 16 ++- W/paypal_reply/paypal_send_invoices | 6 +- file.csv | 22 ++++ imapsync | 56 ++++++---- index.shtml | 158 +++++++++++++-------------- learn/append | 53 +++++++++ learn/file.csv | 2 - learn/mi3 | 2 +- memo | 107 +++++++++++++----- paypal_return.shtml | 4 +- paypal_return_support.shtml | 8 +- test2.bat | 12 +- tests.sh | 141 +++++++++++++++++++++++- 22 files changed, 592 insertions(+), 208 deletions(-) create mode 100644 file.csv create mode 100755 learn/append delete mode 100644 learn/file.csv diff --git a/ChangeLog b/ChangeLog index ad998dd..0ea6f77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,33 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.452 +head: 1.456 branch: locks: strict - gilles: 1.452 + gilles: 1.456 access list: symbolic names: keyword substitution: kv -total revisions: 452; selected revisions: 452 +total revisions: 456; selected revisions: 456 description: ---------------------------- -revision 1.452 locked by: gilles; +revision 1.456 locked by: gilles; +date: 2011/08/24 04:21:30; author: gilles; state: Exp; lines: +15 -13 +Help message on --sep when namespace separator is NIL. Yahoo case. +---------------------------- +revision 1.455 +date: 2011/07/29 03:00:25; author: gilles; state: Exp; lines: +8 -8 +Empty default value for $h1_flags $h2_flags to avoid useless Perl warnings. +---------------------------- +revision 1.454 +date: 2011/07/15 16:17:06; author: gilles; state: Exp; lines: +22 -10 +file.csv example +---------------------------- +revision 1.453 +date: 2011/07/15 00:35:37; author: gilles; state: Exp; lines: +10 -6 +MDaemon 12.0.3 failure as host2 (APPEND buggy) +---------------------------- +revision 1.452 date: 2011/07/11 00:29:06; author: gilles; state: Exp; lines: +64 -47 Added the --search option allowing to select messages with the powerful IMAP SEARCH command. ---------------------------- diff --git a/FAQ b/FAQ index 7a54e78..bc776e3 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ,v 1.89 2011/07/11 01:17:39 gilles Exp gilles $ +# $Id: FAQ,v 1.92 2011/08/24 06:50:17 gilles Exp gilles $ +------------------+ | FAQ for imapsync | @@ -8,14 +8,16 @@ Unix versus Windows syntax. On Unix shells you can write a single command on multiple lines by using the escape character \ at the end of each line -(except the last one). +(except the last one). On Windows this character is ^ + +Unix example: ./imapsync \ --host1 imap.truc.org --user1 foo --password1 secret1 \ --host2 imap.trac.org --user2 bar --password2 secret2 -On Windows this character is ^ +Windows example: imapsync ^ --host1 imap.truc.org --user1 foo --password1 secret1 ^ @@ -47,8 +49,8 @@ R. http://www.linux-france.org/prj/imapsync/FAQ ======================================================================= Q. How can I have commercial support? -R. Ask the imapsync author and expert: Gilles LAMIRAL -Rates per hour (2011) : 84 euros (111 USD) +R. Buy support from imapsync author and expert: Gilles LAMIRAL +http://ks.lamiral.info/imapsync/#buy_support ======================================================================= Q. How can I have gratis support? @@ -76,31 +78,36 @@ post to this list if you want to stay private. Thank you for your participation. ======================================================================= -Q. Where I can read up on the various IMAP RFCs? +Q. I need to migrate hundred accounts, how can I do? -R. Here: +R. If you have many mailboxes to migrate think about a little +shell program. Write a file called file.csv (for example) +containing users and passwords. +The separator used in this example is ';' -RFC 3501 - INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 -http://www.faqs.org/rfcs/rfc3501.html +The file.csv file contains: -RFC2683 - IMAP4 Implementation Recommendations -http://www.faqs.org/rfcs/rfc2683.html +user001_1;password001_1;user001_2;password001_2 +user002_1;password002_1;user002_2;password002_2 +user003_1;password003_1;user003_2;password003_2 +user004_1;password004_1;user004_2;password004_2 +user005_1;password005_1;user005_2;password005_2 +... -RFC 2595 - Using TLS with IMAP, POP3 and ACAP -http://www.faqs.org/rfcs/rfc2595.html +On Unix the shell program can be: -RFC 2822 - Internet Message Format -http://www.faqs.org/rfcs/rfc2822.html + { while IFS=';' read u1 p1 u2 p2; do + imapsync --host1 imap.side1.org --user1 "$u1" --password1 "$p1" \ + --host2 imap.side2.org --user2 "$u2" --password2 "$p2" ... + done ; } < file.csv -RFC 2342 - IMAP4 Namespace -http://www.faqs.org/rfcs/rfc2342.html +On Windows the batch program can be: -RFC2180 - IMAP4 Multi-Accessed Mailbox Practice -http://www.faqs.org/rfcs/rfc2180.html - -RFC 4549 - Synchronization Operations for Disconnected IMAP4 Clients -http://www.faqs.org/rfcs/rfc4549.html + FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.csv) DO imapsync ^ + --host1 imap.side1.org --user1 %%G --password1 %%H ^ + --host2 imap.side2.org --user2 %%I --password2 %%J ... +The ... can be replaced by nothing or any supplementary imapsync option. ======================================================================= Q. Where I can find old imapsync releases? @@ -190,26 +197,34 @@ The sent time and date are given by the "Date:" header and it is set most of the time by the MUA (Mail User Agent, Mutt, Eudora, Thunderbird etc.). -imapsync does not touch any header since the header is used to -identify the messages in both parts. +imapsync does not touch any byte of messages unless told to do so +by an option. Messages on both parts should be identical +(some IMAP servers add or even change header lines). Solutions: -a) use --idatefromheader to set the internal dates on host2 same as the - "Date:" headers. -b) In Maildir boxes, after the sync (too late...), use the script +a) Use the --syncinternaldates option and keep using Eudora. + But --syncinternaldates is now turn on by default so if you + encounter the issue then the solution is harder, depending + on email client softwares and IMAP server softwares. + +b) use --idatefromheader to set the internal dates on host2 same as the + "Date:" headers. It won't work if a) doesn't work. + +c) In Maildir boxes, after the sync (too late...), use the script learn/adjust_time.pl to change the internal dates from the "Date:" header. -c) Don't use buggy Eudora. -d) Use the --syncinternaldates option and keep using Eudora. - --syncinternaldates is now turn on by default. + +d) Use a better email client. ======================================================================= Q. imapsync calculates 479 messages in a folder but only transfers 400 messages. What's happen? -R1. imapsync considers the header part of a message (as a whole or - only specific lines depending on --useheader --skipheader) - to identify a message on both sides. +R1. Unless --useuid is used, imapsync considers the header part + of a message to identify a message on both sides. + Header part is taken as a whole with "--useheader ALL" or + only specific lines depending on --useheader --skipheader + or default values. Consequences: @@ -222,6 +237,22 @@ R2. With option --useuid imapsync doesn't use headers to identify messages on both sides but it uses their imap uid. In than case duplicates are transfered and --delete2 won't work. +======================================================================= +Q. I need to log every output on a file named log.txt + +R. Use redirections of both standard and error outputs "> log.txt 2>&1" + + imapsync ... > log.txt 2>&1 + +======================================================================= +Q. I need to log every output on a file named log.txt and also to the + screen in order to keep seeing what's going on during execution + +R. Use the tee program (also available on Windows) +http://en.wikipedia.org/wiki/Tee_%28command%29 + + imapsync ... 2>&1 | tee log.txt + ======================================================================= Q. I run multiple imapsync applications at the same time then get a warning "imapsync.pid already exists, overwriting it". @@ -1241,3 +1272,31 @@ R. You'll find an RPM imapsync.spec file in the directory learn/rpm/ It has been tested with imapsync 1.434 (May 2011) on CentOS5 and RedHat RHEL5 Linux. (Thanks to Ole Holm Nielsen). This imapsync.spec is derivated from Neil Brown work in 2007. + +======================================================================= +Q. Where I can read up on the various IMAP RFCs? + +R. Here: + +RFC 3501 - INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 +http://www.faqs.org/rfcs/rfc3501.html + +RFC2683 - IMAP4 Implementation Recommendations +http://www.faqs.org/rfcs/rfc2683.html + +RFC 2595 - Using TLS with IMAP, POP3 and ACAP +http://www.faqs.org/rfcs/rfc2595.html + +RFC 2822 - Internet Message Format +http://www.faqs.org/rfcs/rfc2822.html + +RFC 2342 - IMAP4 Namespace +http://www.faqs.org/rfcs/rfc2342.html + +RFC2180 - IMAP4 Multi-Accessed Mailbox Practice +http://www.faqs.org/rfcs/rfc2180.html + +RFC 4549 - Synchronization Operations for Disconnected IMAP4 Clients +http://www.faqs.org/rfcs/rfc4549.html + + diff --git a/Makefile b/Makefile index e73c0da..d888d0d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.82 2011/07/11 01:02:45 gilles Exp gilles $ +# $Id: Makefile,v 1.84 2011/07/29 03:02:01 gilles Exp gilles $ .PHONY: help usage all @@ -17,6 +17,7 @@ usage: @echo "make tests_win32_dev # run test2.bat on win32" @echo "make all " @echo "make upload_index" + @echo "make upload_ks" @echo "make imapsync.exe" @echo "make imapsync_elf_x86.bin" @@ -144,7 +145,7 @@ tests_win32: dosify_bat # ssh Admin@c 'tasklist /NH /FO CSV' tests_win32_dev: dosify_bat - scp imapsync test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + scp imapsync file.csv test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat' test_imapsync_exe: dosify_bat @@ -238,7 +239,7 @@ dist_dir: dist_prepa_exe: imapsync.exe mkdir -p $(DIST_PATH) - ln -f ./imapsync.exe $(DIST_PATH)/ + cp -a ./imapsync.exe $(DIST_PATH)/ #cd $(DIST_PATH)/ && md5sum ./imapsync.exe > ./imapsync.exe.md5.txt #cd $(DIST_PATH)/ && md5sum -c ./imapsync.exe.md5.txt @@ -279,8 +280,6 @@ upload_index: index.shtml ../../public_html/www.linux-france.org/html/prj/imapsync/ sh $(HOME)/memo/lfo-rsync - - niouze_lfo : echo "CORRECT ME: . ./memo && lfo_announce" diff --git a/README b/README index fce9363..897f262 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 36 different IMAP server softwares supported with success. - $Revision: 1.452 $ + $Revision: 1.456 $ SYNOPSIS To synchronise imap account "foo" on "imap.truc.org" to imap account @@ -293,6 +293,9 @@ IMAP SERVERS - DBMail 0.9, 2.0.7 (GPL). But DBMail 1.2.1 is supported. Patient and confident testers are welcome. - Imail 7.04 (maybe). + - (2011) MDaemon 12.0.3 as host2 but MDaemon is supported as host1. + MDaemon is simply buggy with the APPEND IMAP command with + any IMAP email client. Success stories reported with the following 44 imap servers (software names are in alphabetic order): @@ -387,15 +390,27 @@ HUGE MIGRATION The file.csv file contains: - user0001;password0001;user0002;password0002 - user0011;password0011;user0012;password0012 ... + user001_1;password001_1;user001_2;password001_2 + user002_1;password002_1;user002_2;password002_2 + user003_1;password003_1;user003_2;password003_2 + user004_1;password004_1;user004_2;password004_2 + user005_1;password005_1;user005_2;password005_2 ... - And the shell program is just: + On Unix the shell program can be: { while IFS=';' read u1 p1 u2 p2; do - imapsync --user1 "$u1" --password1 "$p1" --user2 "$u2" --password2 "$p2" ... + imapsync --host1 imap.side1.org --user1 "$u1" --password1 "$p1" \ + --host2 imap.side2.org --user2 "$u2" --password2 "$p2" ... done ; } < file.csv + On Windows the batch program can be: + + FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.csv) DO imapsync ^ + --host1 imap.side1.org --user1 %%G --password1 %%H ^ + --host2 imap.side2.org --user2 %%I --password2 %%J ... + + The ... have to be replaced by nothing or any imapsync option. + Welcome in shell programming ! Hacking @@ -426,5 +441,5 @@ SIMILAR SOFTWARES Feedback (good or bad) will often be welcome. - $Id: imapsync,v 1.452 2011/07/11 00:29:06 gilles Exp gilles $ + $Id: imapsync,v 1.456 2011/08/24 04:21:30 gilles Exp gilles $ diff --git a/TIME b/TIME index 112e959..8ee8200 100644 --- a/TIME +++ b/TIME @@ -1,3 +1,5 @@ +120 Statistics statistics_VERSION_synthesis +150 10 years old announce. index.html. 10 EUR. freshmeat announce+release 1.452 60 Added --search option. 600 (1.446) new host ks. newsletter for imapsync updates. first letter to 563 members. 30 Patched tests_good_date() and good_date() with Dax Kelson patches. diff --git a/TODO b/TODO index 40d06e4..b4ef37d 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: TODO,v 1.100 2011/07/11 01:09:39 gilles Exp gilles $ +# $Id: TODO,v 1.101 2011/08/24 06:50:30 gilles Exp gilles $ TODO file for imapsync ---------------------- @@ -36,6 +36,8 @@ Does \lalala can be forbidden (courier does a with * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited +Add an option to log both on screen and append to a file. +At least document the tee command solution (Unix and Windows) Suggestion: it's very difficult to track down messages which are behaving funny during the sync. It would be great - and presumably easy to code - diff --git a/VERSION b/VERSION index 6268907..3853217 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.452 +1.456 diff --git a/VERSION_EXE b/VERSION_EXE index 6268907..3853217 100644 --- a/VERSION_EXE +++ b/VERSION_EXE @@ -1 +1 @@ -1.452 +1.456 diff --git a/W/paypal_reply/paypal_bilan b/W/paypal_reply/paypal_bilan index 7e86005..d279915 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.35 2011/06/28 23:18:12 gilles Exp gilles $ +# $Id: paypal_bilan,v 1.36 2011/07/18 19:21:07 gilles Exp gilles $ use strict; use warnings; @@ -143,23 +143,21 @@ my $nb_invoice_sent = scalar( @invoice_sent ) ; print "USD banque $total_usd_received\n" ; print "USD invoice $total_usd_invoice\n" ; my $total_eur_from_usd ; -$total_eur_from_usd = int( ( $total_usd_invoice / $usdeur ) + 0.5 ) ; # au 30 nov 2010 http://fr.finance.yahoo.com/devises/convertisseur/#from=EUR;to=USD;amt=1 +$total_eur_from_usd = sprintf('%2.2f', $total_usd_invoice / $usdeur ) ; # au 30 nov 2010 http://fr.finance.yahoo.com/devises/convertisseur/#from=EUR;to=USD;amt=1 print "EUR from USD $total_eur_from_usd\n" ; -#$total_eur = int( ( $total_eur_invoice / 1.3 ) + 0.5 ) ; -#print "EUR $total_eur_from_usd\n" ; print "EUR banque $total_eur_received\n" ; print "EUR invoice $total_eur_invoice\n" ; my $total_eur = $total_eur_from_usd + $total_eur_invoice ; -$total_HT_EUR_exo = sprintf('%2.f', $total_HT_EUR_exo) ; -$total_HT_EUR_ass = sprintf('%2.f', $total_HT_EUR_ass) ; -$total_TVA_EUR = sprintf('%2.f', $total_TVA_EUR) ; +$total_HT_EUR_exo = sprintf('%2.2f', $total_HT_EUR_exo) ; +$total_HT_EUR_ass = sprintf('%2.2f', $total_HT_EUR_ass) ; +$total_TVA_EUR = sprintf('%2.2f', $total_TVA_EUR) ; -$total_HT_EUR_sup = sprintf('%2.f', $total_HT_EUR_sup) ; -$total_TVA_EUR_sup = sprintf('%2.f', $total_TVA_EUR_sup) ; +$total_HT_EUR_sup = sprintf('%2.2f', $total_HT_EUR_sup) ; +$total_TVA_EUR_sup = sprintf('%2.2f', $total_TVA_EUR_sup) ; -$total_eur = sprintf('%2.f', $total_eur) ; +$total_eur = sprintf('%2.2f', $total_eur) ; print "EUR total $total_eur\n" ; print "EUR total HT exo $total_HT_EUR_exo\n" ; diff --git a/W/paypal_reply/paypal_build_invoices b/W/paypal_reply/paypal_build_invoices index 066d379..55156ef 100755 --- a/W/paypal_reply/paypal_build_invoices +++ b/W/paypal_reply/paypal_build_invoices @@ -13,8 +13,12 @@ set -x #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 473 /g/paypal/paypal_2011_03_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 570 /g/paypal/paypal_2011_04_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 645 /g/paypal/paypal_2011_05_complet.csv -/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 733 /g/paypal/paypal_2011_06_complet.csv -/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 824 /g/paypal/paypal_2011_07_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 733 /g/paypal/paypal_2011_06_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 824 /g/paypal/paypal_2011_07_complet.csv +/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 917 /g/paypal/paypal_2011_08_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 set +x # La totale @@ -22,6 +26,12 @@ set +x --first_in 147 --avoid_numbers '292 293 643 644 731 732' \ /g/paypal/paypal_201?_??_complet.csv +: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan \ + --first_in 147 --avoid_numbers '292 293 643 644 731 732' \ + /g/paypal/paypal_201?_??_complet.csv + + + # USD de 147 à 340 # EUR de 341 à ... @@ -67,6 +77,8 @@ set +x # 556 TVA 4,92 # 563 TVA 4,92 +echo 'sh paypal_build_invoices /g/var/paypal_invoices/???' + for d in "$@"; do echo "==== $d ====" cd $d diff --git a/W/paypal_reply/paypal_send_invoices b/W/paypal_reply/paypal_send_invoices index 36ff50a..0549fc8 100755 --- a/W/paypal_reply/paypal_send_invoices +++ b/W/paypal_reply/paypal_send_invoices @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: paypal_send_invoices,v 1.6 2011/06/07 23:40:21 gilles Exp gilles $ +# $Id: paypal_send_invoices,v 1.7 2011/07/14 12:31:44 gilles Exp gilles $ # usages: # sh paypal_send_invoices /g/var/paypal_invoices/147 @@ -26,7 +26,7 @@ send_invoice() { test -f facture_message_body.txt || { echo NO facture_message_body.txt ; return; } test -f email_address.txt || { echo NO email_address.txt ; return; } - email=${2:-`cat email_address.txt`} + email=${2:-`cat email_address_2.txt || cat email_address.txt`} > facture_message_to.txt egrep '^To: ' facture_message_header.txt > /dev/null || echo "To: $email" > facture_message_to.txt cat facture_message_header.txt facture_message_to.txt facture_message_body.txt > facture_message.txt @@ -49,6 +49,8 @@ send_invoice() { } } +echo $0 '/g/var/paypal_invoices/99?' + for d in "$@"; do ( send_invoice "$d" ) done diff --git a/file.csv b/file.csv new file mode 100644 index 0000000..cd03ab9 --- /dev/null +++ b/file.csv @@ -0,0 +1,22 @@ +# Example file.csv for imapsync massive migration. + +# Thanks to http://ss64.com/nt/for_f.html +# +# A line beginning with # is a comment thanks to option Win32 eol=# +# Separator is character ; it can be changed by any character using delims=; +# Each contains 4 columns, columns are parameters for --user1 --password1 --user2 --password2 +# +# This file can be used on Windows with the following line in a batch +# FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.csv) DO imapsync --host1 imap.truc.org --user1 %%G --password1 %%H --host2 imap.trac.org --user2 %%I --password2 %%J +# +# This file can be used on Unix with the following line in a Bourne shell script +# { while IFS=';' read u1 p1 u2 p2; do imapsync --user1 "$u1" --password1 "$p1" --user2 "$u2" --password2 "$p2" ... ; done ; } < file.csv +# +# +# +user001_1;password001_1;user001_2;password001_2 +user002_1;password002_1;user002_2;password002_2 +user003_1;password003_1;user003_2;password003_2 +# Another comment blabla +user004_1;password004_1;user004_2;password004_2 +user005_1;password005_1;user005_2;password005_2 diff --git a/imapsync b/imapsync index b809719..c805ecf 100755 --- a/imapsync +++ b/imapsync @@ -20,7 +20,7 @@ Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 36 different IMAP server softwares supported with success. -$Revision: 1.452 $ +$Revision: 1.456 $ =head1 SYNOPSIS @@ -341,6 +341,10 @@ Failure stories reported with the following 3 imap servers: - DBMail 0.9, 2.0.7 (GPL). But DBMail 1.2.1 is supported. Patient and confident testers are welcome. - Imail 7.04 (maybe). + - (2011) MDaemon 12.0.3 as host2 but MDaemon is supported as host1. + MDaemon is simply buggy with the APPEND IMAP command with + any IMAP email client. + Success stories reported with the following 44 imap servers (software names are in alphabetic order): @@ -454,16 +458,28 @@ The separator used in this example is ';' The file.csv file contains: -user0001;password0001;user0002;password0002 -user0011;password0011;user0012;password0012 +user001_1;password001_1;user001_2;password001_2 +user002_1;password002_1;user002_2;password002_2 +user003_1;password003_1;user003_2;password003_2 +user004_1;password004_1;user004_2;password004_2 +user005_1;password005_1;user005_2;password005_2 ... -And the shell program is just: +On Unix the shell program can be: { while IFS=';' read u1 p1 u2 p2; do - imapsync --user1 "$u1" --password1 "$p1" --user2 "$u2" --password2 "$p2" ... + imapsync --host1 imap.side1.org --user1 "$u1" --password1 "$p1" \ + --host2 imap.side2.org --user2 "$u2" --password2 "$p2" ... done ; } < file.csv +On Windows the batch program can be: + + FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.csv) DO imapsync ^ + --host1 imap.side1.org --user1 %%G --password1 %%H ^ + --host2 imap.side2.org --user2 %%I --password2 %%J ... + +The ... have to be replaced by nothing or any imapsync option. + Welcome in shell programming ! =head1 Hacking @@ -500,7 +516,7 @@ Entries for imapsync: Feedback (good or bad) will often be welcome. -$Id: imapsync,v 1.452 2011/07/11 00:29:06 gilles Exp gilles $ +$Id: imapsync,v 1.456 2011/08/24 04:21:30 gilles Exp gilles $ =cut @@ -614,7 +630,7 @@ my( # global variables initialisation -$rcs = '$Id: imapsync,v 1.452 2011/07/11 00:29:06 gilles Exp gilles $ '; +$rcs = '$Id: imapsync,v 1.456 2011/08/24 04:21:30 gilles Exp gilles $ '; $total_bytes_transferred = 0; $total_bytes_skipped = 0; @@ -980,6 +996,12 @@ my @requested_folder = sort(keys(%requested_folder)); @h1_folders_wanted = @requested_folder; +#my $h1_namespace = $imap1->namespace() ; +#my $h2_namespace = $imap2->namespace() ; +#require Data::Dumper ; +#$debug and print "Host1 namespace:\n", Data::Dumper->Dump([$h1_namespace]) ; +#$debug and print "Host2 namespace:\n", Data::Dumper->Dump([$h2_namespace]) ; + my($h1_sep,$h2_sep); # what are the private folders separators for each server ? @@ -987,11 +1009,6 @@ $debug and print "Getting separators\n"; $h1_sep = get_separator($imap1, $sep1, "--sep1"); $h2_sep = get_separator($imap2, $sep2, "--sep2"); -#my $h1_namespace = $imap1->namespace(); -#my $h2_namespace = $imap2->namespace(); -#$debug and print "Host1 namespace:\n", Data::Dumper->Dump([$h1_namespace]); -#$debug and print "Host2 namespace:\n", Data::Dumper->Dump([$h2_namespace]); - my($h1_prefix,$h2_prefix); $h1_prefix = get_prefix($imap1, $prefix1, "--prefix1"); $h2_prefix = get_prefix($imap2, $prefix2, "--prefix2"); @@ -1372,8 +1389,8 @@ sub sync_flags { return() if size_filtered_flag( $h1_size ) ; # used cached flag values for efficiency - my $h1_flags = $h1_fir_ref->{ $h1_msg }->{ "FLAGS" } ; - my $h2_flags = $h2_fir_ref->{ $h2_msg }->{ "FLAGS" } ; + my $h1_flags = $h1_fir_ref->{ $h1_msg }->{ "FLAGS" } || '' ; + my $h2_flags = $h2_fir_ref->{ $h2_msg }->{ "FLAGS" } || '' ; # RFC 2060: This flag can not be altered by any client $h1_flags =~ s@\\Recent\s?@@gi ; @@ -1805,8 +1822,8 @@ sub banner_imapsync { my @argv_copy = @_; my $banner_imapsync = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.452 $ ', - '$Date: 2011/07/11 00:29:06 $ ', + '$Revision: 1.456 $ ', + '$Date: 2011/08/24 04:21:30 $ ', "\n",localhost_info(), "\n", "Command line used:\n", "$0 ", command_line_nopassword(@argv_copy), "\n", @@ -2061,7 +2078,7 @@ sub get_separator { my($sep_out); - if ($sep_in) { + if ( defined( $sep_in ) ) { print "Using [$sep_in] given by $sep_opt\n"; $sep_out = $sep_in; return($sep_out); @@ -2072,7 +2089,8 @@ sub get_separator { return($sep_out) if defined $sep_out; print "NAMESPACE request failed for ", - $imap->Server(), ": ", $imap->LastError, "\n"; + $imap->Server(), ": ", $imap->LastError, "\n", + help_to_guess_sep( $imap, $sep_opt ) ; exit_clean(1); } else{ @@ -3562,7 +3580,7 @@ sub check_last_release { } sub imapsync_version { - my $rcs = '$Id: imapsync,v 1.452 2011/07/11 00:29:06 gilles Exp gilles $ '; + my $rcs = '$Id: imapsync,v 1.456 2011/08/24 04:21:30 gilles Exp gilles $ '; $rcs =~ m/,v (\d+\.\d+)/; my $VERSION = ($1) ? $1: "UNKNOWN"; return($VERSION); diff --git a/index.shtml b/index.shtml index fae8ee8..176cf9e 100644 --- a/index.shtml +++ b/index.shtml @@ -5,7 +5,7 @@ Imapsync: an IMAP migration tool ( release <!--#exec cmd="cat VERSION"--> ) - + @@ -28,8 +28,6 @@ - -
-imapsync logo +imapsync logo

Welcome to the imapsync web site!

+Ten years old since release 1.1!
+(on Friday 29 July 2011)
@@ -59,6 +59,16 @@ where the user plays independently on both sides. Use offlineimap (written by John Goerzen) for this purpose.

+

Some numbers

+ + + +

Latest release is imapsync @@ -73,11 +83,11 @@ where the user plays independently on both sides. Use offlineimap --> -

Some numbers

- - -

Who is the author?

Gilles LAMIRAL
@@ -138,7 +139,7 @@ where the user plays independently on both sides. Use offlineimap The Perl imapsync source code will run anywhere a Perl interpreter can run: any Unix, Linux, Windows, or Mac OS operating system.

-

Buy latest imapsync Perl source code for 30 EUR +

Buy latest imapsync Perl source code for 30 EUR

30 EUR is equal to around 45 USD, no problem to pay in USD (or any currency) with paypal: @@ -148,66 +149,30 @@ The Perl imapsync source code will run anywhere a Perl interpreter can

+ imapsync usage
- - - - -

- - -

You will receive a download link just after the payment.
-One year of imapsync updates without extra payment.
-30 days money-back guarantee!

- -

Buy standalone imapsync.exe for win32

- -

Struggle free from source code and Perl installation by
-buying the latest win32 standalone imapsync.exe for 30 EUR

- -

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

- - -
-

- -imapsync usage -
- - - +

+ +

You will receive a download link just after the payment.
One year of imapsync updates without extra payment.
30 days money-back guarantee!

- -

Buy professional support for imapsync

-

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

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

-90 EUR is equal to around 130 USD, no problem to pay in USD (or any currency) with paypal: +180 EUR is equal to around 260 USD, no problem to pay in USD (or any currency) with paypal:

@@ -219,16 +184,48 @@ The build system for imapsync.exe is XP Pro SP2 on a Intel Celeron 400 MHz 256 M name="submit" alt="PayPal - The safer, easier way to pay online!" /> - +

- - -

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

+

Buy standalone imapsync.exe for win32

+

Struggle free from source code and Perl installation by
+buying the latest win32 standalone imapsync.exe for 10 EUR

+ +

+30 EUR is equal to around 45 USD, no problem to pay in USD (or any currency) with paypal: +

+ +
+

+ + +imapsync usage +
+ + +

+
+ +

You will receive a download link just after the payment.
+One year of imapsync updates without extra payment.
+30 days money-back guarantee!

+ + + + +

Documentation

Read the INSTALL file to know how to install imapsync on your system. @@ -323,19 +320,19 @@ will be to code it or fix it.

Some features and their time/money to be done evaluation:

- - - - - - - - - - - - - + + + + + + + + + + + + +
DONEFeature Time guessedTime spentMoney receivedMoney needed
NoBackup to files 20 hours 60 min 0 $ 800 $
NoEfficient Gmail backup 20 hours 80 min 0 $ 800 $
NoBetter error reporting 5 hours 0 min 0 $ 200 $
YesAdd cache 10 hours 1310 min 400 $ 400 $
YesSpeedup 50% 10 hours 80 min 10 $ 400 $
Yes--delete2folders 3 hours 270 min 90 $ 0 $
YesNTLM auth 3 hours 300 min 15 $ 150 $
YesWin32 imapsync.exe 8 hours 520 min 45 $ 240 $
YesWin32 bug fixes various 370 min 100 $ 85 $
YesFix capability changes 1 hour 80 min 0 $ 40 $
YesLarge mailbox --maxage 4 hours 270 min 0 $ 160 $
Yesdkimap support 3 hours 120 min 0 $ 120 $
DONEFeature Time guessedTime spentMoney receivedMoney still needed
NoBackup to files 20 hours 60 min 0 $ 800 $
NoEfficient Gmail backup 20 hours 80 min 0 $ 800 $
NoBetter error reporting 5 hours 0 min 0 $ 200 $
YesAdd cache 10 hours 1310 min 400 $ 0 $
YesSpeedup 50% 10 hours 80 min 10 $ 0 $
Yes--delete2folders 3 hours 270 min 90 $ 0 $
YesNTLM auth 3 hours 300 min 15 $ 0 $
YesWin32 imapsync.exe 8 hours 520 min 45 $ 0 $
YesWin32 bug fixes various 370 min 100 $ 0 $
YesFix capability changes 1 hour 80 min 0 $ 0 $
YesLarge mailbox --maxage 4 hours 270 min 0 $ 0 $
Yesdkimap support 3 hours 120 min 0 $ 0 $
Nogratis from here 4 hours 0 min 0 $ 60000 $
@@ -350,6 +347,7 @@ Don't hesitate to have a try, I will help you and make efforts to switch them to
  • DBMail 0.9, 2.0.7 (GPL). But most other DBMail releases are supported (see below)
  • Imail 7.04 (maybe).
  • MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
  • +
  • (2011) MDaemon 12.0.3 as host2 but MDaemon is supported as host1. MDaemon is simply buggy with the APPEND IMAP command with any IMAP email client.
  • Now the long reported success stories list: 44 different imap server softwares supported!
    @@ -451,7 +449,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: index.shtml,v 1.75 2011/07/11 01:42:17 gilles Exp gilles $) +($Id: index.shtml,v 1.86 2011/08/03 01:26:05 gilles Exp gilles $)

    diff --git a/learn/append b/learn/append new file mode 100755 index 0000000..4044406 --- /dev/null +++ b/learn/append @@ -0,0 +1,53 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use English; +use Mail::IMAPClient; + +my $rcs = '$Id: append,v 1.1 2011/07/14 16:49:02 gilles Exp gilles $ '; + +$ARGV[3] or die "usage: $0 host user password folder uid\n"; + +my $host = $ARGV[0]; +my $user = $ARGV[1]; +my $password = $ARGV[2]; +my $folder = $ARGV[3]; +my $uid = $ARGV[4]; + +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->Uid(1); +$imap->Peek(1); +$imap->Clear(0); + +#print map {"$_\n"} $imap->folders(); + +$imap->select($folder) or die; +my @msgs = $imap->messages ; +print "LIST: @msgs\n"; + +my $msgtext = "Subject: 9 + +?? +" ; + +my $flags = '\Seen' ; +my $date = "16-Mar-2011 11:07:11 +0000" ; + +my $new_id_1b = $imap->append_string( $folder, $msgtext ) ; +print "==== OK 1b $new_id_1b\n" if $new_id_1b ; +$imap->noop ; +@msgs = $imap->messages ; +print "LIST: @msgs\n";#my $new_id_1 = $imap->append_string( $folder, $msgtext, $flags, $date ) ; +#print "==== OK 1 $new_id_1\n" if $new_id_1 ; +#my $new_id_2 = $imap->append_string( $folder, $msgtext, $flags, $date ) ; +#print "==== OK 2 $new_id_2\n" if $new_id_2 ; + +$imap->close(); + diff --git a/learn/file.csv b/learn/file.csv deleted file mode 100644 index af67130..0000000 --- a/learn/file.csv +++ /dev/null @@ -1,2 +0,0 @@ -user0001;password0001;user0002;password0002 -user0011;password0011;user0012;password0012 diff --git a/learn/mi3 b/learn/mi3 index 1636ebe..e84e800 100755 --- a/learn/mi3 +++ b/learn/mi3 @@ -1,4 +1,4 @@ #!/bin/sh -perl -I../Mail-IMAPClient-3.25/lib "$@" +perl -I../Mail-IMAPClient-3.28/lib "$@" diff --git a/memo b/memo index 1f27723..cebdf78 100644 --- a/memo +++ b/memo @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: memo,v 1.32 2011/07/11 01:06:49 gilles Exp gilles $ +# $Id: memo,v 1.35 2011/08/22 00:31:14 gilles Exp gilles $ software_version() { @@ -13,33 +13,32 @@ statistics_lfo() { #grep prj/imapsync/VERSION /usr/local/apache/logs/access_log | sort -n | cut -d ' ' -f 1,12,13|uniq -c | sort -n # list ip cat < ${b}.imapsync_VERSION done } -echo statistics_VERSION_monthly_ip +echo statistics_VERSION_monthly_ip 08 statistics_VERSION_monthly_ip() { - month=$1 + month=${1:-`date '+%m'`} cut -d ' ' -f 1,12,13,18,19 linux-france.org.??-${month}-2011.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_2011_${month}.ip } -echo statistics_VERSION_monthly_ip_wc +echo statistics_VERSION_monthly_ip_wc 08 statistics_VERSION_monthly_ip_wc() { - month=$1 + month=${1:-`date '+%m'`} test -f stats_imapsync_2011_${month}.ip || statistics_VERSION_monthly_ip $month wc -l stats_imapsync_2011_${month}.ip } -echo statistics_VERSION_monthly_runs +echo statistics_VERSION_monthly_runs 08 statistics_VERSION_monthly_runs() { - month=$1 + month=${1:-`date '+%m'`} test -f stats_imapsync_2011_${month}.runs || wc -l linux-france.org.??-${month}-2011.imapsync_VERSION > stats_imapsync_2011_${month}.runs cat stats_imapsync_2011_${month}.runs } + +echo statistics_VERSION_monthly 08 +statistics_VERSION_monthly() { + month=${1:-`date '+%m'`} + ( + statistics_VERSION_getstats + statistics_VERSION_monthly_ip $month + statistics_VERSION_monthly_runs $month + statistics_VERSION_monthly_ip_wc $month + ) +} + +echo statistics_VERSION_synthesis +statistics_VERSION_synthesis() { + ( + cd /home/lf/glamiral/imapsync_stats + echo Nb users each month + wc -l *.ip + echo Nb runs each month + tail -n 1 *.runs + ) +} + + } statistics_VERSION_ks() { @@ -88,7 +111,7 @@ statistics_VERSION_getstats() { cd /home/imapsync/imapsync_stats for f in /var/log/apache2/access.log_????????.gz ; do b=`basename "$f" .gz` - echo "$b" + #echo "$b" test -f ${b}.imapsync_VERSION && continue echo NOT DONE ${b}.imapsync_VERSION zgrep -h /prj/imapsync/VERSION "$f" > ${b}.imapsync_VERSION @@ -96,18 +119,26 @@ statistics_VERSION_getstats() { ) } -echo statistics_VERSION_monthly_ip +echo statistics_VERSION_monthly_ip 08 statistics_VERSION_monthly_ip() { - month=$1 + month=${1:-`date '+%m'`} ( cd /home/imapsync/imapsync_stats cut -d ' ' -f 1,12,13,18,19 access.log_2011${month}??.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_2011_${month}.ip ) } +echo statistics_VERSION_yearly_ip +statistics_VERSION_yearly_ip() { + ( + cd /home/imapsync/imapsync_stats + cut -d ' ' -f 1,12,13,18,19 access.log_2011????.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_2011.ip + ) +} + echo statistics_VERSION_monthly_ip_wc statistics_VERSION_monthly_ip_wc() { - month=$1 + month=${1:-`date '+%m'`} ( cd /home/imapsync/imapsync_stats test -f stats_imapsync_2011_${month}.ip || statistics_VERSION_monthly_ip $month @@ -117,7 +148,7 @@ statistics_VERSION_monthly_ip_wc() { echo statistics_VERSION_monthly_runs statistics_VERSION_monthly_runs() { - month=$1 + month=${1:-`date '+%m'`} ( cd /home/imapsync/imapsync_stats # test -f stats_imapsync_2011_${month}.runs || @@ -125,6 +156,30 @@ statistics_VERSION_monthly_runs() { cat stats_imapsync_2011_${month}.runs ) } + +echo statistics_VERSION_monthly 08 +statistics_VERSION_monthly() { + month=${1:-`date '+%m'`} + ( + statistics_VERSION_getstats + statistics_VERSION_monthly_ip $month + statistics_VERSION_monthly_runs $month + statistics_VERSION_monthly_ip_wc $month + ) +} + +echo statistics_VERSION_synthesis +statistics_VERSION_synthesis() { + ( + cd /home/imapsync/imapsync_stats + echo Nb users each month + wc -l *.ip + echo Nb runs each month + tail -n 1 *.runs + ) +} + + } diff --git a/paypal_return.shtml b/paypal_return.shtml index 8c91dee..176f8b8 100644 --- a/paypal_return.shtml +++ b/paypal_return.shtml @@ -5,7 +5,7 @@ imapsync download - + @@ -81,7 +81,7 @@ gilles.lamiral@laposte.net

    This document last modified on
    -($Id: paypal_return.shtml,v 1.9 2011/05/31 08:28:00 gilles Exp gilles $) +($Id: paypal_return.shtml,v 1.10 2011/08/24 06:49:22 gilles Exp gilles $)

    diff --git a/paypal_return_support.shtml b/paypal_return_support.shtml index efe8cbd..fdf47b1 100644 --- a/paypal_return_support.shtml +++ b/paypal_return_support.shtml @@ -78,7 +78,7 @@ gilles.lamiral@laposte.net

    This document last modified on
    -($Id: paypal_return_support.shtml,v 1.3 2011/05/20 12:32:25 gilles Exp gilles $) +($Id: paypal_return_support.shtml,v 1.5 2011/08/03 00:57:39 gilles Exp gilles $)

    @@ -90,8 +90,8 @@ var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "hVVWCKzApQIQvOe62QM"; var google_conversion_value = 0; -if (30) { - google_conversion_value = 30; +if (90) { + google_conversion_value = 90; } /* ]]> */ @@ -99,7 +99,7 @@ if (30) { diff --git a/test2.bat b/test2.bat index b6c55fb..e9a62a7 100755 --- a/test2.bat +++ b/test2.bat @@ -1,13 +1,10 @@ -REM $Id: test2.bat,v 1.3 2011/05/30 21:58:08 gilles Exp gilles $ +REM $Id: test2.bat,v 1.5 2011/08/24 06:48:44 gilles Exp gilles $ cd C:\msys\1.0\home\Admin\imapsync REM perl ./imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --delete2 --expunge2 --folder INBOX REM perl ./imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --delete2 --expunge1 --expunge2 --folder INBOX --usecache - - - REM imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --justfolders --nofoldersize --folder INBOX.yop.yap --sep1 / --regextrans2 "s,/,_," REM imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --nofoldersize --folder INBOX.yop.yap --regexflag 's/\\Answered//g' --debug > out.txt @@ -19,4 +16,9 @@ REM --host1 p --user1 big1 --passfile1 secret.big1 ^ REM --host2 p --user2 big2 --passfile2 secret.big2 ^ REM --folder INBOX.bigmail -perl imapsync +REM perl imapsync +REM perl imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --nofoldersize --folder INBOX.yop.yap --regexflag "s/\\ /\\/g" --debugflags + +FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.csv) DO imapsync ^ +--host1 imap.side1.org --user1 %%G --password1 %%H ^ +--host2 imap.side2.org --user2 %%I --password2 %%J diff --git a/tests.sh b/tests.sh index 795b086..7e8fcf9 100644 --- a/tests.sh +++ b/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: tests.sh,v 1.170 2011/07/11 01:03:48 gilles Exp gilles $ +# $Id: tests.sh,v 1.174 2011/08/24 06:48:23 gilles Exp gilles $ # Example 1: # CMD_PERL='perl -I./Mail-IMAPClient-3.25/lib' sh -x tests.sh @@ -450,7 +450,7 @@ ll_delete2foldersbutnot() { --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --justfolders --nofoldersizes \ - --delete2foldersbutnot '/NEW_2/' \ + --delete2foldersbutnot '/NEW_2|NEW_3/' \ --dry } @@ -475,11 +475,29 @@ ll_bug_folder_name_with_blank() { --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --justfolders + --justfolders --fast echo "rm -rf /home/vmail/titi/.bugs/" } +ll_bug_folder_name_with_backslash() { +# Bug with Mail-IMAPClient-2.2.9 +# Fixed using Mail-IMAPClient-3.28 + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --fast + +# --folder "INBOX.yop.jj\\kk" +# --folder '"INBOX.yop.jj\kk"' --debug --debugimap --regextrans2 's,\\,_,g' +# --folder "INBOX.yop.jj\\kk" --debug --debugimap1 + echo "sudo rm -rf '/home/vmail/titi/.yop.jj\\kk'" +} + + + ll_prefix12() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1645,6 +1663,38 @@ gmail() { --regextrans2 's/\[Gmail\]/Gmail/' } +gmail_justfolders() { + + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 $HOST2 \ + --user2 tata \ + --passfile2 ../../var/pass/secret.tata \ + --useheader 'Message-Id' \ + --useheader="X-Gmail-Received" \ + --regextrans2 's/\[Gmail\]/Gmail/' \ + --justfolders +} + + +gmail_via_stunnel_ks() { + + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 ks.lamiral.info \ + --port1 243 --nossl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 $HOST2 \ + --user2 tata \ + --passfile2 ../../var/pass/secret.tata \ + --useheader 'Message-Id' \ + --useheader="X-Gmail-Received" \ + --debug --justfolders +} + gmail_gmail() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ @@ -1680,6 +1730,34 @@ gmail_gmail2() { } +yahoo_xxxx_login() { + ! ping -c1 imap.mail.yahoo.com || $CMD_PERL ./imapsync \ + --host1 imap.mail.yahoo.com \ + --ssl1 \ + --user1 glamiral \ + --passfile1 ../../var/pass/secret.gilles_yahoo \ + --host2 $HOST2 \ + --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --justlogin +} + +yahoo_xxxx() { + ! ping -c1 imap.mail.yahoo.com || $CMD_PERL ./imapsync \ + --host1 imap.mail.yahoo.com \ + --user1 glamiral \ + --passfile1 ../../var/pass/secret.gilles_yahoo \ + --host2 $HOST2 \ + --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --sep1 '.' + +# Yahoo works also with ssl +# --ssl1 \ +} + + + allow3xx() { $CMD_PERL ./imapsync \ @@ -1907,6 +1985,48 @@ ll_useuid_nousecache() # specific tests ########################## + +b2btech_1() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 pod51008.outlook.com \ + --user2 TestGilles@uncc.edu \ + --passfile2 ../../var/pass/secret.b2btech --tls2 \ + --useheader Message-Id --useheader Message-ID --fast --delete2 --expunge2 \ + --folder INBOX.oneemail --folder INBOX.few_emails --folder INBOX.Junk + + +} + +Otilio() { + $CMD_PERL ./imapsync \ + --host1 imap.gmail.com --ssl1 --user1 jacarmona@eurotyre.es \ + --passfile1 ../../var/pass/secret.Otilio1 \ + --host2 mail.eurotyre.es --user2 josedemo@eurotyre.es \ + --passfile2 ../../var/pass/secret.Otilio2 \ + --folder INBOX --nofoldersizes +} + +Otilio2() { + $CMD_PERL ./imapsync \ + --host1 imap.gmail.com --ssl1 --user1 jacarmona@eurotyre.es \ + --passfile1 ../../var/pass/secret.Otilio1 \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --useuid --folder INBOX --nofoldersizes +} + +Otilio3() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 mail.eurotyre.es --user2 josedemo@eurotyre.es \ + --passfile2 ../../var/pass/secret.Otilio2 \ + --folder INBOX --nofoldersizes --regextrans2 's,INBOX,INBOX/delete_me,g' +} + + Giancarlo_1() { $CMD_PERL ./imapsync \ --host1 87.241.29.226 --user1 "Diego@studiobdp.local" \ @@ -1917,7 +2037,7 @@ Giancarlo_1() { --nofoldersizes --useuid } -godaddy_1_justlogin() { +godaddy_1() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1926,6 +2046,18 @@ godaddy_1_justlogin() { --folder INBOX.oneemail --folder INBOX.few_emails } +godaddy_2() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 imap.secureserver.net --user2 migrationtest@overnightmac.com \ + --passfile2 ../../var/pass/secret.overnightmac --tls2 \ + --folder INBOX.Junk --debug +} + + + + mailenable_1() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -2264,6 +2396,7 @@ gmail_xxxxx gmail gmail_gmail gmail_gmail2 +yahoo_xxxx ll_ask_password ll_bug_folder_name_with_blank ll_timeout