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 )
-
+
@@ -28,8 +28,6 @@
-
-
+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
+
+
+
Number of imapsync users per month: between 2 and 3 thousands users
+
Number of imapsync transfers per month: between 3 and 8 millions transfers
+
Pourcentage of Windows users : 10%
+
Biggest user usage: 5 millions of IMAP mailbox transfers in a month (one every 2 seconds)
+
+
+
Latest release is imapsync
@@ -73,11 +83,11 @@ where the user plays independently on both sides. Use offlineimap
1.452
-
New feature: Added --search option allowing to select messages with the powerful IMAP SEARCH command.
-
Bugfix: Date reference to select messages with --maxdate --mindate is the beginning of imapsync run now.
-
Bugfix: Fixed ps call to work with Solaris 10. Thanks to Daniel Rohde.
-
Success: Kerio 7.2.0P1 success story.
-
Success: MDaemon 12.0.3 success story.
+
New feature: Added --search option allowing to select messages with the powerful IMAP SEARCH command.
+
Bugfix: Date reference to select messages with --maxdate --mindate is the beginning of imapsync run now.
+
Bugfix: Fixed ps call to work with Solaris 10. Thanks to Daniel Rohde.
+
Success: Kerio 7.2.0P1 success story.
+
Success: MDaemon 12.0.3 success story.
1.446
@@ -110,15 +120,6 @@ where the user plays independently on both sides. Use offlineimap
-->
-
Some numbers
-
-
-
Number of imapsync users per month: between 2 and 3 thousands users
-
Number of imapsync transfers per month: between 3 and 8 millions transfers
-
Pourcentage of MSWin32 users : 10%
-
Biggest user usage: 5 millions of transfers in a month (one every 2 seconds)
-
-
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
-
-
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:
-
-
-
-
+
+
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:
-
-
-
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:
+
+
+
+
+
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:
-
DONE
Feature
Time guessed
Time spent
Money received
Money needed
-
No
Backup to files
20 hours
60 min
0 $
800 $
-
No
Efficient Gmail backup
20 hours
80 min
0 $
800 $
-
No
Better error reporting
5 hours
0 min
0 $
200 $
-
Yes
Add cache
10 hours
1310 min
400 $
400 $
-
Yes
Speedup 50%
10 hours
80 min
10 $
400 $
-
Yes
--delete2folders
3 hours
270 min
90 $
0 $
-
Yes
NTLM auth
3 hours
300 min
15 $
150 $
-
Yes
Win32 imapsync.exe
8 hours
520 min
45 $
240 $
-
Yes
Win32 bug fixes
various
370 min
100 $
85 $
-
Yes
Fix capability changes
1 hour
80 min
0 $
40 $
-
Yes
Large mailbox --maxage
4 hours
270 min
0 $
160 $
-
Yes
dkimap support
3 hours
120 min
0 $
120 $
+
DONE
Feature
Time guessed
Time spent
Money received
Money still needed
+
No
Backup to files
20 hours
60 min
0 $
800 $
+
No
Efficient Gmail backup
20 hours
80 min
0 $
800 $
+
No
Better error reporting
5 hours
0 min
0 $
200 $
+
Yes
Add cache
10 hours
1310 min
400 $
0 $
+
Yes
Speedup 50%
10 hours
80 min
10 $
0 $
+
Yes
--delete2folders
3 hours
270 min
90 $
0 $
+
Yes
NTLM auth
3 hours
300 min
15 $
0 $
+
Yes
Win32 imapsync.exe
8 hours
520 min
45 $
0 $
+
Yes
Win32 bug fixes
various
370 min
100 $
0 $
+
Yes
Fix capability changes
1 hour
80 min
0 $
0 $
+
Yes
Large mailbox --maxage
4 hours
270 min
0 $
0 $
+
Yes
dkimap support
3 hours
120 min
0 $
0 $
No
gratis 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 $)