This commit is contained in:
Nick Bebout 2013-05-20 17:04:57 -05:00
parent f9c9223de1
commit 7b3dcc45fb
28 changed files with 503 additions and 1144 deletions

View file

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: CREDITS,v 1.172 2013/01/29 09:31:00 gilles Exp gilles $
# $Id: CREDITS,v 1.173 2013/05/06 08:16:53 gilles Exp gilles $
If you want to make a donation to the author, Gilles LAMIRAL,
use any of the following ways:
@ -30,6 +30,9 @@ I thank very much all of these people.
I thank also very much all people who bought imapsync from the homepage
but I don't cite them here.
Eduardo Bortoluzzi Junior
Write the XOAUTH code and FAQ item.
Marc Weber
Suggested --mark-as-deleted1 --mark-as-deleted2

View file

@ -1,17 +1,41 @@
RCS file: RCS/imapsync,v
Working file: imapsync
head: 1.536
head: 1.542
branch:
locks: strict
gilles: 1.536
gilles: 1.542
access list:
symbolic names:
keyword substitution: kv
total revisions: 536; selected revisions: 536
total revisions: 542; selected revisions: 542
description:
----------------------------
revision 1.536 locked by: gilles;
revision 1.542 locked by: gilles;
date: 2013/05/06 08:30:35; author: gilles; state: Exp; lines: +7 -7
Syntax with "" fix.
----------------------------
revision 1.541
date: 2013/05/06 07:10:29; author: gilles; state: Exp; lines: +111 -74
Started perlcritic corrections. Left 4 eval at level 5.
----------------------------
revision 1.540
date: 2013/04/22 11:05:51; author: gilles; state: Exp; lines: +11 -982
Removed old 2.2.9 Mail::IMAPClient patch stuff.
----------------------------
revision 1.539
date: 2013/04/22 00:54:22; author: gilles; state: Exp; lines: +12 -12
Fixed require namespace with uri_escape() calls.
----------------------------
revision 1.538
date: 2013/04/22 00:46:54; author: gilles; state: Exp; lines: +94 -9
Added XOAUTH authentication. Thanks to Eduardo Bortoluzzi Junior.
----------------------------
revision 1.537
date: 2013/04/19 06:59:17; author: gilles; state: Exp; lines: +9 -9
MDaemon 9.6.5, Surgemail 6.3d-72
----------------------------
revision 1.536
date: 2013/04/17 14:33:12; author: gilles; state: Exp; lines: +7 -7
Added --delete1 as an alias for --delete
----------------------------

50
FAQ
View file

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: FAQ,v 1.130 2013/04/17 12:46:10 gilles Exp gilles $
# $Id: FAQ,v 1.133 2013/05/06 08:17:13 gilles Exp gilles $
+------------------+
| FAQ for imapsync |
@ -359,16 +359,18 @@ Q. We have found that the sent time and date have been changed to the
R. This is the case with:
- Eudora
- Zimbra
- Outlook 2003
- Gmail
but not with
but not with
- Mutt
- Thunderbird
and no longer with
- Zimbra
- Gmail
Eurora shows by default the time the imap server received the email. I
think it is quite a wrong behavior since the messages can have
travelled some time before the reception.
traveled some time before the reception.
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,
@ -1448,7 +1450,6 @@ R. Gmail needs SSL
./imapsync \
--host1 imap.gmail.com \
--ssl1 \
--authmech1 LOGIN \
--user1 gilles.lamiral@gmail.com \
--password1 gmailsecret \
--exitwhenover 2500000000 \
@ -1470,6 +1471,43 @@ exceed maximum limit.
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
=======================================================================
Q. How to use XOAUTH to globally authenticate gmail users?
The XOAUTH code and this FAQ item come from Eduardo Bortoluzzi
Thanks Eduardo!
R. The goal of OAUTH is to migrate all users from/to Google Apps
Premier Edition without knowing their passwords.
The global password is available at the Google Apps control panel,
at Advanced Tools -> Manage OAuth domain key.
./imapsync \
--host1 imap.gmail.com --ssl1 \
--user1 foo@lab3.dedal.br \
--password1 secret1 \
--authmech1 XOAUTH \
--host2 imap.gmail.com --ssl2 \
--user2 bar@lab3.dedal.br \
--password2 secret2 \
--authmech2 XOAUTH
Google Apps is a paid service, but you can try it for 30 days without any cost.
Some notes about configuring the Google Apps XOAUTH:
On "Advanced Tools > Manage OAuth domain key > Two-legged OAuth access control"
the "Allow access to all APIs" must be checked
(https://support.google.com/a/bin/answer.py?answer=162105)
OR
On "Advanced Tools > Manage third party OAuth client access",
the configured costumer key must have the scope
"https://mail.google.com/" configured
(https://support.google.com/a/bin/answer.py?answer=162106).
=======================================================================
Q. migrate email from gmail to google apps

73
INSTALL
View file

@ -1,4 +1,4 @@
# $Id: INSTALL,v 1.27 2013/04/17 12:35:18 gilles Exp gilles $
# $Id: INSTALL,v 1.28 2013/05/14 08:19:08 gilles Exp gilles $
#
# INSTALL file for imapsync
# imapsync : IMAP sync or copy tool.
@ -30,16 +30,32 @@ WINDOWS
a) Simplest way:
- Buy imapsync.exe at http://imapsync.lamiral.info/
- Run imapsync.exe in a command prompt (execute cmd.exe).
- Or simpler, look at the batch file at
http://imapsync.lamiral.info/examples/imapsync_example.bat
and replace the parameters with your values
then run the batch file with a double-click.
It is simpler to edit a batch file with notepad than
the command line in dos mode.
b) Hard way:
- Get imapsync-x.xx.tgz
- Install Perl if it isn't already installed.
Strawberry Perl is a good candidate
- Use PPM to install modules listed in the PREREQUISITES section.
PPM is Perl Package Manager.
Strawberry Perl is a very good candidate
http://strawberryperl.com/
- Use the command CPAN to install modules listed in the PREREQUISITES section.
There is also a batch file that does this install for you
It is called install_modules.bat available at
http://imapsync.lamiral.info/examples/install_modules.bat
c) How to build imapsync.exe?
- Do the hard stuff in b)
- Run W/build_exe.bat (found in the tarball)
PREREQUISITES
-------------
@ -118,36 +134,51 @@ Here is some individual module help:
- Perl Time::HiRes
perl -mTime::HiRes -e ""
- Perl Data::Uniqid
perl -mData::Uniqid -e ""
- Perl URI::Escape
perl -mURI::Escape -e ""
Test everything in one command:
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL \
-mFile::Spec -mDigest::HMAC_MD5 -mAuthen::NTLM -e -mTime::HiRes ''
-mFile::Spec -mDigest::HMAC_MD5 -mAuthen::NTLM -e -mTime::HiRes \
-mData::Uniqid -mURI::Escape ""
You can install easily those Perl modules in latest release via the
following commands (with root permissions)
perl -MCPAN -e 'install Mail::IMAPClient'
perl -MCPAN -e 'install Digest::MD5'
perl -MCPAN -e 'install Term::ReadKey'
perl -MCPAN -e 'install IO::Socket::SSL'
perl -MCPAN -e 'install File::Spec'
perl -MCPAN -e 'install Digest::HMAC_MD5'
perl -MCPAN -e 'install Authen::NTLM'
perl -MCPAN -e 'install Time::HiRes'
perl -MCPAN -e "install Mail::IMAPClient"
perl -MCPAN -e "install Digest::MD5"
perl -MCPAN -e "install Term::ReadKey"
perl -MCPAN -e "install IO::Socket::SSL"
perl -MCPAN -e "install File::Spec"
perl -MCPAN -e "install Digest::HMAC_MD5"
perl -MCPAN -e "install Authen::NTLM"
perl -MCPAN -e "install Time::HiRes"
perl -MCPAN -e "install Data::Uniqid"
perl -MCPAN -e "install URI::Escape"
You can install them easily too by using the standard install
command on your system if the packages have been made on it
(so you may not have the latest but most of the time it
doesn't care).
doesn't care).
Modules Authen::NTLM, Data::Uniqid may be not available
this way since I haven't find them on Ubuntu.
Example on Debian/Ubuntu:
aptitude install libmail-imapclient-perl # Mail::IMAPClient'
aptitude install libdigest-md5-file-perl # Digest::MD5'
aptitude install libterm-readkey-perl # Term::ReadKey'
aptitude install libio-socket-ssl-perl # IO::Socket::SSL'
aptitude install libfile-spec-perl # File::Spec'
aptitude install libdigest-hmac-perl # Digest::HMAC_MD5'
aptitude install ? # (not free?) # Authen::NTLM
aptitude install libmail-imapclient-perl # Mail::IMAPClient
aptitude install libdigest-md5-file-perl # Digest::MD5
aptitude install libterm-readkey-perl # Term::ReadKey
aptitude install libio-socket-ssl-perl # IO::Socket::SSL
aptitude install libfile-spec-perl # File::Spec
aptitude install libdigest-hmac-perl # Digest::HMAC_MD5 Digest::HMAC_SHA1
INSTALLING on Unix
------------------

View file

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.116 2013/04/18 01:24:25 gilles Exp gilles $
# $Id: Makefile,v 1.118 2013/05/14 05:59:55 gilles Exp gilles $
.PHONY: help usage all
@ -13,6 +13,7 @@ usage:
@echo "make test_quick # few tests verbosely"
@echo "make tests_win32 # run tests on win32"
@echo "make tests_win32_dev # run test2.bat on win32"
@echo "make prereq_win32 # run W/install_modules.bat on win32"
@echo "make all "
@echo "make upload_index"
@echo "make upload_ks"
@ -20,6 +21,7 @@ usage:
@echo "make imapsync_elf_x86.bin"
@echo "make publish"
PREFIX ?= /usr
DIST_NAME=imapsync-$(VERSION)
DIST_FILE=$(DIST_NAME).tgz
@ -145,6 +147,9 @@ test_imapsync_exe: dosify_bat
scp W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
prereq_win32: imapsync examples/install_modules.bat .dosify_bat
scp examples/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat'
imapsync.exe: imapsync W/build_exe.bat .dosify_bat
rcsdiff imapsync
@ -257,7 +262,7 @@ ksa:
rsync -avHz --delete -P \
. imapsync@ks.lamiral.info:public_html/imapsync/
publish: upload_ks ksa ml
publish: ksa upload_ks ml
PUBLIC_FILES = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \
./index.shtml ./INSTALL \

15
README
View file

@ -4,7 +4,7 @@ NAME
More than 52 different IMAP server softwares supported with success, few
failures.
$Revision: 1.536 $
$Revision: 1.542 $
SYNOPSIS
To synchronize imap account "foo" on "imap.truc.org" to imap account
@ -191,6 +191,11 @@ SECURITY
--proxyauth1 to enable administrative user to masquerade as another
user. Can also be used on destination server with --proxyauth2
You can authenticate with OAUTH when transfering from Google Apps. The
consumer key will be the domain part of the --user, and the --password
will be used as the consumer secret. It does not work with Google Apps
free edition.
EXIT STATUS
imapsync will exit with a 0 status (return code) if everything went
good. Otherwise, it exits with a non-zero status.
@ -351,8 +356,8 @@ IMAP SERVERS
- Kerio 7.2.0 Patch 1 [host1] [host2]
- Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/)
- MailEnable 4.23 [host1] [host2], 4.26 [host1][host2], 5 [host1]
- MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), 12 [host2],
12.0.3 [host1], 12.5.5 [host1],
- MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform),
9.6.5 [host1], 12 [host2], 12.0.3 [host1], 12.5.5 [host1],
- Mercury 4.1 (Windows server 2000 platform)
- Microsoft Exchange Server 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
@ -374,7 +379,7 @@ IMAP SERVERS
- Softalk Workgroup Mail 7.6.4 [host1].
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System)
- Sun Java(tm) System Messaging Server 6.2-2.05, 6.2-7.05, 6.3
- Surgemail 3.6f5-5
- Surgemail 3.6f5-5, 6.3d-72 [host2]
- UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(http://www.washington.edu/imap/)
@ -458,5 +463,5 @@ SIMILAR SOFTWARES
Feedback (good or bad) will often be welcome.
$Id: imapsync,v 1.536 2013/04/17 14:33:12 gilles Exp gilles $
$Id: imapsync,v 1.542 2013/05/06 08:30:35 gilles Exp gilles $

View file

@ -1 +1 @@
1.536
1.542

View file

@ -1 +1 @@
1.536
1.542

View file

@ -184,3 +184,7 @@
1366203902 END 1.535 : mercredi 17 avril 2013, 15:05:02 (UTC+0200)
1366209307 BEGIN 1.536 : mercredi 17 avril 2013, 16:35:07 (UTC+0200)
1366210370 END 1.536 : mercredi 17 avril 2013, 16:52:50 (UTC+0200)
1366591668 BEGIN 1.538 : lundi 22 avril 2013, 02:47:48 (UTC+0200)
1366592337 END 1.538 : lundi 22 avril 2013, 02:58:57 (UTC+0200)
1367829058 BEGIN 1.542 : lundi 6 mai 2013, 10:30:58 (UTC+0200)
1367829799 END 1.542 : lundi 6 mai 2013, 10:43:19 (UTC+0200)

1
W/TIME
View file

@ -1,3 +1,4 @@
90 Added XOATH FAQ item, thanks to Eduardo, email feedback, amazon gift.
120 Fixed Scott issue, took long time (all messages list) even with --useuid --delete --nousecache --maxage 1
240 Fixed long names in invoices. + january invoices.
180 Release 1.476 --addheader

View file

@ -1,20 +1,20 @@
REM $Id: build_exe.bat,v 1.11 2012/12/24 02:25:55 gilles Exp gilles $
REM $Id: build_exe.bat,v 1.12 2013/05/06 08:16:26 gilles Exp gilles $
REM
echo Building imapsync.exe
cd C:\msys\1.0\home\Admin\imapsync
perl -mMail::IMAPClient -mIO::Socket -mIO::Socket::SSL ^
-mDigest::MD5 -mDigest::HMAC_MD5 ^
-mDigest::MD5 -mDigest::HMAC_MD5 -mDigest::HMAC_SHA1 ^
-mTerm::ReadKey -mFile::Spec -mAuthen::NTLM ^
-mTime::Local ^
-mTime::Local -mURI::Escape -mData::Uniqid^
-e ''
pp -o imapsync.exe --link libeay32_.dll --link libssl32_.dll ^
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL ^
-M Digest::MD5 -M Digest::HMAC_MD5 ^
-M Digest::MD5 -M Digest::HMAC_MD5 -M Digest::HMAC_SHA1 ^
-M Term::ReadKey -M Authen::NTLM ^
-M Time::Local ^
-M Time::Local -M URI::Escape -M Data::Uniqid ^
imapsync
echo Done building imapsync.exe

View file

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: memo,v 1.13 2013/02/08 15:01:18 gilles Exp gilles $
# $Id: memo,v 1.14 2013/04/29 08:15:35 gilles Exp gilles $
echo paypal_bilan_todo

View file

@ -367,6 +367,8 @@ sub tests_exportbnc {
}
sub tests {
tests_next_invoice( ) ;
#tests_half( ) ;

View file

@ -35,7 +35,8 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2299 /g/paypal/paypal_2013_01_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2384 /g/paypal/paypal_2013_02_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2451 /g/paypal/paypal_2013_03_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2451 /g/paypal/paypal_2013_03_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2519 /g/paypal/paypal_2013_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
@ -65,8 +66,9 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2299 /g/paypal/paypal_2013_01_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2384 /g/paypal/paypal_2013_02_complet.csv
set -x
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2451 /g/paypal/paypal_2013_03_complet.csv
set -x
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2519 /g/paypal/paypal_2013_04_complet.csv
set +x
# La totale
@ -81,6 +83,15 @@ set -v
/g/paypal/paypal_201?_??_complet.csv
set +v
# 2012
echo 2012
set -v
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
--first_in 1335 --usdeur 1.2952 --bnc --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132 2295 2296 2297 2298' \
/g/paypal/paypal_2012_??_complet.csv
set +v
echo 'sh paypal_build_invoices /g/var/paypal_invoices/2???'
# USD de 147 à 340

View file

@ -5,7 +5,7 @@
<title>imapsync download</title>
<meta name="generator" content="Bluefish 1.0.7"/>
<meta name="author" content="Gilles LAMIRAL"/>
<meta name="date" content="2012-08-29T12:17:00+0200"/>
<meta name="date" content="2013-04-18T15:52:05+0200"/>
<meta name="copyright" content=""/>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
@ -39,7 +39,7 @@ border:0px;
<p>The payment has been made and the transaction has been completed.<br/>
A receipt for your purchase has been emailed to you.<br/>
You may log into your account at <a href="http://www.paypal.com/">www.paypal.com</a>
to view details of this transaction.
to view details of this transaction (if you have a Paypal account).
</p>
<p>You will find the latest <b>imapsync.exe binary</b> release <!--#exec cmd="cat ../VERSION_EXE" --><br/>
@ -47,10 +47,12 @@ and the latest <b>imapsync source code</b> release <!--#exec cmd="cat ../VERSION
<a href="../dist/<!--#exec cmd="cat ../dist/path_last.txt" -->/"><b>download page</b></a>.
</p>
<p>You will receive an invoice soon.</p>
<p>You will receive an invoice soon, in a couple of weeks at worth.
Ask for it if you need it before.</p>
<p>Next imapsync releases will be available for one year without extra payment.<br/>
You will be soon subscribed to the newsletter announcing new releases (and only this).</p>
<p>Next imapsync releases will be available for lifetime without extra payment.<br/>
This current page will be updated to reflect the lastest release of imapsync.<br/>
You will be soon subscribed to the newsletter announcing new releases (and only new releases).</p>
<p>To explain your <b>specific needs</b>, find <b>best solutions</b> for them, <b>avoid loosing time</b>, <br/>
and then <b>succeed</b> your migration <b>quickly</b> you can buy
@ -81,7 +83,7 @@ gilles.lamiral@laposte.net</p>
<!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b><br/>
($Id: paypal_return.shtml,v 1.13 2012/08/29 10:26:23 gilles Exp gilles $)
($Id: paypal_return.shtml,v 1.14 2013/04/18 13:53:25 gilles Exp gilles $)
</p>
<!-- Google Code for Achat imapsync Conversion Page -->

View file

@ -1,5 +1,5 @@
REM $Id: test2.bat,v 1.14 2012/12/24 02:25:34 gilles Exp gilles $
REM $Id: test2.bat,v 1.15 2013/05/06 08:15:39 gilles Exp gilles $
REM
cd C:\msys\1.0\home\Admin\imapsync
@ -45,6 +45,8 @@ REM imapsync.exe --host1 imap.gmail.com --port1 993 --ssl1 --host2 imap.bigs.dk
REM @echo off
SET csvfile=file.txt
DATE /t
TIME /t
@ -53,7 +55,7 @@ FOR /f "tokens=1-2 delims=-/: " %%a IN ('TIME /t') DO (SET mytime=%%a_%%b)
ECHO %mydate%_%mytime%
if not exist LOG mkdir LOG
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) DO ECHO syncing to user %%I & imapsync ^
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (%csvfile%) DO ECHO syncing to user %%I & imapsync ^
--host1 imap.side1.org --user1 %%G --password1 %%H ^
--host2 imap.side2.org --user2 %%I --password2 %%J ^
> LOG\log_%%I_%mydate%_%mytime%.txt 2>&1

View file

@ -0,0 +1 @@
/home/gilles/migration.sh: 15: imapsync: not found

View file

@ -0,0 +1 @@
/home/gilles/migration.sh: 15: imapsync: not found

View file

@ -0,0 +1 @@
/home/gilles/migration.sh: 15: imapsync: not found

View file

@ -0,0 +1 @@
/home/gilles/migration.sh: 15: imapsync: not found

View file

@ -0,0 +1 @@
/home/gilles/migration.sh: 15: imapsync: not found

View file

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: archive_per_month,v 1.5 2012/08/12 16:41:22 gilles Exp gilles $
# $Id: archive_per_month,v 1.6 2013/04/18 15:08:18 gilles Exp gilles $
# Translate Jan to 01, Feb to 02 etc.
month_number() {
@ -50,12 +50,12 @@ archive_year_month() {
#
for year_archive in 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012; do
for year_archive in 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013; do
for month_archive in "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"; do
archive_year_month $year_archive $month_archive
done
done
# End of $Id: archive_per_month,v 1.5 2012/08/12 16:41:22 gilles Exp gilles $
# End of $Id: archive_per_month,v 1.6 2013/04/18 15:08:18 gilles Exp gilles $

View file

@ -0,0 +1,30 @@
REM $Id: install_modules.bat,v 1.2 2013/05/06 08:26:39 gilles Exp gilles $
REM hi
ECHO Installing Perl modules for imapsync
CD C:\msys\1.0\home\Admin\imapsync
perl -mMail::IMAPClient -e ""
IF ERRORLEVEL 0 GOTO install_01
perl -MCPAN -e "install Mail::IMAPClient"
:install_01
FOR %%M in ( Mail::IMAPClient ^
IO::Socket IO::Socket::SSL ^
Digest::MD5 Digest::HMAC_MD5 ^
Term::ReadKey File::Spec ^
Time::HiRes ^
Data::Uniqid URI::Escape ^
Authen::NTLM ^
Time::Local ^
PAR::Packer ) DO ECHO Testing %%M ^
& perl -m%%M -e "" || perl -MCPAN -e "install %%M"
ECHO Perl modules for imapsync installed
PAUSE

View file

@ -1,5 +1,5 @@
REM
REM $Id: sync_loop_windows.bat,v 1.4 2012/12/23 08:02:34 gilles Exp gilles $
REM $Id: sync_loop_windows.bat,v 1.5 2013/04/18 14:53:56 gilles Exp gilles $
REM
REM imapsync massive sync example batch for Windows users
REM lines beginning with REM are just comments
@ -9,10 +9,25 @@ REM in order to make it a batch command file that your system will recognize and
REM
REM Replace "imap.side1.org" and "imap.side2.org" with your own values
REM
REM ==== Log file ====
REM This loop will also create a log file called log_%%I.txt for each account transfer
REM where %%I is just a variable containing the user2 account name.
REM and %mydate%_%mytime% is date and time formatted for a filename.
REM Since "date /t" is localy dependent you may have to adapt mydate=%%c_%%a_%%b_%%d
REM Since "date /t" is localy dependent you may have to adapt the
REM order of %%x variables (a b c d) in mydate=%%c_%%a_%%b_%%d
REM It is not important, just sugar to a useful listing of LOG directory
REM ==== Parallel executions ====
REM If you want to do parallel runs of imapsync then this current script is a good start.
REM Just copy it several times and replace, on each copy, the csvfile variable value.
REM Instead of SET csvfile=file.txt write for example
REM SET csvfile=file01.txt in the first copy
REM then also
REM SET csvfile=file02.txt in the second copy etc.
REM Of course you also have to split the data contained in file.txt
REM into file01.txt file02.txt etc.
REM After that, just double-clic on each batch file to launch each process
REM @echo off
@ -24,8 +39,10 @@ FOR /f "tokens=1-4 delims=-/: " %%a IN ('DATE /t') DO (SET mydate=%%c_%%a_%%b_%%
FOR /f "tokens=1-2 delims=-/: " %%a IN ('TIME /t') DO (SET mytime=%%a_%%b)
ECHO %mydate%_%mytime%
SET csvfile=file.txt
if not exist LOG mkdir LOG
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) DO ECHO syncing to user %%I & imapsync ^
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (%csvfile%) DO ECHO syncing to user %%I & imapsync ^
--host1 imap.side1.org --user1 %%G --password1 %%H ^
--host2 imap.side2.org --user2 %%I --password2 %%J ^
> LOG\log_%%I_%mydate%_%mytime%.txt 2>&1

1245
imapsync

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
<title>Imapsync: an IMAP migration and backup tool ( release <!--#exec cmd="cat ./VERSION"--> )</title>
<meta name="generator" content="Bluefish 1.0.7"/>
<meta name="author" content="Gilles LAMIRAL"/>
<meta name="date" content="2013-04-17T19:19:25+0200"/>
<meta name="date" content="2013-05-14T09:46:04+0200"/>
<meta name="copyright" content="None"/>
<meta name="keywords" content="imap, transfert, migration"/>
<meta name="description" content="imap migration tool"/>
@ -128,9 +128,20 @@ total is 93 millions for 2011, 91 millions for 2012.</li>
<li><b>Bug fix</b>: </li>
<li><b>Bug fix</b>: </li>
<li><b>Bug fix</b>: </li>
<li><b>Refactoring</b>: </li>
<li><b>Refactoring</b>: </li>
<li><b>Refactoring</b>: </li>
<li><b>Refactoring</b>: </li>
</ul>
-->
<ul>
<li><b>1.542</b></li>
<li><b>Enhancement</b>: Added XOAUTH authentication. Thanks to Eduardo Bortoluzzi Junior.</li>
<li><b>Refactoring</b>: Removed old 2.2.9 Mail::IMAPClient patch stuff.</li>
<li><b>Refactoring</b>: Started perlcritic corrections. Left 4 eval at level 5.</li>
</ul>
<ul>
<li><b>1.536</b></li>
<li><b>Enhancement</b>: Added <b>--search1</b> and <b>--search2</b> to allow different searches on each host.</li>
@ -629,7 +640,8 @@ I like it.
<li>Mail2World IMAP4 Server 2.5 [host1] (<a href="http://www.mail2world.com/">http://www.mail2world.com/</a>)</li>
<li><b>MailEnable</b> 4.23 [host1][host2], 4.26 [host1][host2], 5 [host1]
(<a href="http://www.mailenable.com/">http://www.mailenable.com/</a>) </li>
<li>MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), 12 [host2], 12.0.3 [host1], 12.5.5 [host1]
<li>MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), 9.6.5 [host1],
12 [host2], 12.0.3 [host1], 12.5.5 [host1]
(<a href="http://www.altn.com/">http://www.altn.com/</a>) </li>
<li>Mercury 4.1 (Windows server 2000 platform) (<a href="http://www.pmail.com/">http://www.pmail.com/</a>) </li>
<li><b>Microsoft Exchange Server</b> 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
@ -655,10 +667,10 @@ I like it.
<li>Softalk Workgroup Mail 7.6.4 [host1] (<a href="http://www.softalkltd.com/products/download_wm_v7.asp">http://www.softalkltd.com/products/download_wm_v7.asp</a>).</li>
<li>SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System) (<a href="http://www.oracle.com/">http://www.oracle.com/</a>) </li>
<li>Sun Java(tm) System Messaging Server 6.2-2.05, 6.2-7.05, 6.3 (<a href="http://www.oracle.com/">http://www.oracle.com/</a>) </li>
<li>Surgemail 3.6f5-5 (<a href="http://netwinsite.com/surgemail/">http://netwinsite.com/surgemail/</a>) </li>
<li>Surgemail 3.6f5-5, 6.3d-72 [host2] (<a href="http://netwinsite.com/surgemail/">http://netwinsite.com/surgemail/</a>) </li>
<li>UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(<a href="http://www.washington.edu/imap/">http://www.washington.edu/imap/</a>) </li>
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(<a href="http://www.washington.edu/imap/">http://www.washington.edu/imap/</a>) </li>
<li>VMS, Imap part of TCP/IP suite of VMS 7.3.2 (<a href="http://h71000.www7.hp.com/openvms/">http://h71000.www7.hp.com/openvms/</a>) </li>
<li><b>Yahoo</b> [host1] (<a href="http://www.yahoo.com/">http://www.yahoo.com/</a>) </li>
<li>Zarafa 6,40,0,20653 [host1] (<a href="http://www.zarafa.com/">http://www.zarafa.com/</a>)</li>
@ -731,7 +743,7 @@ alt="Viewable With Any Browser" />
<!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: index.shtml,v 1.160 2013/04/17 17:20:01 gilles Exp gilles $)
($Id: index.shtml,v 1.162 2013/05/14 07:46:14 gilles Exp gilles $)
</p>
</body>

20
perlcritic.out Normal file
View file

@ -0,0 +1,20 @@
Expression form of "eval" at line 705, column 2. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 1781, column 7. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 1783, column 9. See page 161 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 1875, column 3. See page 199 of PBP. (Severity: 5)
Subroutine prototypes used at line 2112, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 2122, column 1. See page 194 of PBP. (Severity: 5)
Bareword file handle opened at line 2234, column 2. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 2234, column 2. See page 207 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 2236, column 3. See page 199 of PBP. (Severity: 5)
Expression form of "eval" at line 2619, column 3. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 2813, column 3. See page 161 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 2965, column 17. See page 199 of PBP. (Severity: 5)
Expression form of "eval" at line 3788, column 3. See page 161 of PBP. (Severity: 5)
Bareword file handle opened at line 4144, column 9. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 4144, column 9. See page 207 of PBP. (Severity: 5)
Bareword file handle opened at line 4155, column 2. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 4155, column 2. See page 207 of PBP. (Severity: 5)
Stricture disabled at line 4265, column 4. See page 429 of PBP. (Severity: 5)
Expression form of "eval" at line 4828, column 43. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 4832, column 45. See page 161 of PBP. (Severity: 5)

View file

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: tests.sh,v 1.214 2013/04/17 12:49:41 gilles Exp gilles $
# $Id: tests.sh,v 1.218 2013/05/06 08:36:38 gilles Exp gilles $
# Example 1:
# CMD_PERL='perl -I./Mail-IMAPClient-3.32/lib' sh -x tests.sh
@ -55,7 +55,6 @@ run_test() {
run_tests() {
for t in "$@"; do
test X"$t" = X2 && CMD_PERL=$CMD_PERL_2xx && continue
test X"$t" = X3 && CMD_PERL=$CMD_PERL_3xx && continue
test_count=`expr 1 + $test_count`
run_test "$t"
@ -155,7 +154,7 @@ first_sync_dry() {
--passfile1 ../../var/pass/secret.toto \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--noauthmd5 --dry
--dry
}
first_sync() {
@ -163,8 +162,7 @@ first_sync() {
--host1 $HOST1 --user1 toto \
--passfile1 ../../var/pass/secret.toto \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--noauthmd5
--passfile2 ../../var/pass/secret.titi
}
@ -606,25 +604,14 @@ ll_prefix12() {
ll_nosyncinternaldates() {
can_send && sendtestmessage toto
$CMD_PERL_2xx ./imapsync \
--host1 $HOST1 --user1 toto \
--passfile1 ../../var/pass/secret.toto \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX --noauthmd5 \
--nosyncinternaldates --delete2 --expunge2
#--debugimap2
can_send && sendtestmessage toto
$CMD_PERL_3xx ./imapsync \
--host1 $HOST1 --user1 toto \
--passfile1 ../../var/pass/secret.toto \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX --noauthmd5 \
--folder INBOX \
--nosyncinternaldates --delete2 --expunge2
#--debugimap2
}
# bug:
# $d=""; # no bug with $d=undef
@ -1187,7 +1174,7 @@ ll_regextrans2()
--justfolders \
--nofoldersizes \
--regextrans2 's/yop/yoX/' \
--folder 'INBOX.yop.yap'
--folder 'INBOX.yop.yap' --debug
}
ll_regextrans2_downcase()
@ -1637,9 +1624,7 @@ ll_tls_justlogin() {
ll_tls_devel() {
CMD_PERL=$CMD_PERL_2xx ll_justlogin ll_ssl_justlogin \
&& CMD_PERL=$CMD_PERL_3xx ll_justlogin ll_ssl_justlogin \
&& CMD_PERL=$CMD_PERL_2xx ll_tls_justconnect ll_tls_justlogin \
CMD_PERL=$CMD_PERL_3xx ll_justlogin ll_ssl_justlogin \
&& CMD_PERL=$CMD_PERL_3xx ll_tls_justconnect ll_tls_justlogin
}
@ -1705,9 +1690,21 @@ ll_authmech_PLAIN() {
--passfile2 ../../var/pass/secret.titi \
--justfoldersizes --nofoldersizes \
--authmech1 PLAIN --authmech2 PLAIN
}
ll_authmech_XOAUTH_gmail() {
! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \
--host1 imap.gmail.com --ssl1 --user1 imapsync@lab3.dedalusprime.com.br \
--passfile1 ../../var/pass/secret.xoauth \
--host2 imap.gmail.com --ssl2 --user2 imapsync@lab3.dedalusprime.com.br \
--passfile2 ../../var/pass/secret.xoauth \
--justfoldersizes --nofoldersizes \
--authmech1 XOAUTH --authmech2 XOAUTH
}
ll_authmech_NTLM() {
$CMD_PERL -I./W/NTLM-1.09/blib/lib ./imapsync \
--host1 mail.freshgrillfoods.com --user1 ktraster \
@ -2325,7 +2322,7 @@ allow3xx() {
}
noallow3xx() {
! $CMD_PERL_3xx ./imapsync \
$CMD_PERL_3xx ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
@ -2356,7 +2353,7 @@ dkimap_1() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX/dkimap --regextrans2 's/INBOX.INBOX./INBOX./' \
--noauthmd5 --foldersize --nouid1
--foldersize --nouid1
}
ll_justlogin() {
@ -2365,7 +2362,7 @@ ll_justlogin() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justlogin --noauthmd5
--justlogin
}
ll_justlogin_backslash_char() {
@ -2376,7 +2373,7 @@ ll_justlogin_backslash_char() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 tptp@est.belle \
--passfile2 ../../var/pass/secret.tptp \
--justlogin --noauthmd5
--justlogin
}
ll_justlogin_dollar_char() {
@ -3109,7 +3106,6 @@ dprof_justfoldersizes()
--passfile1 ../../var/pass/secret.gilles_mbox \
--host2 $HOST2 --user2 tete@est.belle \
--passfile2 ../../var/pass/secret.tete \
--noauthmd5 \
--justfoldersizes --folder INBOX.Junk || \
true
}
@ -3129,7 +3125,6 @@ dprof_bigfolder()
--passfile1 ../../var/pass/secret.gilles_mbox \
--host2 $HOST2 --user2 tete@est.belle \
--passfile2 ../../var/pass/secret.tete \
--noauthmd5 \
--nofoldersizes --folder INBOX.15_imapsync.imapsync-list || \
true
}
@ -3236,6 +3231,7 @@ ll_tls_justconnect
ll_tls_justlogin
ll_tls
ll_authmech_PLAIN
ll_authmech_XOAUTH_gmail
ll_authmech_LOGIN
ll_authmech_CRAMMD5
ll_authuser