mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-11 07:04:36 +02:00
1.637
This commit is contained in:
parent
4a536871fe
commit
e2bfc931f4
206 changed files with 7348 additions and 7982 deletions
145
ChangeLog
145
ChangeLog
|
@ -1,17 +1,154 @@
|
||||||
|
|
||||||
RCS file: RCS/imapsync,v
|
RCS file: RCS/imapsync,v
|
||||||
Working file: imapsync
|
Working file: imapsync
|
||||||
head: 1.607
|
head: 1.637
|
||||||
branch:
|
branch:
|
||||||
locks: strict
|
locks: strict
|
||||||
gilles: 1.607
|
gilles: 1.637
|
||||||
access list:
|
access list:
|
||||||
symbolic names:
|
symbolic names:
|
||||||
keyword substitution: kv
|
keyword substitution: kv
|
||||||
total revisions: 607; selected revisions: 607
|
total revisions: 637; selected revisions: 637
|
||||||
description:
|
description:
|
||||||
----------------------------
|
----------------------------
|
||||||
revision 1.607 locked by: gilles;
|
revision 1.637 locked by: gilles;
|
||||||
|
date: 2015/04/01 01:36:37; author: gilles; state: Exp; lines: +9 -9
|
||||||
|
Bugfix. Win32 regression with long_path_2_prefix test. Was too long.
|
||||||
|
----------------------------
|
||||||
|
revision 1.636
|
||||||
|
date: 2015/03/31 14:54:41; author: gilles; state: Exp; lines: +107 -65
|
||||||
|
Added errors dump. By default. Use --noerrorsdump to avoid it.
|
||||||
|
Added --errorsmax switch. Default is like --errorsmax 50. Exit after 50 errors encountered.
|
||||||
|
----------------------------
|
||||||
|
revision 1.635
|
||||||
|
date: 2015/03/30 07:36:08; author: gilles; state: Exp; lines: +19 -15
|
||||||
|
Changed basic example to a working one with test1.lamiral.info
|
||||||
|
----------------------------
|
||||||
|
revision 1.634
|
||||||
|
date: 2015/03/25 02:10:56; author: gilles; state: Exp; lines: +10 -7
|
||||||
|
Bugfix. Remove tmp files upon failure as well.
|
||||||
|
----------------------------
|
||||||
|
revision 1.633
|
||||||
|
date: 2015/03/25 01:14:36; author: gilles; state: Exp; lines: +96 -73
|
||||||
|
IO::Socket::SSL not mandatory. (Sometimes hard to install).
|
||||||
|
Bugfix. SKIP sections for Unix or Windows tests. Removed no_plan. 561 non-regression tests.
|
||||||
|
----------------------------
|
||||||
|
revision 1.632
|
||||||
|
date: 2015/03/23 23:29:16; author: gilles; state: Exp; lines: +16 -6
|
||||||
|
Added tests_live_result() call at the end of --livetests
|
||||||
|
----------------------------
|
||||||
|
revision 1.631
|
||||||
|
date: 2015/03/23 00:04:04; author: gilles; state: Exp; lines: +52 -41
|
||||||
|
README part review.
|
||||||
|
----------------------------
|
||||||
|
revision 1.630
|
||||||
|
date: 2015/03/20 03:07:59; author: gilles; state: Exp; lines: +93 -52
|
||||||
|
Bugfix. Made --tests succeed on Windows. At least at home.
|
||||||
|
----------------------------
|
||||||
|
revision 1.629
|
||||||
|
date: 2015/03/19 03:43:24; author: gilles; state: Exp; lines: +10 -16
|
||||||
|
Usability. Better output of folders excluded by --exclude and folders included by --include
|
||||||
|
----------------------------
|
||||||
|
revision 1.628
|
||||||
|
date: 2015/03/19 03:03:28; author: gilles; state: Exp; lines: +80 -38
|
||||||
|
Bugfix. tests_imapsync_basename only check substring imapsync in the command name used.
|
||||||
|
Feature. Added --maxlinelengthcmd that will be called upon when a line over --maxlinelength is detected. --maxlinelengthcmd 'reformime -r7' on Linux.
|
||||||
|
----------------------------
|
||||||
|
revision 1.627
|
||||||
|
date: 2015/03/16 15:55:57; author: gilles; state: Exp; lines: +34 -21
|
||||||
|
Added --testslive
|
||||||
|
----------------------------
|
||||||
|
revision 1.626
|
||||||
|
date: 2015/03/15 02:52:43; author: gilles; state: Exp; lines: +20 -20
|
||||||
|
Update tests_skipmess()
|
||||||
|
----------------------------
|
||||||
|
revision 1.625
|
||||||
|
date: 2015/03/14 00:32:41; author: gilles; state: Exp; lines: +31 -15
|
||||||
|
Bugfix. New disarmreadreceipts was buggy in IMAP. Fixed. \r in the beginning.
|
||||||
|
----------------------------
|
||||||
|
revision 1.624
|
||||||
|
date: 2015/03/13 02:05:12; author: gilles; state: Exp; lines: +41 -18
|
||||||
|
Searching for "deep recursion" with skipmess on "Partial" messages. Not found.
|
||||||
|
----------------------------
|
||||||
|
revision 1.623
|
||||||
|
date: 2015/03/12 16:33:59; author: gilles; state: Exp; lines: +21 -6
|
||||||
|
Made check folders exist on host1 independent of checkselectable.
|
||||||
|
----------------------------
|
||||||
|
revision 1.622
|
||||||
|
date: 2015/03/12 16:28:38; author: gilles; state: Exp; lines: +24 -11
|
||||||
|
Bugfix. --folderfirst and --folderlast generated an error when their value folder does not exist. Existence is checked.
|
||||||
|
----------------------------
|
||||||
|
revision 1.621
|
||||||
|
date: 2015/03/12 10:40:11; author: gilles; state: Exp; lines: +86 -21
|
||||||
|
Bugfix --disarmreadreceipts last fix was a bad one. In IMAP \n is \r\n.
|
||||||
|
Added error handling for --pipemess
|
||||||
|
Adapted tests for "Content-Type: Message/Partial" --slipmess
|
||||||
|
----------------------------
|
||||||
|
revision 1.620
|
||||||
|
date: 2015/03/10 04:07:33; author: gilles; state: Exp; lines: +141 -10
|
||||||
|
Bugfix. --disarmreadreceipts used to change Disposition-Notification-To in the body when not available in the header. Now never changed in the body in all cases.
|
||||||
|
----------------------------
|
||||||
|
revision 1.619
|
||||||
|
date: 2015/03/10 03:13:30; author: gilles; state: Exp; lines: +301 -22
|
||||||
|
Use \x00 as a separator to detect --delete 2, instead of ¤.
|
||||||
|
Added tests for --skipmess, especially for header "Content-Type: Message/Partial"
|
||||||
|
Bug detected --disarmreadreceipts isn't correct. Added tests and fix in tests.
|
||||||
|
Added tests in tests_regexmess(). Disposition-Notification-To: better handled.
|
||||||
|
----------------------------
|
||||||
|
revision 1.618
|
||||||
|
date: 2015/03/07 04:38:59; author: gilles; state: Exp; lines: +261 -205
|
||||||
|
Added --pipemess in order to pass all message to an external filter tool like "reformime -r7".
|
||||||
|
----------------------------
|
||||||
|
revision 1.617
|
||||||
|
date: 2015/03/04 01:09:50; author: gilles; state: Exp; lines: +18 -19
|
||||||
|
Link to http://www.imap.org/ changed to archive.org.
|
||||||
|
----------------------------
|
||||||
|
revision 1.616
|
||||||
|
date: 2015/03/02 23:14:42; author: gilles; state: Exp; lines: +86 -10
|
||||||
|
Added xoauth2 support. Thanks to Joaquin Lopez.
|
||||||
|
----------------------------
|
||||||
|
revision 1.615
|
||||||
|
date: 2015/03/01 23:26:10; author: gilles; state: Exp; lines: +76 -46
|
||||||
|
Fixed tests with "header_line_normalize: remove last blanks".
|
||||||
|
Remove the last blanks ( Gmail bug ) to identify message with headers.
|
||||||
|
Term::ReadKey and IO::Socket::SSL now in use statements instead of require (so they became mandatory).
|
||||||
|
Change list of use pragmas order to facilitate reading.
|
||||||
|
----------------------------
|
||||||
|
revision 1.614
|
||||||
|
date: 2015/02/22 22:43:16; author: gilles; state: Exp; lines: +90 -46
|
||||||
|
Added inline help.
|
||||||
|
About --nofoldersizes, foldernames listings, --passfile1 --passfile2.
|
||||||
|
Change usage order.
|
||||||
|
----------------------------
|
||||||
|
revision 1.613
|
||||||
|
date: 2015/02/22 01:08:51; author: gilles; state: Exp; lines: +23 -10
|
||||||
|
Fixed issue with 1282658400 and logfile() by and system upgrade. Looks like Ubuntu 10.4 was buggy.
|
||||||
|
----------------------------
|
||||||
|
revision 1.612
|
||||||
|
date: 2015/02/03 23:20:51; author: gilles; state: Exp; lines: +17 -13
|
||||||
|
Fixed tests_logfile() when TZ is not mine.
|
||||||
|
Works for epoch 0 but found a difference for 1282658400
|
||||||
|
----------------------------
|
||||||
|
revision 1.611
|
||||||
|
date: 2015/02/02 16:14:43; author: gilles; state: Exp; lines: +18 -18
|
||||||
|
Started inline help; talk about options everywhere it means and help to lean imapsync.
|
||||||
|
Change default useheader. Now it is really like --useheader "Message-Id" --useheader "Received"
|
||||||
|
HMailServer replies two lines with --useheader "Message-Id" --useheader "Message-ID" in older releases.
|
||||||
|
----------------------------
|
||||||
|
revision 1.610
|
||||||
|
date: 2015/01/20 12:07:30; author: gilles; state: Exp; lines: +21 -15
|
||||||
|
Bugfix in imap_utf7_decode() + must not be escaped.
|
||||||
|
----------------------------
|
||||||
|
revision 1.609
|
||||||
|
date: 2014/11/28 17:06:53; author: gilles; state: Exp; lines: +14 -8
|
||||||
|
Bugfix. --skipmess was not skipping.
|
||||||
|
----------------------------
|
||||||
|
revision 1.608
|
||||||
|
date: 2014/11/28 16:47:29; author: gilles; state: Exp; lines: +95 -12
|
||||||
|
Added --skipmess to skip messages matching a regex.
|
||||||
|
Example --skipmess 'm/[\x80-ff]/'
|
||||||
|
----------------------------
|
||||||
|
revision 1.607
|
||||||
date: 2014/11/14 16:25:06; author: gilles; state: Exp; lines: +46 -40
|
date: 2014/11/14 16:25:06; author: gilles; state: Exp; lines: +46 -40
|
||||||
Added several checks if IsUnconnected. Goal avoid imap commands while disconnected.
|
Added several checks if IsUnconnected. Goal avoid imap commands while disconnected.
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
781
FAQ
781
FAQ
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/cat
|
#!/bin/cat
|
||||||
# $Id: FAQ,v 1.190 2014/11/14 17:08:02 gilles Exp gilles $
|
# $Id: FAQ,v 1.205 2015/03/26 08:13:29 gilles Exp gilles $
|
||||||
|
|
||||||
+------------------+
|
+------------------+
|
||||||
| FAQ for imapsync |
|
| FAQ for imapsync |
|
||||||
|
@ -78,13 +78,13 @@ R. Read the README and FAQ files in the tarball also available at
|
||||||
Q. Can you give some configuration examples?
|
Q. Can you give some configuration examples?
|
||||||
|
|
||||||
R. The FAQ file contains many examples for several scenarios
|
R. The FAQ file contains many examples for several scenarios
|
||||||
http://www.linux-france.org/prj/imapsync/FAQ
|
http://imapsync.lamiral.info/FAQ
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. How can I have commercial support?
|
Q. How can I have commercial support?
|
||||||
|
|
||||||
R. Buy support from imapsync author and expert: Gilles LAMIRAL
|
R. Buy support from imapsync author and expert: Gilles LAMIRAL
|
||||||
http://imapsync.lamiral.info/#buy_support
|
http://imapsync.lamiral.info/#buy_all
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. How can I have gratis support?
|
Q. How can I have gratis support?
|
||||||
|
@ -140,37 +140,6 @@ c) Etc. Search the web. There's also specific tools and paid services.
|
||||||
There's no silver bullet to migrate Calendars and Contacts,
|
There's no silver bullet to migrate Calendars and Contacts,
|
||||||
if you find one, tell me!
|
if you find one, tell me!
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. I need to migrate hundred accounts, how can I do?
|
|
||||||
|
|
||||||
R. If you have many mailboxes to migrate think about a little
|
|
||||||
shell program. Write a file called file.txt (for example)
|
|
||||||
containing users and passwords.
|
|
||||||
The separator used in this example is ";"
|
|
||||||
|
|
||||||
The file.txt file contains:
|
|
||||||
|
|
||||||
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
|
|
||||||
...
|
|
||||||
|
|
||||||
On Unix the shell program can be:
|
|
||||||
|
|
||||||
{ 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.txt
|
|
||||||
|
|
||||||
On Windows the batch program can be:
|
|
||||||
|
|
||||||
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) 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?
|
Q. Where I can find old imapsync releases?
|
||||||
|
@ -227,30 +196,35 @@ R. By using --useuid imapsync avoid getting messages headers and build
|
||||||
|
|
||||||
imapsync ... --useuid
|
imapsync ... --useuid
|
||||||
|
|
||||||
|
On Unix:
|
||||||
|
|
||||||
|
imapsync ... --useuid --tmpdir /var/tmp/
|
||||||
|
|
||||||
R. Add also --nofoldersizes since the default behavior is to compute
|
R. Add also --nofoldersizes since the default behavior is to compute
|
||||||
folder sizes. Folder sizes are useless for the transfer, just
|
folder sizes. Folder sizes are useless for the transfer, just
|
||||||
useful to see what has to be done on each folder and guess when
|
useful to see what has to be done on each folder and guess when
|
||||||
the transfer will end (ETA).
|
the transfer will end (ETA).
|
||||||
|
|
||||||
|
R. Add also --noexpungeaftereach if you use --delete.
|
||||||
|
But be warn that an interrupted transfer can loose messages
|
||||||
|
on host2 in a second run if you use a (silly) combination like
|
||||||
|
|
||||||
|
imapsync ... --delete --noexpunge --noexpungeaftereach --expunge2
|
||||||
|
|
||||||
R. Add also --nocheckmessageexists
|
R. Add also --nocheckmessageexists
|
||||||
|
--nocheckmessageexists is on by default since release 1.520.
|
||||||
Since transfer can be long on a huge mailbox imapsync checks
|
Since transfer can be long on a huge mailbox imapsync checks
|
||||||
a message exist before copying it, but it takes time and
|
a message exist before copying it, but it takes time and
|
||||||
cpu on the host1 server.
|
cpu on the host1 server.
|
||||||
--nocheckmessageexists is on by default since release 1.520
|
|
||||||
|
|
||||||
R. Add also --noexpungeaftereach if you use --delete but be warn
|
|
||||||
that an interrupted transfer can loose messages on host2 in a
|
|
||||||
second run if you use a combination like
|
|
||||||
|
|
||||||
imapsync ... --delete --noexpunge --noexpungeaftereach --expunge2
|
|
||||||
|
|
||||||
Notes about --useuid
|
Notes about --useuid
|
||||||
|
|
||||||
Case where building the cache first is necessary (to avoid multiples transfers)
|
Case where building the cache first is necessary (to avoid multiples transfers)
|
||||||
|
|
||||||
If you run again imapsync with --useuid on a transfer already done without --useuid
|
If you run again imapsync with --useuid on a transfer already done without
|
||||||
then, to avoid messages be copied again, first run imapsync with --usecache
|
--useuid then, to avoid messages be copied again, first run imapsync
|
||||||
but without --useuid, example scenario:
|
with --usecache but without --useuid, example scenario:
|
||||||
|
|
||||||
A] Running with the default options, I began without --useuid
|
A] Running with the default options, I began without --useuid
|
||||||
|
|
||||||
|
@ -275,17 +249,18 @@ B] I began with --useuid from the first time
|
||||||
imapsync ... --useuid
|
imapsync ... --useuid
|
||||||
|
|
||||||
|
|
||||||
Inodes number issue
|
Inodes number issue.
|
||||||
|
|
||||||
|
|
||||||
The cache is simple, it uses the file-system natively,
|
The cache is simple, it uses the file-system natively,
|
||||||
it's just an empty file per message transfered.
|
it's just an empty file per message transfered.
|
||||||
When mailboxes are huge the cache can exhaust the number of inodes
|
When mailboxes are huge the cache can exhaust the number of inodes
|
||||||
allowed in the filesystem, that's a limitation like size but less
|
allowed in the filesystem, that's a limitation like limitation
|
||||||
often encountered.
|
size but it's less often encountered.
|
||||||
|
|
||||||
On Unix, to predict whether your tmpdir filesystem used by imapsync
|
On Unix, to predict whether your tmpdir filesystem used by imapsync
|
||||||
will support the whole cache, just run the command "df -i /var/tmp",
|
will support the whole cache, just run the command "df -i /var/tmp",
|
||||||
if /var/tmp is the --tmpdir argument.
|
if /var/tmp is the --tmpdir argument.
|
||||||
|
|
||||||
On windows, search and drop me a note about how to count the number
|
On windows, search and drop me a note about how to count the number
|
||||||
of files allowed in the filesystem.
|
of files allowed in the filesystem.
|
||||||
It seems FAT32 supports 268 435 445 clusters.
|
It seems FAT32 supports 268 435 445 clusters.
|
||||||
|
@ -426,7 +401,7 @@ So have a try with imapsync on the same host1.
|
||||||
Q. Folders are not created on host2. What happens?
|
Q. Folders are not created on host2. What happens?
|
||||||
|
|
||||||
R. Do you use IMAP or POP3 with your client software?
|
R. Do you use IMAP or POP3 with your client software?
|
||||||
It looks like you use POP3 instead of IMAP, POP3 has only INBOX.
|
It looks like you use POP3 instead of IMAP, POP3 sees only INBOX.
|
||||||
|
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
|
@ -445,47 +420,65 @@ A better tool with this scenario is offlineimap,
|
||||||
designed for this issue, and faster than imapsync.
|
designed for this issue, and faster than imapsync.
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. We have found that the sent time and date have been changed to the
|
Q. We have found that the time and date displayed have been changed to
|
||||||
time at which the file was synchronized.
|
the time at which the file was synchronized.
|
||||||
|
|
||||||
R. This is the case with:
|
R. This is the case by default with some email readers like:
|
||||||
- Eudora
|
|
||||||
- Outlook 2003
|
- Outlook 2003
|
||||||
but not with
|
- Ipad
|
||||||
|
|
||||||
|
but not with:
|
||||||
|
|
||||||
- Mutt
|
- Mutt
|
||||||
- Thunderbird
|
- Thunderbird
|
||||||
and no longer with
|
|
||||||
- Zimbra
|
- Zimbra
|
||||||
- Gmail
|
- Gmail
|
||||||
|
|
||||||
|
|
||||||
Eurora shows by default the time the imap server received the email. I
|
A thing to keep in mind, imapsync does not touch any byte of messages
|
||||||
think it is quite a wrong behavior since the messages can have
|
unless told to do so by option --regexmess.
|
||||||
traveled some time before the reception.
|
Messages on both parts should be identical.
|
||||||
|
|
||||||
|
I explain the whole picture about dates of messages.
|
||||||
|
|
||||||
|
There are several different dates for any message.
|
||||||
|
First, there is the "Date:" header. Most of the time, this date is set
|
||||||
|
by the MUA. MUA means Mail User Agent; it is Outlook, Mutt
|
||||||
|
or Thunderbird. The Date header is usually the date the message was written
|
||||||
|
or sent the first time. It is never changed by any transfer or copy.
|
||||||
|
If an email reader uses the Date header for displaying the date of a
|
||||||
|
message then no problem should arise.
|
||||||
|
|
||||||
|
There is also the internal date. In IMAP the internal date is handled
|
||||||
|
and normally it corresponds to the arrival date in the mailbox. The
|
||||||
|
IMAP protocol allows the internal date to be set by a email client.
|
||||||
|
Imapsync synchronizes internal dates by default, internal dates on host2
|
||||||
|
should then be the same as the internal dates on host1.
|
||||||
|
If an email reader uses the internal date for displaying the date of a
|
||||||
|
message then the sync date problem only occurs when the host2 server software
|
||||||
|
ignores the internal date given by imapsync during the APPEND imap
|
||||||
|
command. It happens with some imap servers.
|
||||||
|
|
||||||
|
There are also the Received header lines. Each time a message travels
|
||||||
|
a SMTP server, this one adds a Received header line. Sometimes
|
||||||
|
some email clients use the last "Received" header date as the date of the
|
||||||
|
message. And some IMAP servers softwares add a Received line after
|
||||||
|
and imap transfer. If those both conditions are met then the date
|
||||||
|
displayed become the transfer date even if imapsync
|
||||||
|
has done its best to keep all the dates synchronized. Bad luck.
|
||||||
|
|
||||||
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 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:
|
Solutions:
|
||||||
a) Use the --syncinternaldates option and keep using Eudora.
|
a) Use a better email client or configure it in order it sorts messages
|
||||||
But --syncinternaldates is now turn on by default so if you
|
by sent date, the Date header.
|
||||||
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
|
b) Use a imap server that respects the imap RFC and accepts
|
||||||
"Date:" headers. It won't work if a) doesn't work.
|
the internal date set by imapsync.
|
||||||
|
|
||||||
c) In Maildir boxes, after the sync (too late...), use the script
|
c) Try to understand why the reader shows another date.
|
||||||
learn/adjust_time.pl to change the internal dates from the "Date:" header.
|
For Exchange look at the next FAQ item.
|
||||||
(this a Unix fix using touch command)
|
|
||||||
|
|
||||||
d) Use a better email client or configure it in order it sorts messages
|
|
||||||
by sent date.
|
|
||||||
|
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
|
@ -580,36 +573,6 @@ The file imapsync.pid contains the PID of the imapsync process.
|
||||||
This file is removed at the end of a normal run.
|
This file is removed at the end of a normal run.
|
||||||
You can safely ignore the warning if you don't use imapsync.pid file.
|
You can safely ignore the warning if you don't use imapsync.pid file.
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. Couldn't create folder [trash] from [INBOX.trash]:
|
|
||||||
588 NO Mailbox already exists.
|
|
||||||
|
|
||||||
R. Some servers take care about character case in folder names,
|
|
||||||
some servers do not, like Exchange. Since non-respecting case
|
|
||||||
can merge two different folders into one then imapsync respects case.
|
|
||||||
|
|
||||||
For example, if a host1 server has a folder name called "trash"
|
|
||||||
and the host2 server already has a folder "Trash" or "TRASH"
|
|
||||||
then imapsync will try to create the folder "trash" on host2,
|
|
||||||
because trash and Trash are different strings. But if host2
|
|
||||||
does not respect character case it will consider folder "trash"
|
|
||||||
already exists and will say it, that's the error message
|
|
||||||
reported by imapsync: "Mailbox already exists", message coming
|
|
||||||
from the server.
|
|
||||||
|
|
||||||
The folder creation fails but messages are well transfered in
|
|
||||||
so take a look at this warning, understand why it happens
|
|
||||||
and it should be fine most of the time.
|
|
||||||
|
|
||||||
To avoid this warning use --regextrans2 to map the folder names
|
|
||||||
|
|
||||||
imapsync ... --regextrans2 "s/^trash$/Trash/"
|
|
||||||
|
|
||||||
If there are two folders Trash and trash on host1 then both
|
|
||||||
will be merge into only one Trash folder on host2.
|
|
||||||
In case option --delete2 is used the regextans2 above becomes
|
|
||||||
mandatory, otherwise imapsync will sync messages from the
|
|
||||||
first Trash and then delete them when syncing trash.
|
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. Couldn't create [INBOX.Ops/foo/bar]: NO Invalid mailbox name:
|
Q. Couldn't create [INBOX.Ops/foo/bar]: NO Invalid mailbox name:
|
||||||
|
@ -669,7 +632,7 @@ to all folders on host2.
|
||||||
Q. Is there a way we can specify a date range to sync emails?
|
Q. Is there a way we can specify a date range to sync emails?
|
||||||
If yes, can you please share an example?
|
If yes, can you please share an example?
|
||||||
|
|
||||||
Yes, with the --search option.
|
R. Yes, with the --search option.
|
||||||
|
|
||||||
imapsync ... --search "SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010"
|
imapsync ... --search "SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010"
|
||||||
|
|
||||||
|
@ -686,6 +649,40 @@ Yes, with the --search option.
|
||||||
Nov
|
Nov
|
||||||
Dec
|
Dec
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Is there a way we can specify an age to sync emails?
|
||||||
|
If yes, can you please share some examples?
|
||||||
|
|
||||||
|
R. Yes, with the --maxage or the --minage option.
|
||||||
|
|
||||||
|
E.1 Sync only messages less than 2 days old:
|
||||||
|
|
||||||
|
imapsync ... --maxage 2
|
||||||
|
|
||||||
|
E.2 Sync only messages more than 2 days old:
|
||||||
|
|
||||||
|
imapsync ... --minage 2
|
||||||
|
|
||||||
|
E.3 Sync only messages more than 30 days old and less than 365 days old:
|
||||||
|
|
||||||
|
imapsync ... --minage 30 --maxage 365
|
||||||
|
|
||||||
|
E.4 Sync only messages less than 30 days old or more than 365 days old:
|
||||||
|
|
||||||
|
imapsync ... --maxage 30 --minage 365
|
||||||
|
|
||||||
|
Full explanation:
|
||||||
|
|
||||||
|
--maxage <int> : Skip messages older than <int> days.
|
||||||
|
final stats (skipped) don't count older messages
|
||||||
|
see also --minage
|
||||||
|
--minage <int> : Skip messages newer than <int> days.
|
||||||
|
final stats (skipped) don't count newer messages
|
||||||
|
You can do (+ are the messages selected):
|
||||||
|
past|----maxage+++++++++++++++>now
|
||||||
|
past|+++++++++++++++minage---->now
|
||||||
|
past|----maxage+++++minage---->now (intersection)
|
||||||
|
past|++++minage-----maxage++++>now (union)
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. Does imapsync retain the \Answered and $Forwarded flags?
|
Q. Does imapsync retain the \Answered and $Forwarded flags?
|
||||||
|
@ -1056,18 +1053,6 @@ b OK 73 good day (Success)
|
||||||
The client part to type is "a LOGIN ..." and "b LOGOUT" without
|
The client part to type is "a LOGIN ..." and "b LOGOUT" without
|
||||||
the double-quotes.
|
the double-quotes.
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. On windows ssl use to work with imapsync.exe 1.536 or previous then
|
|
||||||
an upgrade to next release makes it fail.
|
|
||||||
|
|
||||||
R. The I0::Socket::SSL can have SSL_version set by default to
|
|
||||||
"SSLv23:!SSLv2" but the auto-negociation can fail with
|
|
||||||
some ssl servers. Use --ssl1_SSL_version or
|
|
||||||
--ssl2_SSL_version to change SSL_version.
|
|
||||||
|
|
||||||
Try:
|
|
||||||
|
|
||||||
imapsync ... --ssl1 --ssl1_SSL_version "SSLv3"
|
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q: How to have an imaps server?
|
Q: How to have an imaps server?
|
||||||
|
@ -1083,7 +1068,7 @@ c) or use stunnel on inetd
|
||||||
imaps stream tcp nowait cyrus /usr/sbin/stunnel -s cyrus -p /etc/ssl/certs/imapd.pem -r localhost:imap2
|
imaps stream tcp nowait cyrus /usr/sbin/stunnel -s cyrus -p /etc/ssl/certs/imapd.pem -r localhost:imap2
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q: Multiple copies when I run imapsync twice ore more.
|
Q: Multiple copies, duplicates, when I run imapsync twice ore more.
|
||||||
|
|
||||||
R1. You can use option --useuid, imapsync then won't use header lines to
|
R1. You can use option --useuid, imapsync then won't use header lines to
|
||||||
compare messages in folders. Keep in ming it uses a local cache.
|
compare messages in folders. Keep in ming it uses a local cache.
|
||||||
|
@ -1091,11 +1076,11 @@ compare messages in folders. Keep in ming it uses a local cache.
|
||||||
imapsync ... --useuid
|
imapsync ... --useuid
|
||||||
|
|
||||||
R2. Multiple copies of the emails on the destination server. Some IMAP
|
R2. Multiple copies of the emails on the destination server. Some IMAP
|
||||||
servers (Domino for example) add some headers for each message
|
servers (Domino for example) change some headers for each message
|
||||||
transfered. The message is transfered again and again each time you
|
transferred. All messages are transferred again and again each time you
|
||||||
run imapsync. This is bad of course. The explanation is that imapsync
|
run imapsync. This is bad of course. The explanation is that imapsync
|
||||||
considers the message is not the same since headers have changed (one
|
considers messages are not the same on each side, default headers used
|
||||||
line added) and size too (the header part).
|
to identify the messages have changed.
|
||||||
|
|
||||||
You can look at the headers found by imapsync by using the --debug
|
You can look at the headers found by imapsync by using the --debug
|
||||||
option (and search for the message on both part), Header lines from
|
option (and search for the message on both part), Header lines from
|
||||||
|
@ -1104,28 +1089,36 @@ destination server begin with a "TH:" prefix. Since --debug is very
|
||||||
verbose I suggest to isolate a email in a specific folder in case you
|
verbose I suggest to isolate a email in a specific folder in case you
|
||||||
want to forward me the output.
|
want to forward me the output.
|
||||||
|
|
||||||
The way to avoid this problem is by using options --skipheader and
|
A way to avoid this problem is by using option --useheader with
|
||||||
--skipsize, like this (avoid headers beginning whith the string "X-"):
|
a different set than the default ones used by imapsync.
|
||||||
|
|
||||||
imapsync ... --skipheader "^X-" --skipsize
|
The default set is like:
|
||||||
|
|
||||||
To skip several headers you can use --skipheader one time
|
imapsync ... --useheader "Message-ID" --useheader "Received"
|
||||||
|
|
||||||
imapsync ... --skipheader "^X-|^Status|^Bcc"
|
The big problem is that what can be used instead of Message-ID
|
||||||
|
and Received lines? Sometimes standalone Message-ID works:
|
||||||
|
|
||||||
If you think you have too many header to avoid just use
|
imapsync ... --useheader "Message-ID"
|
||||||
|
|
||||||
imapsync ... --useheader "Message-ID" --skipsize
|
Another good way to the solution is to isolate two or three messages
|
||||||
|
in a BUG folder and send the --debug output to the author
|
||||||
|
gilles.lamiral@laposte.net
|
||||||
|
|
||||||
|
imapsync ... --debug --folder BUG
|
||||||
|
|
||||||
|
I will take a close look at the log and modify imapsync to fix
|
||||||
|
this faulty duplicate behaviour.
|
||||||
|
|
||||||
Remark. (Trick found by Tomasz Kaczmarski)
|
Remark. (Trick found by Tomasz Kaczmarski)
|
||||||
|
|
||||||
Option --useheader "Message-ID" asks the server to send only header
|
Option --useheader "Message-ID" asks the server to send only header
|
||||||
lines begining with "Message-ID". Some (buggy) servers send the whole
|
lines beginning with "Message-ID". Some (buggy) servers send the whole
|
||||||
header (all lines) instead of the "Message-ID" line. In that case, a
|
header (all lines) instead of the "Message-ID" line. In that case, a
|
||||||
trick to keep the --useheader filtering behavior is to use
|
trick to keep the --useheader filtering behaviour is to use
|
||||||
--skipheader with a negative lookahead pattern :
|
--skipheader with a negative lookahead pattern :
|
||||||
|
|
||||||
imapsync ... --skipheader "^(?!Message-ID)" --skipsize
|
imapsync ... --skipheader "^(?!Message-ID)"
|
||||||
|
|
||||||
Read it as "skip every header except Message-ID".
|
Read it as "skip every header except Message-ID".
|
||||||
|
|
||||||
|
@ -1186,6 +1179,21 @@ A good way to see what will be done is to first use:
|
||||||
|
|
||||||
imapsync ... --exclude "^INBOX$" --justfolders --nofoldersizes --dry
|
imapsync ... --exclude "^INBOX$" --justfolders --nofoldersizes --dry
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. Can Imapsync filter Spam during the sync?
|
||||||
|
|
||||||
|
R. No, imapsync doesn't detect Spam by itself and currently it can't
|
||||||
|
delegate this job during its IMAP syncs. But I've seen blogs and
|
||||||
|
Spamassassin documentation explaining solutions to apply Spamassassin
|
||||||
|
to a imap mailbox. So you can apply one of these solutions on the host1
|
||||||
|
source mailbox before the imapsync run or on the destination host2
|
||||||
|
mailbox after the imapsync transfer.
|
||||||
|
|
||||||
|
http://www.stearns.org/doc/spamassassin-setup.current.html#isbg
|
||||||
|
http://euer.krebsco.de/using-spamassassin-on-a-remote-imap-host.html
|
||||||
|
https://github.com/ook/isbg
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
Q. I want to exclude folders matching SPAM no matter the case,
|
Q. I want to exclude folders matching SPAM no matter the case,
|
||||||
aka how to be case insensitive
|
aka how to be case insensitive
|
||||||
|
@ -1212,124 +1220,6 @@ R2. Use --include "^MyFolder"
|
||||||
Then the folder "MyFolder" and all its subfolders will be handled
|
Then the folder "MyFolder" and all its subfolders will be handled
|
||||||
and only them.
|
and only them.
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. Migrating to Exchange 201O, messages get date of the transfer,
|
|
||||||
this is bad for sorting and listing.
|
|
||||||
|
|
||||||
R1. Be sure to have at least Exchange 2010 SP2 Rollup 5
|
|
||||||
http://www.tribalchicken.com.au/15-technical/29-imapsync-exchange2010
|
|
||||||
|
|
||||||
R2. See also the Outlook side (thanks to Martin Hochreiter for this solution)
|
|
||||||
http://www.howto-outlook.com/faq/archivenotworking.htm
|
|
||||||
by changing Archive to sent/receive date
|
|
||||||
|
|
||||||
It's often shorter to change one server than thousands clients
|
|
||||||
so R1 might be easier to do.
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. How to migrate from or to Exchange 2003 with an admin/authuser
|
|
||||||
account?
|
|
||||||
|
|
||||||
R. Thomas Edgar wrote the following
|
|
||||||
|
|
||||||
In case you can glean something from this snippet which allowed us
|
|
||||||
to migrate from Exchange 2003 t0 Cyrus Imap 2.4 (you would reverse
|
|
||||||
the flow to go the other way):
|
|
||||||
|
|
||||||
imapsync --dry --host1 ExchangeServer.mycompany.com \
|
|
||||||
--user1 Some.User@mycompany.com --authuser1 ExchangeAdminAccount \
|
|
||||||
--proxyauth1 --password1 '$pass_with_dollars$' \
|
|
||||||
--host2 cyrusimapbackend.mycompany.com \
|
|
||||||
--user2 SameOrDiffererentUser@mycompany.com \
|
|
||||||
--authuser2 CyrusAdminAccount --password2 CyrusAdminPassword
|
|
||||||
|
|
||||||
We also needed to:
|
|
||||||
|
|
||||||
- Ensure the Exchange Admin Acct had IMAP4 enabled in it's
|
|
||||||
profile (it initially didn't!)
|
|
||||||
- Ensure the Some.User Exchange Acct had IMAP4 enabled
|
|
||||||
in it's profile (it initially didn't!)
|
|
||||||
- Add the CyrusAdminAccount to admins line in /etc/imapd.conf
|
|
||||||
- Give CyrusAdminAccount lrswipkxtecda to the Cyrus Imap account
|
|
||||||
being migrated to (- or in your case, from)
|
|
||||||
|
|
||||||
In case you are not aware:
|
|
||||||
|
|
||||||
- It will prompt for a password if you don't supply it
|
|
||||||
- the domain part of the fully-qualified email could be
|
|
||||||
omitted in our case
|
|
||||||
- Use --debugimap when testing initial connectivity, if necessary
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. How to migrate from or to Exchange 2007/2010 with an
|
|
||||||
admin/authuser account?
|
|
||||||
|
|
||||||
R. The tricks comes from Michele Marcionelli and Benjamin Priestman:
|
|
||||||
|
|
||||||
This doesn't work:
|
|
||||||
imapsync ... --user2 user2 --authuser2 admin2 --password2 adminpassword2 ...
|
|
||||||
|
|
||||||
This might works:
|
|
||||||
imapsync ... --user2 "domain\admin2\user2" --password2 adminpassword2 ...
|
|
||||||
or
|
|
||||||
imapsync ... --user2 "admin2@domain\user2" --password2 adminpassword2 ...
|
|
||||||
|
|
||||||
where "domain" is set be the user's UPN in Active Directory
|
|
||||||
or the NETBIOS or DNS name of the domain.
|
|
||||||
|
|
||||||
The exact format might vary depending on local configuration and you
|
|
||||||
should experiment with the different formats.
|
|
||||||
|
|
||||||
PLAIN authentication is the only way to go with --authuser1 for now.
|
|
||||||
So don't use --authmech1 SOMETHING with --authuser1 admin_user,
|
|
||||||
it will not work.
|
|
||||||
Same behavior with the --authuser2 option.
|
|
||||||
|
|
||||||
A little note from Michael Scherer.
|
|
||||||
The previous workaround in the FAQ seems to be obsolete.
|
|
||||||
I can confirm that
|
|
||||||
|
|
||||||
imapsync ... --host2 exchange_server --authmech2 PLAIN \
|
|
||||||
--authuser2 admin@domain --user2 user_alias
|
|
||||||
|
|
||||||
is working without any glitches, running Exchange 2010 SP2 here.
|
|
||||||
Explanation, Exchange knows a) about a username
|
|
||||||
and b) about a mailNickname which can be different to the username.
|
|
||||||
As it seems you need to use the mailNickname (e.g. alias) defined
|
|
||||||
for user2, not the username itself.
|
|
||||||
http://blogs.technet.com/b/exchange/archive/2004/03/31/105275.aspx
|
|
||||||
|
|
||||||
|
|
||||||
A little note from John Becker.
|
|
||||||
After you pointed out that I had issues with authorization, I realized that
|
|
||||||
as an admin user I don't have all the rights on the mailboxes.
|
|
||||||
So I added myself to the user mailbox with full rights.
|
|
||||||
I also changed the login type on the Exchange CAS to type 1, plain text.
|
|
||||||
The command that I used for imapsync is:
|
|
||||||
imapsync ... ^
|
|
||||||
--host2 exchange-server ^
|
|
||||||
--user2 "windows-domain\admin-user\aaaa" ^
|
|
||||||
--password2 admin-password ...
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. How to migrate from or to Office 365 with an admin/authuser account?
|
|
||||||
|
|
||||||
Note from Yago Torres Fernandez:
|
|
||||||
(a working command using admin/authuser on host2 Office 365)
|
|
||||||
|
|
||||||
imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated@domain.com ^
|
|
||||||
--password2 XXXX --ssl2 --ssl2_SSL_version SSLv3 --exclude "Shared Folders" ^
|
|
||||||
--regextrans2 "s#Trash$#Papelera#" --regextrans2 "s#^Deleted Items$#Papelera#"
|
|
||||||
|
|
||||||
but previous in Office365 you must do something like that, using powershell:
|
|
||||||
|
|
||||||
Add-MailboxPermission -identity user_to_be_migrated@domain.com -user user_admin@domain.com -accessrights fullaccess -inheritancetype all
|
|
||||||
|
|
||||||
PLAIN authentication is the only way to go with --authuser1 for now.
|
|
||||||
So don't use --authmech1 SOMETHING with --authuser1 admin_user,
|
|
||||||
it will not work.
|
|
||||||
Same behavior with the --authuser2 option.
|
|
||||||
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
Q. How to migrate from uw-imap with an admin/authuser account?
|
Q. How to migrate from uw-imap with an admin/authuser account?
|
||||||
|
@ -1648,363 +1538,6 @@ format issues. And now it works fine. (Thanks to Hansjoerg.Maurer)
|
||||||
Server specific issues and solutions
|
Server specific issues and solutions
|
||||||
=======================================================================
|
=======================================================================
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. From XXX to Exchange 2010/2013 or Office365
|
|
||||||
|
|
||||||
R. Here is a command line resume that solves most encountered issues when
|
|
||||||
migrating to Exchange or Office365. To understand or change the
|
|
||||||
details you have to read next Q/R sections.
|
|
||||||
|
|
||||||
For Office365 you also have to add --ssl2 --ssl2_SSL_version SSLv3
|
|
||||||
if Office365 is host2 (or --ssl1 if Office365 is host1)
|
|
||||||
|
|
||||||
imapsync ... --ssl2 --ssl2_SSL_version SSLv3
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
imapsync ... --ssl1 --ssl1_SSL_version SSLv3
|
|
||||||
|
|
||||||
|
|
||||||
On Windows:
|
|
||||||
|
|
||||||
imapsync ... ^
|
|
||||||
--maxsize 10000000 ^
|
|
||||||
--maxlinelength 9900 ^
|
|
||||||
--regexflag "s/\\Flagged//g" ^
|
|
||||||
--disarmreadreceipts
|
|
||||||
|
|
||||||
|
|
||||||
On Unix:
|
|
||||||
|
|
||||||
imapsync ... \
|
|
||||||
--maxsize 10000000 \
|
|
||||||
--maxlinelength 9900 \
|
|
||||||
--regexflag "s/\\Flagged//g" \
|
|
||||||
--disarmreadreceipts
|
|
||||||
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. From XXX to Exchange 2013 or Office365 read receipts are all
|
|
||||||
resent again after a sync. Even for old messages. How can I fix that?
|
|
||||||
|
|
||||||
R. imapsync can remove the header containing this read receipt request.
|
|
||||||
|
|
||||||
On Unix or Windows use:
|
|
||||||
|
|
||||||
imapsync ... --disarmreadreceipts
|
|
||||||
|
|
||||||
Since read receipts should be sent for unseen messages that will go
|
|
||||||
to a seen state after the migration, you could be strict and apply
|
|
||||||
the regex only to seen messages.
|
|
||||||
Selecting seen message can be done with:
|
|
||||||
|
|
||||||
imapsync ... --search1 "SEEN" --disarmreadreceipts
|
|
||||||
|
|
||||||
Of course a second run has to be run without the --regexmess for
|
|
||||||
unseen messages:
|
|
||||||
|
|
||||||
imapsync ... --search1 "UNSEEN"
|
|
||||||
|
|
||||||
If fact --disarmreadreceipts is just an option equivalent to:
|
|
||||||
|
|
||||||
--regexmess 's{\A(.*?(?! ^$))^Disposition-Notification-To:(.*?)$}{$1X-Disposition-Notification-To:$2}igxms'
|
|
||||||
|
|
||||||
That regex prefixes the header Disposition-Notification-To with an X-
|
|
||||||
so that it becomes inactive.
|
|
||||||
|
|
||||||
Thanks to David Karnowski for pointing and solving this issue.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. From XXX to Exchange 2010/2013 or Office365 I get this error message
|
|
||||||
sometimes: "BAD Command Argument Error 11"
|
|
||||||
|
|
||||||
R. This error message comes from Exchange IMAP server when it
|
|
||||||
encounters any problem. Most of the time it is one of the following:
|
|
||||||
|
|
||||||
* Some messages are bigger than the size limit. 10 MB by default
|
|
||||||
on Exchange. It can be upped by configuration for Exchange.
|
|
||||||
If you can't configure this limit then use option
|
|
||||||
--maxsize 10000000 for 10 MB, change it if needed) to tell
|
|
||||||
imapsync to skip those messages.
|
|
||||||
This value is 25 MB by default for Office365 --maxsize 25000000
|
|
||||||
|
|
||||||
imapsync ... --maxsize 10000000 # 10 MB for Exchange
|
|
||||||
|
|
||||||
imapsync ... --maxsize 25000000 # 25 MB for Office365
|
|
||||||
|
|
||||||
|
|
||||||
* Quota reached. The whole account is full.
|
|
||||||
It can be upped by configuration.
|
|
||||||
|
|
||||||
* Some messages have some lines too long. Use option --maxlinelength
|
|
||||||
to skip messages whose max line length is over a number of bytes.
|
|
||||||
--maxlinelength 1000 is a RFC2822 must but most server support
|
|
||||||
higher values. Exchange supports 9900:
|
|
||||||
|
|
||||||
imapsync ... --maxlinelength 9900
|
|
||||||
|
|
||||||
Have also in mind that Exchange closes the connection after 10 errors
|
|
||||||
encountered so you might also see "BYE Connection closed" errors from
|
|
||||||
Exchange, which means Exchange leaves the session and say goodbye,
|
|
||||||
come back later. Rerun a sync then.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. From XXX to Exchange 2010 or 2013 or Office365 the flag Flagged does
|
|
||||||
not seem to be well synced.
|
|
||||||
|
|
||||||
R. Use the following trick. Run imapsync twice, one with --regexflag
|
|
||||||
and one without, like this:
|
|
||||||
|
|
||||||
1) imapsync ... --regexflag "s/\\Flagged//g"
|
|
||||||
2) imapsync ...
|
|
||||||
|
|
||||||
You can add --debugflags if you want to see what imapsync gets and
|
|
||||||
does in details with flags.
|
|
||||||
|
|
||||||
The magic of this trick is on ignoring the \Flagged flag on the first
|
|
||||||
sync and setting it on the second sync, with STORE instead of APPEND.
|
|
||||||
This Exchange bug seems that Exchange gets and sets well the Flagged
|
|
||||||
flag with APPEND in IMAP but then it forgets it with other protocols;
|
|
||||||
With STORE it sets and gets the "\Flagged" flag everywhere.
|
|
||||||
|
|
||||||
Thanks to Dave Murray and Simon Savva for reporting and solving
|
|
||||||
this issue.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. Synchronizing from XXX to Gmail
|
|
||||||
|
|
||||||
R. There are some details to get the special [Gmail] sub-folders
|
|
||||||
right. Here's an example of migrating an old "Sent" folder to
|
|
||||||
Gmail's structure:
|
|
||||||
|
|
||||||
imapsync --host1 mail.oldhost.com \
|
|
||||||
--user1 my_email@oldhost.com \
|
|
||||||
--password1 password \
|
|
||||||
--host2 imap.gmail.com \
|
|
||||||
--user2 my_email@gmail.com \
|
|
||||||
--password2 password \
|
|
||||||
--ssl2 \
|
|
||||||
--exitwhenover 500000000 \
|
|
||||||
--maxsize 25000000 \
|
|
||||||
--expunge1 \
|
|
||||||
--addheader \
|
|
||||||
--exclude "\[Gmail\]$" \
|
|
||||||
--regextrans2 "s/[ ]+/_/g" \
|
|
||||||
--regextrans2 "s/[\^]/_/g" \
|
|
||||||
--regextrans2 "s/['\"\\\\]/_/g" \
|
|
||||||
--regextrans2 "s,^Sent$,[Gmail]/Sent Mail,"
|
|
||||||
|
|
||||||
Explanations:
|
|
||||||
|
|
||||||
--ssl2 is mandatory since Gmail only supports imap ssl connections.
|
|
||||||
|
|
||||||
--exitwhenover 500000000 option is here to avoid locking when
|
|
||||||
transfers exceed maximum limit.
|
|
||||||
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
|
|
||||||
--exitwhenover is not mandatory in the sense you may be able to
|
|
||||||
use an upper value than 500 MB without disconnections; I don't
|
|
||||||
know the hard value, it seems to vary, so just have some tries
|
|
||||||
and report me what you discover in case you detect something.
|
|
||||||
|
|
||||||
--maxsize 25000000 is mandatory since Gmail limits messages size
|
|
||||||
up to 25 MB. This value increases over time, it was 10 MB some
|
|
||||||
years ago so you can try higher values. The Gmail page about
|
|
||||||
this limit is https://support.google.com/mail/answer/6584
|
|
||||||
|
|
||||||
--expunge1 is optional. It deletes messages marked \Deleted on host1.
|
|
||||||
Imapsync syncs messages with all their flags, Gmail takes the messages
|
|
||||||
marked \Deleted but deletes or moves them just after.
|
|
||||||
Option --expunge1 really removes messages marked \Deleted on host1
|
|
||||||
so they are not synced at all.
|
|
||||||
|
|
||||||
|
|
||||||
The --addheader option is there because "Sent" folder messages
|
|
||||||
sometimes lack the "Message-Id:" and "Received:" headers needed
|
|
||||||
by imapsync to identify messages (only when --useuid is not used).
|
|
||||||
So option --addheader adds a "Message-Id" header consisting of
|
|
||||||
the imap UID of the message on the host1 folder, like
|
|
||||||
"Message-Id: 12345@imapsync".
|
|
||||||
|
|
||||||
--exclude "\[Gmail\]$" is there to avoid a small examine/select error:
|
|
||||||
"Could not examine: 43 NO [NONEXISTENT] Unknown Mailbox: [Gmail]
|
|
||||||
(now in authenticated state) (Failure)".
|
|
||||||
|
|
||||||
--regextrans2 "s/[ ]+/_/g" is there to convert blank characters not
|
|
||||||
accepted by gmail to character _ underscore. In fact only leading
|
|
||||||
and trailing blank characters are problems with gmail, and
|
|
||||||
also successive blanks ending with the IMAP error
|
|
||||||
"NO [CANNOT] Folder contains excess whitespace (Failure)"
|
|
||||||
If you want to change only leading and trailing blank characters
|
|
||||||
then use instead:
|
|
||||||
--regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g"
|
|
||||||
|
|
||||||
On Windows, in the previous example containing \$1 you have to
|
|
||||||
replace the two \$1 by $1 (remove the \ before $1).
|
|
||||||
|
|
||||||
--regextrans2 "s/[\^]/_/g" is mandatory. It converts, since
|
|
||||||
not accepted by gmail, character ^ to character _ underscore.
|
|
||||||
|
|
||||||
--regextrans2 "s/['\"\\\\]/_/g" is optional. It converts
|
|
||||||
characters ' or " or \ to character _ underscore.
|
|
||||||
|
|
||||||
--regextrans2 "s,^Sent$,[Gmail]/Sent Mail," is to transform the
|
|
||||||
folder name "Sent" and adapt it to Gmail "Sent Mail" folder.
|
|
||||||
If you're using a different language in Gmail you might adapt
|
|
||||||
this example with the folder name translated, an example in French:
|
|
||||||
|
|
||||||
imapsync ...
|
|
||||||
--regextrans2 "s,^Messages envoy&AOk-s$,[Gmail]/Messages envoy&AOk-s," \
|
|
||||||
|
|
||||||
|
|
||||||
You can add --folder "INBOX.Sent" in the example in case
|
|
||||||
you want to sync only the "Sent" folder.
|
|
||||||
|
|
||||||
You can select folders exported to imap within the gmail preferences,
|
|
||||||
unselect some "System labels", depending on your needs.
|
|
||||||
|
|
||||||
The "All Mail" archive pseudo-folder should be updated automatically.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. Some of the folders are getting created with [IMAP] prefix on Google
|
|
||||||
side. How to stop creating folder with this prefix?
|
|
||||||
Any switch we can use? e.g. [IMAP]/Archive
|
|
||||||
|
|
||||||
R. No switch in imapsync since [IMAP]/ prefix is done by Gmail,
|
|
||||||
it might be configurable with Gmail parameters.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. Synchronizing from Gmail to XXX
|
|
||||||
|
|
||||||
R. Gmail needs SSL
|
|
||||||
|
|
||||||
./imapsync \
|
|
||||||
--host1 imap.gmail.com \
|
|
||||||
--user1 gilles.lamiral@gmail.com \
|
|
||||||
--password1 gmailsecret \
|
|
||||||
--host2 localhost
|
|
||||||
--user2 tata \
|
|
||||||
--password2 tatasecret \
|
|
||||||
--ssl1 \
|
|
||||||
--exitwhenover 2500000000 \
|
|
||||||
--useheader="X-Gmail-Received" \
|
|
||||||
--useheader "Message-Id" \
|
|
||||||
--skipcrossduplicates \
|
|
||||||
--folderfirst "Work" \
|
|
||||||
--folderfirst "Friends" \
|
|
||||||
--folderlast "CanWait" \
|
|
||||||
--folderlast "[Gmail]/All Mail"
|
|
||||||
|
|
||||||
|
|
||||||
Explanations:
|
|
||||||
|
|
||||||
--ssl1 is mandatory since Gmail only supports imap ssl connections.
|
|
||||||
|
|
||||||
--exitwhenover 2500000000 option is here to avoid locking when
|
|
||||||
transfers exceed maximum limit.
|
|
||||||
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
|
|
||||||
--exitwhenover is not mandatory in the sense you may be able to
|
|
||||||
use an upper value than 2.5 GB without disconnections; I don't
|
|
||||||
know the hard value, it seems to vary, so just have some tries
|
|
||||||
and report me what you discover in case you detect something.
|
|
||||||
|
|
||||||
--useheader="X-Gmail-Received" --useheader "Message-Id" are not
|
|
||||||
mandatory. I use them because I found (several years ago, it may
|
|
||||||
have changed) that Gmail always adds a different header
|
|
||||||
"X-Gmail-Received:" to all messages it gets. So the identification
|
|
||||||
by imapsync can not fail using this header. "Message-Id" is there
|
|
||||||
for safety about this Gmail rule.
|
|
||||||
|
|
||||||
|
|
||||||
If your destination imap server doesn't like "[Gmail]" name, just add
|
|
||||||
option:
|
|
||||||
--regextrans2 's/\[Gmail\]/Gmail/'
|
|
||||||
|
|
||||||
You can select folders exported to imap within the gmail preferences,
|
|
||||||
for example you may unselect all "System labels".
|
|
||||||
|
|
||||||
--exitwhenover option is here to avoid locking when transfers
|
|
||||||
exceed maximum limit.
|
|
||||||
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
|
|
||||||
|
|
||||||
--skipcrossduplicates is optional but it can save Gigabytes of hard
|
|
||||||
disk memory. Within imap protocol, Gmail presents Gmail labels as
|
|
||||||
folders, so a message labeled "Work" "ProjectX" "Urgent" ends up
|
|
||||||
in three different imap folders "Work" "ProjectX" and "Urgent"
|
|
||||||
after an imap sync. --skipcrossduplicates prevent this behavior.
|
|
||||||
|
|
||||||
An issue with --skipcrossduplicates is that the first label synced
|
|
||||||
by imapsync goes to its corresponding folder and other labels are
|
|
||||||
ignored. This way, at least you can choose what labels have the
|
|
||||||
priority by using the --folderfirst option. For example
|
|
||||||
--folderfirst "Work" will sync messages labeled "Work" before
|
|
||||||
messages labeled "CanWait" or "Urgent". By default imapsync
|
|
||||||
syncs folders (Gmail labels) using the classical alphanumeric order.
|
|
||||||
|
|
||||||
--folderlast "CanWait" will sync only messages that have the
|
|
||||||
label CanWait and only it.
|
|
||||||
|
|
||||||
--folderlast "[Gmail]/All Mail", in conjunction with option
|
|
||||||
--skipcrossduplicates, will only put in "[Gmail]/All Mail"
|
|
||||||
the messages that are not labeled at all.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
Q. Does imapsync have the capability to do 2 stage authentication for google.
|
|
||||||
|
|
||||||
No, imapsync doesn't support 2 stage authentication.
|
|
||||||
Reading https://support.google.com/mail/answer/1173270?hl=en
|
|
||||||
it looks like it can't because imapsync uses imap protocol.
|
|
||||||
|
|
||||||
So you have to follow the Google recommendation and generate an
|
|
||||||
application-specific password or normal authentication or XOAUTH.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
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
|
|
||||||
|
|
||||||
R. Take a look at:
|
|
||||||
http://www.linux-france.org/prj/imapsync_list/msg00639.html
|
|
||||||
|
|
||||||
http://biasecurities.com/blog/2009/migrate-email-from-gmail-to-google-apps/
|
|
||||||
http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration/
|
|
||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
Q. From Zimbra to XXX
|
Q. From Zimbra to XXX
|
||||||
|
|
||||||
|
@ -2224,15 +1757,6 @@ R. Mailboxes must exist before running imapsync.
|
||||||
You have to extract users logins and passwords in a csv file.
|
You have to extract users logins and passwords in a csv file.
|
||||||
See the "HUGE MIGRATION" section in the README file.
|
See the "HUGE MIGRATION" section in the README file.
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. From Cyrus to Notes
|
|
||||||
|
|
||||||
Default behavior might works.
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. From cyrus to dbmail
|
|
||||||
|
|
||||||
Default behavior might works.
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
Q: From MailEnable 1.75
|
Q: From MailEnable 1.75
|
||||||
|
@ -2260,31 +1784,6 @@ Q. To Communigate Pro - Solaris version
|
||||||
|
|
||||||
R. See and run patches/imapsync_1.267_jari
|
R. See and run patches/imapsync_1.267_jari
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. From any to Exchange2007
|
|
||||||
|
|
||||||
Several problems:
|
|
||||||
- Big messages: increase the "send- and receive-connector"
|
|
||||||
in exchange2007 to 40 MB.
|
|
||||||
|
|
||||||
R. 2 solutions
|
|
||||||
|
|
||||||
R1. With imapsync (only partial success)
|
|
||||||
--skipsize --skipheader 'Received' \
|
|
||||||
--regexmess 's{\A(.*?(?!^$))^Date:(.*?)$}{$1Date:$2\nReceived: From; $2}gxms'
|
|
||||||
Any user having time to spend to debug Exchange2007 with imapsync
|
|
||||||
is welcome.
|
|
||||||
|
|
||||||
R2. Other solution
|
|
||||||
Two users succeeded by using "MS Transporter Suite" (which is closed
|
|
||||||
expensive non-free software).
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
Q. From Microsoft Exchange 2000 IMAP4rev1 server version 6.0.6487.0.
|
|
||||||
|
|
||||||
R. imapsync ... \
|
|
||||||
--prefix1 INBOX.
|
|
||||||
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
Q. From Softalk Workgroup Mail 7.6.4
|
Q. From Softalk Workgroup Mail 7.6.4
|
||||||
|
|
62
FAQ.d/FAQ.Domino.txt
Normal file
62
FAQ.d/FAQ.Domino.txt
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
#!/bin/cat
|
||||||
|
$Id: FAQ.Domino.txt,v 1.2 2015/03/26 04:24:17 gilles Exp gilles $
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Domino specific issues and solutions
|
||||||
|
======================================================================
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. From Domino Notes to xxx
|
||||||
|
|
||||||
|
On Windows use:
|
||||||
|
|
||||||
|
imapsync.exe ... --sep2 "\\" --prefix2 ""
|
||||||
|
|
||||||
|
|
||||||
|
On Unix use:
|
||||||
|
|
||||||
|
imapsync ... --sep2 '\\' --prefix2 ''
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. From xxx to Domino Notes
|
||||||
|
|
||||||
|
For Domino anywhere with imapsync.exe on Windows use:
|
||||||
|
|
||||||
|
imapsync.exe ... ^
|
||||||
|
--sep2 "\\" --prefix2 "" ^
|
||||||
|
--regextrans2 "s,^INBOX\\(.*),$1,"
|
||||||
|
|
||||||
|
Explanation: Domino doesn't accept INBOX subfolders.
|
||||||
|
|
||||||
|
If you want to sync the complete host1 mailbox in a subfolder called OLDBOX use:
|
||||||
|
|
||||||
|
imapsync.exe ... ^
|
||||||
|
--sep2 "\\" --prefix2 "" ^
|
||||||
|
--regextrans2 "s,(.*),OLDBOX\\$1," --justfolders --dry
|
||||||
|
|
||||||
|
If the output is correct for you then remove --dry and have a run.
|
||||||
|
Verify the folder hierarchy is good on host2 then remove --justfolders to
|
||||||
|
sync the messages.
|
||||||
|
|
||||||
|
For Domino with imapsync and Domino on Linux:
|
||||||
|
(Thanks to Zafer)
|
||||||
|
|
||||||
|
R. We've migrated about 5000 users from cyrus to lotus domino 853!
|
||||||
|
Mails are being copied into the new created lotus domino mailbox
|
||||||
|
retaining the existing folder structure from the old mail database.
|
||||||
|
This means that sent mails can be found in the sent folder and
|
||||||
|
mails from the old inbox are copied into the new inbox
|
||||||
|
We also marked migrated mails with the header Migratedbyus
|
||||||
|
|
||||||
|
For Domino 853FP6 on Linux, we used this command on Unix:
|
||||||
|
|
||||||
|
imapsync \
|
||||||
|
--host1 hhh1 --user1 uuu1 --password1 ppp1 \
|
||||||
|
--host2 hhh2 --user2 uuu2 --password2 ppp2 \
|
||||||
|
--exclude "^INBOX/Trash" --exclude 'Junk|Drafts' \
|
||||||
|
--regextrans2 's#^INBOX/Sent$#^Sent#' \
|
||||||
|
--prefix2 "" --sep2 "\/" \
|
||||||
|
--regexmess 's{\A(.*?(?! ^$))^Date:(.*?)$}{$1Migratedbyus:$2\nx-MailDate:$2}gxms'
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
19
FAQ.d/FAQ.Dovecot.txt
Normal file
19
FAQ.d/FAQ.Dovecot.txt
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/cat
|
||||||
|
$Id: FAQ.Dovecot.txt,v 1.1 2015/03/23 00:16:43 gilles Exp gilles $
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Dovecot specific issues and solutions
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. How to migrate to Dovecot with an admin/MasterUser account?
|
||||||
|
|
||||||
|
R. Dovecot uses the same syntax as uw-imap
|
||||||
|
|
||||||
|
imapsync ... --user2="loginuser*admin_user" --password2 "admin_user_password"
|
||||||
|
|
||||||
|
To setup a Dovecot MasterUser see
|
||||||
|
http://wiki2.dovecot.org/Authentication/MasterUsers
|
||||||
|
|
||||||
|
======================================================================
|
312
FAQ.d/FAQ.Exchange.txt
Normal file
312
FAQ.d/FAQ.Exchange.txt
Normal file
|
@ -0,0 +1,312 @@
|
||||||
|
#!/bin/cat
|
||||||
|
$Id: FAQ.Exchange.txt,v 1.2 2015/03/16 15:11:32 gilles Exp gilles $
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Exchange 20xx and Office365 specific issues and solutions
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. From XXX to Exchange 2010/2013 or Office365
|
||||||
|
|
||||||
|
R. Here is a command line resume that solves most encountered issues when
|
||||||
|
migrating to Exchange or Office365. To understand or change the
|
||||||
|
details you have to read next Q/R sections.
|
||||||
|
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
|
||||||
|
imapsync ... ^
|
||||||
|
--maxsize 10000000 ^
|
||||||
|
--maxlinelength 9900 ^
|
||||||
|
--regexflag "s/\\Flagged//g" ^
|
||||||
|
--disarmreadreceipts
|
||||||
|
|
||||||
|
|
||||||
|
On Unix:
|
||||||
|
|
||||||
|
imapsync ... \
|
||||||
|
--maxsize 10000000 \
|
||||||
|
--maxlinelength 9900 \
|
||||||
|
--regexflag "s/\\Flagged//g" \
|
||||||
|
--disarmreadreceipts
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. From XXX to Exchange 2013 or Office365 read receipts are all
|
||||||
|
resent again after a sync. Even for old messages. How can I fix that?
|
||||||
|
|
||||||
|
R. imapsync can remove the header containing this read receipt request.
|
||||||
|
|
||||||
|
On Unix or Windows use:
|
||||||
|
|
||||||
|
imapsync ... --disarmreadreceipts
|
||||||
|
|
||||||
|
Since read receipts should be sent for unseen messages that will go
|
||||||
|
to a seen state after the migration, you could be strict and apply
|
||||||
|
the regex only to seen messages.
|
||||||
|
Selecting seen message can be done with:
|
||||||
|
|
||||||
|
imapsync ... --search1 "SEEN" --disarmreadreceipts
|
||||||
|
|
||||||
|
Of course a second run has to be run without the --disarmreadreceipts
|
||||||
|
for unseen messages:
|
||||||
|
|
||||||
|
imapsync ... --search1 "UNSEEN"
|
||||||
|
|
||||||
|
If fact --disarmreadreceipts is just an option equivalent to:
|
||||||
|
|
||||||
|
--regexmess 's{\A(.*?(?! ^$))^Disposition-Notification-To:(.*?)$}{$1X-Disposition-Notification-To:$2}igxms'
|
||||||
|
|
||||||
|
That regex changes the header Disposition-Notification-To. It prefixes
|
||||||
|
it with an X- so that it becomes inactive.
|
||||||
|
Disposition-Notification-To: blabla
|
||||||
|
becomes
|
||||||
|
X-Disposition-Notification-To: blabla
|
||||||
|
|
||||||
|
Thanks to David Karnowski for pointing and solving this issue.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. From XXX to Exchange 2010/2013 or Office365 I get this error message
|
||||||
|
sometimes: "BAD Command Argument Error 11"
|
||||||
|
|
||||||
|
R. This error message comes from Exchange IMAP server when it
|
||||||
|
encounters any problem. Most of the time it is one of the following:
|
||||||
|
|
||||||
|
* Some messages are bigger than the size limit. 10 MB by default
|
||||||
|
on Exchange. It can be upped by configuration for Exchange.
|
||||||
|
If you can't configure this limit then use option
|
||||||
|
--maxsize 10000000 for 10 MB, change it if needed) to tell
|
||||||
|
imapsync to skip those messages.
|
||||||
|
This value is 25 MB by default for Office365 --maxsize 25000000
|
||||||
|
|
||||||
|
imapsync ... --maxsize 10000000 # 10 MB for Exchange
|
||||||
|
|
||||||
|
imapsync ... --maxsize 25000000 # 25 MB for Office365
|
||||||
|
|
||||||
|
|
||||||
|
* Quota reached. The whole account is full.
|
||||||
|
It can be upped by configuration.
|
||||||
|
|
||||||
|
* Some messages have some lines too long. Use option --maxlinelength
|
||||||
|
to skip messages whose max line length is over a number of bytes.
|
||||||
|
--maxlinelength 1000 is a RFC2822 must but most server support
|
||||||
|
higher values. Exchange supports 9900:
|
||||||
|
|
||||||
|
imapsync ... --maxlinelength 9900
|
||||||
|
|
||||||
|
Have also in mind that Exchange closes the connection after 10 errors
|
||||||
|
encountered so you might also see "BYE Connection closed" errors from
|
||||||
|
Exchange, which means Exchange leaves the session and say goodbye,
|
||||||
|
come back later. Rerun a sync then.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. From XXX to Exchange 2010 or 2013 or Office365 the flag Flagged does
|
||||||
|
not seem to be well synced.
|
||||||
|
|
||||||
|
R. Use the following trick. Run imapsync twice, one with --regexflag
|
||||||
|
and one without, like this:
|
||||||
|
|
||||||
|
1) imapsync ... --regexflag "s/\\Flagged//g"
|
||||||
|
2) imapsync ...
|
||||||
|
|
||||||
|
You can add --debugflags if you want to see what imapsync gets and
|
||||||
|
does in details with flags.
|
||||||
|
|
||||||
|
The magic of this trick is on ignoring the \Flagged flag on the first
|
||||||
|
sync and setting it on the second sync, with STORE instead of APPEND.
|
||||||
|
This Exchange bug seems that Exchange gets and sets well the Flagged
|
||||||
|
flag with APPEND in IMAP but then it forgets it with other protocols;
|
||||||
|
With STORE it sets and gets the "\Flagged" flag everywhere.
|
||||||
|
|
||||||
|
Thanks to Dave Murray and Simon Savva for reporting and solving
|
||||||
|
this issue.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. How to migrate from or to Exchange 2007/2010 with an
|
||||||
|
admin/authuser account?
|
||||||
|
|
||||||
|
R. The tricks comes from Michele Marcionelli and Benjamin Priestman:
|
||||||
|
|
||||||
|
This doesn't work:
|
||||||
|
imapsync ... --user2 user2 --authuser2 admin2 --password2 adminpassword2 ...
|
||||||
|
|
||||||
|
This might works:
|
||||||
|
imapsync ... --user2 "domain\admin2\user2" --password2 adminpassword2 ...
|
||||||
|
or
|
||||||
|
imapsync ... --user2 "admin2@domain\user2" --password2 adminpassword2 ...
|
||||||
|
|
||||||
|
where "domain" is set be the user's UPN in Active Directory
|
||||||
|
or the NETBIOS or DNS name of the domain.
|
||||||
|
|
||||||
|
The exact format might vary depending on local configuration and you
|
||||||
|
should experiment with the different formats.
|
||||||
|
|
||||||
|
PLAIN authentication is the only way to go with --authuser1 for now.
|
||||||
|
So don't use --authmech1 SOMETHING with --authuser1 admin_user,
|
||||||
|
it will not work.
|
||||||
|
Same behavior with the --authuser2 option.
|
||||||
|
|
||||||
|
A little note from Michael Scherer.
|
||||||
|
The previous workaround in the FAQ seems to be obsolete.
|
||||||
|
I can confirm that
|
||||||
|
|
||||||
|
imapsync ... --host2 exchange_server \
|
||||||
|
--authuser2 admin@domain --user2 user_alias
|
||||||
|
|
||||||
|
is working without any glitches, running Exchange 2010 SP2 here.
|
||||||
|
Explanation, Exchange knows a) about a username
|
||||||
|
and b) about a mailNickname which can be different to the username.
|
||||||
|
As it seems you need to use the mailNickname (e.g. alias) defined
|
||||||
|
for user2, not the username itself.
|
||||||
|
http://blogs.technet.com/b/exchange/archive/2004/03/31/105275.aspx
|
||||||
|
|
||||||
|
|
||||||
|
A little note from John Becker.
|
||||||
|
After you pointed out that I had issues with authorization, I realized that
|
||||||
|
as an admin user I don't have all the rights on the mailboxes.
|
||||||
|
So I added myself to the user mailbox with full rights.
|
||||||
|
I also changed the login type on the Exchange CAS to type 1, plain text.
|
||||||
|
The command that I used for imapsync is:
|
||||||
|
imapsync ... ^
|
||||||
|
--host2 exchange-server ^
|
||||||
|
--user2 "windows-domain\admin-user\aaaa" ^
|
||||||
|
--password2 admin-password ...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. How to migrate from or to Office 365 with an admin/authuser account?
|
||||||
|
|
||||||
|
Note from Yago Torres Fernandez:
|
||||||
|
(a working command using admin/authuser on host2 Office 365)
|
||||||
|
|
||||||
|
imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated@domain.com ^
|
||||||
|
--password2 XXXX --ssl2 --exclude "Shared Folders" ^
|
||||||
|
--regextrans2 "s#Trash$#Papelera#" --regextrans2 "s#^Deleted Items$#Papelera#"
|
||||||
|
|
||||||
|
but previous in Office365 you must do something like that, using powershell:
|
||||||
|
|
||||||
|
Add-MailboxPermission -identity user_to_be_migrated@domain.com -user user_admin@domain.com -accessrights fullaccess -inheritancetype all
|
||||||
|
|
||||||
|
PLAIN authentication is the only way to go with --authuser1 for now.
|
||||||
|
So don't use --authmech1 SOMETHING with --authuser1 admin_user,
|
||||||
|
it will not work.
|
||||||
|
Same behavior with the --authuser2 option.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. How to migrate from or to Exchange 2003 with an admin/authuser
|
||||||
|
account?
|
||||||
|
|
||||||
|
R. Thomas Edgar wrote the following
|
||||||
|
|
||||||
|
In case you can glean something from this snippet which allowed us
|
||||||
|
to migrate from Exchange 2003 t0 Cyrus Imap 2.4 (you would reverse
|
||||||
|
the flow to go the other way):
|
||||||
|
|
||||||
|
imapsync --dry --host1 ExchangeServer.mycompany.com \
|
||||||
|
--user1 Some.User@mycompany.com --authuser1 ExchangeAdminAccount \
|
||||||
|
--proxyauth1 --password1 '$pass_with_dollars$' \
|
||||||
|
--host2 cyrusimapbackend.mycompany.com \
|
||||||
|
--user2 SameOrDiffererentUser@mycompany.com \
|
||||||
|
--authuser2 CyrusAdminAccount --password2 CyrusAdminPassword
|
||||||
|
|
||||||
|
We also needed to:
|
||||||
|
|
||||||
|
- Ensure the Exchange Admin Acct had IMAP4 enabled in it's
|
||||||
|
profile (it initially didn't!)
|
||||||
|
- Ensure the Some.User Exchange Acct had IMAP4 enabled
|
||||||
|
in it's profile (it initially didn't!)
|
||||||
|
- Add the CyrusAdminAccount to admins line in /etc/imapd.conf
|
||||||
|
- Give CyrusAdminAccount lrswipkxtecda to the Cyrus Imap account
|
||||||
|
being migrated to (- or in your case, from)
|
||||||
|
|
||||||
|
In case you are not aware:
|
||||||
|
|
||||||
|
- It will prompt for a password if you don't supply it
|
||||||
|
- the domain part of the fully-qualified email could be
|
||||||
|
omitted in our case
|
||||||
|
- Use --debugimap when testing initial connectivity, if necessary
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Couldn't create folder [trash] from [INBOX.trash]:
|
||||||
|
588 NO Mailbox already exists.
|
||||||
|
|
||||||
|
R. Some servers take care about character case in folder names,
|
||||||
|
some servers do not, like Exchange. Since non-respecting case
|
||||||
|
can merge two different folders into one then imapsync respects case.
|
||||||
|
|
||||||
|
For example, if a host1 server has a folder name called "trash"
|
||||||
|
and the host2 server already has a folder "Trash" or "TRASH"
|
||||||
|
then imapsync will try to create the folder "trash" on host2,
|
||||||
|
because trash and Trash are different strings. But if host2
|
||||||
|
does not respect character case it will consider folder "trash"
|
||||||
|
already exists and will say it, that's the error message
|
||||||
|
reported by imapsync: "Mailbox already exists", message coming
|
||||||
|
from the server.
|
||||||
|
|
||||||
|
The folder creation fails but messages are well transferred in
|
||||||
|
so take a look at this warning, understand why it happens
|
||||||
|
and it should be fine most of the time.
|
||||||
|
|
||||||
|
To avoid this warning use --regextrans2 to map the folder names
|
||||||
|
|
||||||
|
imapsync ... --regextrans2 "s/^trash$/Trash/"
|
||||||
|
|
||||||
|
If there are two folders Trash and trash on host1 then both
|
||||||
|
will be merge into only one Trash folder on host2.
|
||||||
|
In case option --delete2 is used the regextans2 above becomes
|
||||||
|
mandatory, otherwise imapsync will sync messages from the
|
||||||
|
first Trash and then delete them when syncing trash.
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. Migrating to Exchange 201O, messages get date of the transfer,
|
||||||
|
this is bad for sorting and listing.
|
||||||
|
|
||||||
|
R1. Be sure to have at least Exchange 2010 SP2 Rollup 5
|
||||||
|
http://www.tribalchicken.com.au/15-technical/29-imapsync-exchange2010
|
||||||
|
|
||||||
|
R2. See also the Outlook side (thanks to Martin Hochreiter for this solution)
|
||||||
|
http://www.howto-outlook.com/faq/archivenotworking.htm
|
||||||
|
by changing Archive to sent/receive date
|
||||||
|
|
||||||
|
It's often shorter to change one server than thousands clients
|
||||||
|
so R1 might be easier to do.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. From any to Exchange2007
|
||||||
|
|
||||||
|
Several problems:
|
||||||
|
- Big messages: increase the "send- and receive-connector"
|
||||||
|
in exchange2007 to 40 MB.
|
||||||
|
|
||||||
|
R. 2 solutions
|
||||||
|
|
||||||
|
R1. With imapsync (only partial success)
|
||||||
|
--skipheader 'Received' \
|
||||||
|
--regexmess 's{\A(.*?(?!^$))^Date:(.*?)$}{$1Date:$2\nReceived: From; $2}gxms'
|
||||||
|
Any user having time to spend to debug Exchange2007 with imapsync
|
||||||
|
is welcome.
|
||||||
|
|
||||||
|
R2. Other solution
|
||||||
|
Two users succeeded by using "MS Transporter Suite" (which is closed
|
||||||
|
expensive non-free software).
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Q. From Microsoft Exchange 2000 IMAP4rev1 server version 6.0.6487.0.
|
||||||
|
|
||||||
|
R. imapsync ... \
|
||||||
|
--prefix1 INBOX.
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
261
FAQ.d/FAQ.Gmail.txt
Executable file
261
FAQ.d/FAQ.Gmail.txt
Executable file
|
@ -0,0 +1,261 @@
|
||||||
|
#!/bin/cat
|
||||||
|
$Id: FAQ.Gmail.txt,v 1.1 2015/03/26 08:12:20 gilles Exp gilles $
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Imapsync with Gmail
|
||||||
|
======================================================================
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Synchronizing from XXX to Gmail
|
||||||
|
|
||||||
|
R. There are some details to get the special [Gmail] sub-folders
|
||||||
|
right. Here's an example of migrating an old "Sent" folder to
|
||||||
|
Gmail's structure:
|
||||||
|
|
||||||
|
imapsync --host1 mail.oldhost.com \
|
||||||
|
--user1 my_email@oldhost.com \
|
||||||
|
--password1 password \
|
||||||
|
--host2 imap.gmail.com \
|
||||||
|
--user2 my_email@gmail.com \
|
||||||
|
--password2 password \
|
||||||
|
--ssl2 \
|
||||||
|
--exitwhenover 500000000 \
|
||||||
|
--maxsize 25000000 \
|
||||||
|
--expunge1 \
|
||||||
|
--addheader \
|
||||||
|
--exclude "\[Gmail\]$" \
|
||||||
|
--regextrans2 "s/[ ]+/_/g" \
|
||||||
|
--regextrans2 "s/[\^]/_/g" \
|
||||||
|
--regextrans2 "s/['\"\\\\]/_/g" \
|
||||||
|
--regextrans2 "s,^Sent$,[Gmail]/Sent Mail,"
|
||||||
|
|
||||||
|
Explanations:
|
||||||
|
|
||||||
|
--ssl2 is mandatory since Gmail only supports imap ssl connections.
|
||||||
|
|
||||||
|
--exitwhenover 500000000 option is here to avoid locking when
|
||||||
|
transfers exceed maximum limit.
|
||||||
|
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
|
||||||
|
--exitwhenover is not mandatory in the sense you may be able to
|
||||||
|
use an upper value than 500 MB without disconnections; I don't
|
||||||
|
know the hard value, it seems to vary, so just have some tries
|
||||||
|
and report me what you discover in case you detect something.
|
||||||
|
|
||||||
|
--maxsize 25000000 is mandatory since Gmail limits messages size
|
||||||
|
up to 25 MB. This value increases over time, it was 10 MB some
|
||||||
|
years ago so you can try higher values. The Gmail page about
|
||||||
|
this limit is https://support.google.com/mail/answer/6584
|
||||||
|
|
||||||
|
--expunge1 is optional. It deletes messages marked \Deleted on host1.
|
||||||
|
Imapsync syncs messages with all their flags, Gmail takes the messages
|
||||||
|
marked \Deleted but deletes or moves them just after.
|
||||||
|
Option --expunge1 really removes messages marked \Deleted on host1
|
||||||
|
so they are not synced at all.
|
||||||
|
|
||||||
|
|
||||||
|
The --addheader option is there because "Sent" folder messages
|
||||||
|
sometimes lack the "Message-Id:" and "Received:" headers needed
|
||||||
|
by imapsync to identify messages (only when --useuid is not used).
|
||||||
|
So option --addheader adds a "Message-Id" header consisting of
|
||||||
|
the imap UID of the message on the host1 folder, like
|
||||||
|
"Message-Id: 12345@imapsync".
|
||||||
|
|
||||||
|
--exclude "\[Gmail\]$" is there to avoid a small examine/select error:
|
||||||
|
"Could not examine: 43 NO [NONEXISTENT] Unknown Mailbox: [Gmail]
|
||||||
|
(now in authenticated state) (Failure)".
|
||||||
|
|
||||||
|
--regextrans2 "s/[ ]+/_/g" is there to convert blank characters not
|
||||||
|
accepted by gmail to character _ underscore. In fact only leading
|
||||||
|
and trailing blank characters are problems with gmail, and
|
||||||
|
also successive blanks ending with the IMAP error
|
||||||
|
"NO [CANNOT] Folder contains excess whitespace (Failure)"
|
||||||
|
If you want to change only leading and trailing blank characters
|
||||||
|
then use instead:
|
||||||
|
--regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g"
|
||||||
|
|
||||||
|
On Windows, in the previous example containing \$1 you have to
|
||||||
|
replace the two \$1 by $1 (remove the \ before $1).
|
||||||
|
|
||||||
|
--regextrans2 "s/[\^]/_/g" is mandatory. It converts, since
|
||||||
|
not accepted by gmail, character ^ to character _ underscore.
|
||||||
|
|
||||||
|
--regextrans2 "s/['\"\\\\]/_/g" is optional. It converts
|
||||||
|
characters ' or " or \ to character _ underscore.
|
||||||
|
|
||||||
|
--regextrans2 "s,^Sent$,[Gmail]/Sent Mail," is to transform the
|
||||||
|
folder name "Sent" and adapt it to Gmail "Sent Mail" folder.
|
||||||
|
If you're using a different language in Gmail you might adapt
|
||||||
|
this example with the folder name translated, an example in French:
|
||||||
|
|
||||||
|
imapsync ...
|
||||||
|
--regextrans2 "s,^Messages envoy&AOk-s$,[Gmail]/Messages envoy&AOk-s," \
|
||||||
|
|
||||||
|
|
||||||
|
You can add --folder "INBOX.Sent" in the example in case
|
||||||
|
you want to sync only the "Sent" folder.
|
||||||
|
|
||||||
|
You can select folders exported to imap within the gmail preferences,
|
||||||
|
unselect some "System labels", depending on your needs.
|
||||||
|
|
||||||
|
The "All Mail" archive pseudo-folder should be updated automatically.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Some of the folders are getting created with [IMAP] prefix on Google
|
||||||
|
side. How to stop creating folder with this prefix?
|
||||||
|
Any switch we can use? e.g. [IMAP]/Archive
|
||||||
|
|
||||||
|
R. No switch in imapsync since [IMAP]/ prefix is done by Gmail,
|
||||||
|
it might be configurable with Gmail parameters.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Synchronizing from Gmail to XXX
|
||||||
|
|
||||||
|
R. Gmail needs SSL
|
||||||
|
|
||||||
|
./imapsync \
|
||||||
|
--host1 imap.gmail.com \
|
||||||
|
--user1 gilles.lamiral@gmail.com \
|
||||||
|
--password1 gmailsecret \
|
||||||
|
--host2 localhost
|
||||||
|
--user2 tata \
|
||||||
|
--password2 tatasecret \
|
||||||
|
--ssl1 \
|
||||||
|
--exitwhenover 2500000000 \
|
||||||
|
--useheader="X-Gmail-Received" \
|
||||||
|
--useheader "Message-Id" \
|
||||||
|
--skipcrossduplicates \
|
||||||
|
--folderfirst "Work" \
|
||||||
|
--folderfirst "Friends" \
|
||||||
|
--folderlast "CanWait" \
|
||||||
|
--folderlast "[Gmail]/All Mail"
|
||||||
|
|
||||||
|
|
||||||
|
Explanations:
|
||||||
|
|
||||||
|
--ssl1 is mandatory since Gmail only supports imap ssl connections.
|
||||||
|
|
||||||
|
--exitwhenover 2500000000 option is here to avoid locking when
|
||||||
|
transfers exceed maximum limit.
|
||||||
|
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
|
||||||
|
--exitwhenover is not mandatory in the sense you may be able to
|
||||||
|
use an upper value than 2.5 GB without disconnections; I don't
|
||||||
|
know the hard value, it seems to vary, so just have some tries
|
||||||
|
and report me what you discover in case you detect something.
|
||||||
|
|
||||||
|
--useheader="X-Gmail-Received" --useheader "Message-Id" are not
|
||||||
|
mandatory. I use them because I found (several years ago, it may
|
||||||
|
have changed) that Gmail always adds a different header
|
||||||
|
"X-Gmail-Received:" to all messages it gets. So the identification
|
||||||
|
by imapsync can not fail using this header. "Message-Id" is there
|
||||||
|
for safety about this Gmail rule.
|
||||||
|
|
||||||
|
|
||||||
|
If your destination imap server doesn't like "[Gmail]" name, just add
|
||||||
|
option:
|
||||||
|
--regextrans2 's/\[Gmail\]/Gmail/'
|
||||||
|
|
||||||
|
You can select folders exported to imap within the gmail preferences,
|
||||||
|
for example you may unselect all "System labels".
|
||||||
|
|
||||||
|
--exitwhenover option is here to avoid locking when transfers
|
||||||
|
exceed maximum limit.
|
||||||
|
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
|
||||||
|
|
||||||
|
--skipcrossduplicates is optional but it can save Gigabytes of hard
|
||||||
|
disk memory. Within imap protocol, Gmail presents Gmail labels as
|
||||||
|
folders, so a message labeled "Work" "ProjectX" "Urgent" ends up
|
||||||
|
in three different imap folders "Work" "ProjectX" and "Urgent"
|
||||||
|
after an imap sync. --skipcrossduplicates prevent this behavior.
|
||||||
|
|
||||||
|
An issue with --skipcrossduplicates is that the first label synced
|
||||||
|
by imapsync goes to its corresponding folder and other labels are
|
||||||
|
ignored. This way, at least you can choose what labels have the
|
||||||
|
priority by using the --folderfirst option. For example
|
||||||
|
--folderfirst "Work" will sync messages labeled "Work" before
|
||||||
|
messages labeled "CanWait" or "Urgent". By default imapsync
|
||||||
|
syncs folders (Gmail labels) using the classical alphanumeric order.
|
||||||
|
|
||||||
|
--folderlast "CanWait" will sync only messages that have the
|
||||||
|
label CanWait and only it.
|
||||||
|
|
||||||
|
--folderlast "[Gmail]/All Mail", in conjunction with option
|
||||||
|
--skipcrossduplicates, will only put in "[Gmail]/All Mail"
|
||||||
|
the messages that are not labeled at all.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Gmail does not really delete messages in folder [Gmail]/All Mail
|
||||||
|
What happens? What can I do?
|
||||||
|
|
||||||
|
R. It's true and explained in Gmail documentation at
|
||||||
|
https://support.google.com/mail/answer/78755?hl=en
|
||||||
|
|
||||||
|
To really remove messages in folder "[Gmail]/All Mail", they have to
|
||||||
|
be moved to the "Trash" folder and be deleted from "Trash".
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Does imapsync have the capability to do 2 stage authentication for google.
|
||||||
|
|
||||||
|
R. No, imapsync doesn't support 2 stage authentication.
|
||||||
|
Reading https://support.google.com/mail/answer/1173270?hl=en
|
||||||
|
it looks like it can't because imapsync uses imap protocol.
|
||||||
|
|
||||||
|
So you have to follow the Google recommendation and generate an
|
||||||
|
application-specific password or normal authentication or XOAUTH.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. Is XOAUTH2 authentication available with imapsync?
|
||||||
|
|
||||||
|
R. Yes but only on Unix systems and not really well documented. See
|
||||||
|
* http://www.linux-france.org/prj/imapsync_list/msg02129.html
|
||||||
|
* https://github.com/imapsync/imapsync/pull/25/files
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
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
|
||||||
|
|
||||||
|
R. Take a look at:
|
||||||
|
http://www.linux-france.org/prj/imapsync_list/msg00639.html
|
||||||
|
|
||||||
|
http://biasecurities.com/blog/2009/migrate-email-from-gmail-to-google-apps/
|
||||||
|
http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration/
|
||||||
|
|
98
FAQ.d/FAQ.Massive.txt
Executable file
98
FAQ.d/FAQ.Massive.txt
Executable file
|
@ -0,0 +1,98 @@
|
||||||
|
#!/bin/cat
|
||||||
|
$Id: FAQ.Massive.txt,v 1.1 2015/03/26 05:06:27 gilles Exp gilles $
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
Imapsync for massive migrations
|
||||||
|
======================================================================
|
||||||
|
|
||||||
|
Questions answered here are:
|
||||||
|
|
||||||
|
Q. I need to migrate hundred accounts, how can I do?
|
||||||
|
Q. I have to migrate 500k users using 400 TB of disk space.
|
||||||
|
How do I proceed?
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. I need to migrate hundred accounts, how can I do?
|
||||||
|
|
||||||
|
R. If you have many mailboxes to migrate think about a little
|
||||||
|
shell program. Write a file called file.txt (for example)
|
||||||
|
containing users and passwords.
|
||||||
|
The separator used in this example is ";"
|
||||||
|
|
||||||
|
The file.txt file contains:
|
||||||
|
|
||||||
|
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
|
||||||
|
...
|
||||||
|
|
||||||
|
On Unix the shell program can be:
|
||||||
|
|
||||||
|
{ 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.txt
|
||||||
|
|
||||||
|
Here is a complete Unix example nearly ready to use:
|
||||||
|
http://imapsync.lamiral.info/examples/sync_loop_unix.sh
|
||||||
|
|
||||||
|
|
||||||
|
On Windows the batch program can be:
|
||||||
|
|
||||||
|
FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) 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.
|
||||||
|
|
||||||
|
Here is a complete Windows example nearly ready to use:
|
||||||
|
http://imapsync.lamiral.info/examples/sync_loop_windows.bat
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
Q. I have to migrate 500k users using 400 TB of disk space.
|
||||||
|
How do I proceed?
|
||||||
|
|
||||||
|
R. Solution to this issue is two words: parallelism and measurements.
|
||||||
|
Since all 500k mailboxes are independent against each other,
|
||||||
|
they can be processed independently.
|
||||||
|
|
||||||
|
500k on 400TB is 800 MB per account on average.
|
||||||
|
|
||||||
|
No one knows in advance what is the first bottleneck. The first
|
||||||
|
bottleneck has to be determined, by measurements, not by guesses.
|
||||||
|
Once this first bottleneck is known and overcome then the next
|
||||||
|
bottleneck has to be determined and overcome too, if needed. Repeat
|
||||||
|
the process of looking for the next bottleneck and its resolution
|
||||||
|
until you estimate the transfer rates, money costs and final dates are
|
||||||
|
good enough to proceed the whole 500k/400TB migration.
|
||||||
|
|
||||||
|
Possible bottlenecks:
|
||||||
|
|
||||||
|
- IMAP servers have artificial limits. For example Gmail and Office365
|
||||||
|
have throttle limits.
|
||||||
|
|
||||||
|
- Bandwidth, on any side, especially on small Internet connexions. But
|
||||||
|
usually bandwidth is not a bottleneck.
|
||||||
|
|
||||||
|
- Memory, on any side. Monitor your system doesn't swap on disk.
|
||||||
|
|
||||||
|
- CPU, on any side. When measuring that CPU is always 100% during a
|
||||||
|
transfer then it's useless to add imapsync processus on that host.
|
||||||
|
|
||||||
|
- I/O on disks. A classical one always forgotten. Unlike CPU and RAM
|
||||||
|
Input/Output performances don't improve very much as time goes on.
|
||||||
|
|
||||||
|
- Number of hosts available to run imapsync processes.
|
||||||
|
- Imapsync itself.
|
||||||
|
- Errors management.
|
||||||
|
- MX domains, DNS.
|
||||||
|
- Money.
|
||||||
|
- Time.
|
||||||
|
- Bad luck.
|
||||||
|
- ...
|
||||||
|
|
288
INSTALL
288
INSTALL
|
@ -1,6 +1,6 @@
|
||||||
# $Id: INSTALL,v 1.40 2014/11/14 17:07:21 gilles Exp gilles $
|
# $Id: INSTALL,v 1.47 2015/03/16 16:36:10 gilles Exp gilles $
|
||||||
#
|
#
|
||||||
# INSTALL file for imapsync
|
# This is the main INSTALL file for imapsync.
|
||||||
# imapsync : IMAP sync and migrate tool.
|
# imapsync : IMAP sync and migrate tool.
|
||||||
|
|
||||||
INTRODUCTION
|
INTRODUCTION
|
||||||
|
@ -9,189 +9,165 @@ INTRODUCTION
|
||||||
imapsync works fine under any operating system with Perl and Perl modules (listed below).
|
imapsync works fine under any operating system with Perl and Perl modules (listed below).
|
||||||
imapsync.exe works fine standalone under Windows XP, Vista, Seven, 20XX, either 32 or 64bit.
|
imapsync.exe works fine standalone under Windows XP, Vista, Seven, 20XX, either 32 or 64bit.
|
||||||
|
|
||||||
WINDOWS
|
====================================
|
||||||
=======
|
== Installing imapsync on WINDOWS ==
|
||||||
|
====================================
|
||||||
|
|
||||||
Read the file README_Windows.txt
|
Read the file README_Windows.txt
|
||||||
|
Also available at
|
||||||
UNIX
|
http://imapsync.lamiral.info/README_Windows.txt
|
||||||
====
|
|
||||||
|
|
||||||
This section doesn't concern Windows imapsync.exe users.
|
|
||||||
|
|
||||||
Purchase imapsync at
|
|
||||||
http://imapsync.lamiral.info/
|
|
||||||
You'll have access to a compressed tarball called imapsync-x.xx.tgz
|
|
||||||
where x.xx is the version number. Untar the tarball where
|
|
||||||
you want (on Unix):
|
|
||||||
|
|
||||||
tar xzvf imapsync-x.xx.tgz
|
|
||||||
|
|
||||||
Go into the directory imapsync-x.xx and read the INSTALL file.
|
|
||||||
You're already reading the INSTALL file.
|
|
||||||
|
|
||||||
|
|
||||||
You need :
|
=================================
|
||||||
- Perl
|
== Installing imapsync on Unix ==
|
||||||
try : perl -v
|
=================================
|
||||||
|
|
||||||
Get Perl here:
|
There are specific INSTALL files in the imapsync directory INSTALL.d/
|
||||||
http://www.perl.org/
|
also available at http://imapsync.lamiral.info/INSTALL.d/
|
||||||
|
|
||||||
- Some perl modules. To verify in one command that you have
|
- Mac OS X
|
||||||
all needed modules, just run:
|
- FreeBSD
|
||||||
|
- CentOS
|
||||||
|
- CPanel
|
||||||
|
- Debian
|
||||||
|
- Ubuntu
|
||||||
|
- Mandriva
|
||||||
|
|
||||||
perl -c imapsync
|
If you are not on one of these systems then read the section
|
||||||
|
below called "Installing imapsync on other Unixes".
|
||||||
|
|
||||||
The good answer is "imapsync syntax OK".
|
=====================================
|
||||||
Any other output will list the missing modules in the
|
== Installing imapsync on Mac OS X ==
|
||||||
Perl paths (it then talks about @INC variable).
|
=====================================
|
||||||
|
|
||||||
Here is some individual module help:
|
Not easy.
|
||||||
|
Read the file INSTALL.d/INSTALL.Darwin.txt
|
||||||
|
Also available at
|
||||||
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.Darwin.txt
|
||||||
|
|
||||||
- To check if your system has Perl Mail::IMAPClient module
|
=====================================
|
||||||
try :
|
== Installing imapsync on FreeBSD ==
|
||||||
|
=====================================
|
||||||
|
|
||||||
perl -mMail::IMAPClient -e ''
|
Easy.
|
||||||
|
Read the file INSTALL.d/INSTALL.FreeBSD.txt
|
||||||
It should print nothing, nothing printed means Mail::IMAPClient
|
Also available at
|
||||||
is already installed on your system.
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.FreeBSD.txt
|
||||||
|
|
||||||
If the module Mail::IMAPClient is not on the system,
|
|
||||||
you can use a copy included in the imapsync tarball
|
|
||||||
or get the latest Mail::IMAPClient module here:
|
|
||||||
http://search.cpan.org/dist/Mail-IMAPClient/
|
|
||||||
|
|
||||||
I use always the latest Mail-IMAPClient-3.xx
|
|
||||||
To know the version you have on your system try :
|
|
||||||
|
|
||||||
perl -mMail::IMAPClient -e 'print $Mail::IMAPClient::VERSION, "\n"'
|
|
||||||
|
|
||||||
New Mail-IMAPClient-3.xx works very well with imapsync,
|
|
||||||
Use at least Mail-IMAPClient-3.25 (previous releases may bug).
|
|
||||||
Do not hesitate to use latest Mail-IMAPClient-3.xx
|
|
||||||
(3.xx >= 3.35 at the time of this writing)
|
|
||||||
|
|
||||||
Look at the shell script named "i3" in the tarball, it can be used to
|
|
||||||
run imapsync with included Mail-IMAPClient-3.35/ wherever you
|
|
||||||
unpacked the imapsync tarball.
|
|
||||||
|
|
||||||
Test all Perl modules dependency in one command:
|
|
||||||
|
|
||||||
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL \
|
|
||||||
-mDigest::HMAC_MD5 -mAuthen::NTLM -e -mTime::HiRes \
|
|
||||||
-mData::Uniqid -mURI::Escape -mFile::Copy::Recursive -mIO::Tee \
|
|
||||||
-mUnicode::String ""
|
|
||||||
|
|
||||||
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 Term::ReadKey"
|
|
||||||
perl -MCPAN -e "install IO::Socket::SSL"
|
|
||||||
perl -MCPAN -e "install Digest::HMAC_MD5"
|
|
||||||
perl -MCPAN -e "install URI::Escape"
|
|
||||||
perl -MCPAN -e "install File::Copy::Recursive"
|
|
||||||
perl -MCPAN -e "install IO::Tee"
|
|
||||||
perl -MCPAN -e "install Unicode::String"
|
|
||||||
|
|
||||||
perl -MCPAN -e "install Data::Uniqid"
|
|
||||||
perl -MCPAN -e "install Authen::NTLM"
|
|
||||||
|
|
||||||
|
|
||||||
You can also install them easily by using the standard install
|
|
||||||
command on your system if the packages have been made on it.
|
|
||||||
Doing so you may not have the latest release but most of the time
|
|
||||||
it doesn't care.
|
|
||||||
|
|
||||||
Modules
|
===================================
|
||||||
Authen::NTLM
|
== Installing imapsync on CentOS ==
|
||||||
Data::Uniqid
|
===================================
|
||||||
may be not available in the distribution way since I haven't find them
|
|
||||||
on Ubuntu nor on Mandriva but Centos supports them.
|
|
||||||
|
|
||||||
On Debian/Ubuntu:
|
Easy.
|
||||||
|
Read the file INSTALL.d/INSTALL.Centos.txt
|
||||||
aptitude install libmail-imapclient-perl # Mail::IMAPClient
|
Also available at
|
||||||
aptitude install libterm-readkey-perl # Term::ReadKey
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
|
||||||
aptitude install libio-socket-ssl-perl # IO::Socket::SSL
|
|
||||||
aptitude install libdigest-hmac-perl # Digest::HMAC_MD5 Digest::HMAC_SHA1
|
|
||||||
aptitude install liburi-perl # URI::Escape
|
|
||||||
aptitude install libfile-copy-recursive-perl # File::Copy::Recursive
|
|
||||||
aptitude install libio-tee-perl # IO::Tee
|
|
||||||
aptitude install libunicode-string-perl # Unicode::String
|
|
||||||
|
|
||||||
On Ubuntu 14 (thanks to http://www.jverdeyen.be/ubuntu/imapsync-on-ubuntu/):
|
|
||||||
|
|
||||||
sudo apt-get install makepasswd rcs perl-doc libio-tee-perl git
|
|
||||||
sudo apt-get install libmail-imapclient-perl libdigest-md5-file-perl
|
|
||||||
sudo apt-get install libterm-readkey-perl libfile-copy-recursive-perl
|
|
||||||
sudo apt-get install libunicode-string-perl
|
|
||||||
|
|
||||||
On Mandriva:
|
|
||||||
|
|
||||||
urpmi perl-Mail-IMAPClient # Mail::IMAPClient
|
|
||||||
urpmi perl-Term-ReadKey # Term::ReadKey
|
|
||||||
urpmi perl-IO-Socket-SSL # IO::Socket::SSL
|
|
||||||
urpmi perl-Digest-HMAC # Digest::HMAC_MD5 Digest::HMAC_SHA1
|
|
||||||
urpmi perl-URI # URI::Escape
|
|
||||||
urpmi perl-File-Copy-Recursive # File::Copy::Recursive
|
|
||||||
urpmi perl-IO-Tee # IO::Tee
|
|
||||||
urpmi perl-Unicode-String # Unicode::String
|
|
||||||
|
|
||||||
On CentOS (thanks to Ralf Hauber)
|
|
||||||
|
|
||||||
Install RPM Repository: Fedora Epel
|
|
||||||
|
|
||||||
See http://pkgs.org/centos-6-rhel-6/epel-i386/perl-Data-Uniqid-0.12-2.el6.noarch.rpm.html
|
|
||||||
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
|
|
||||||
rpm -Uvh epel-release*rpm
|
|
||||||
|
|
||||||
yum install perl-Mail-IMAPClient # Mail::IMAPClient
|
|
||||||
yum install "perl(Term::ReadKey)" # Term::ReadKey
|
|
||||||
yum install "perl(Authen::NTLM)" # Authen::NTLM
|
|
||||||
yum install perl-Data-Uniqid # Data::Uniqid
|
|
||||||
yum install perl-File-Copy-Recursive # File::Copy::Recursive
|
|
||||||
yum install perl-IO-Tee # IO::Tee
|
|
||||||
yum install perl-Unicode-String # Unicode::String
|
|
||||||
|
|
||||||
|
|
||||||
INSTALLING on Unix
|
===================================
|
||||||
------------------
|
== Installing imapsync on CPanel ==
|
||||||
|
===================================
|
||||||
|
|
||||||
To see what will be done, just run (you need the make command):
|
Easy.
|
||||||
|
Read the file INSTALL.d/INSTALL.CPanel.txt
|
||||||
|
Also available at
|
||||||
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.CPanel.txt
|
||||||
|
|
||||||
make -n install
|
|
||||||
|
|
||||||
To install imapsync in /usr/bin/ and man page in /usr/share/man/man1/, just run (as root):
|
==========================================
|
||||||
|
== Installing imapsync on Debian 6 or 7 ==
|
||||||
|
==========================================
|
||||||
|
|
||||||
make install
|
Not easy.
|
||||||
|
See the file INSTALL.d/INSTALL.Debian.txt
|
||||||
|
Also available at
|
||||||
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt
|
||||||
|
|
||||||
or copy the file imapsync where you want it to be.
|
============================================
|
||||||
For example:
|
== Installing imapsync on Ubuntu 12 or 14 ==
|
||||||
|
============================================
|
||||||
|
|
||||||
cp imapsync /usr/bin/
|
Not easy.
|
||||||
|
See the file INSTALL.d/INSTALL.Ubuntu.txt
|
||||||
|
Also available at
|
||||||
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.Ubuntu.txt
|
||||||
|
|
||||||
TESTING on Unix
|
=====================================
|
||||||
---------------
|
== Installing imapsync on Mandriva ==
|
||||||
|
=====================================
|
||||||
|
|
||||||
Tests will break as they are home specific.
|
See the file INSTALL.d/INSTALL.Mandriva.txt
|
||||||
You need a running imap server on localhost with several accounts
|
Also available at
|
||||||
toto with a password located in the file $HOME/var/pass/secret.toto
|
http://imapsync.lamiral.info/INSTALL.d/INSTALL.Mandriva.txt
|
||||||
titi with a password located in the file $HOME/var/pass/secret.titi
|
|
||||||
tata with a password located in the file $HOME/var/pass/secret.tata
|
|
||||||
|
|
||||||
Of course, you can change the file tests.sh and run tests with:
|
|
||||||
|
|
||||||
sh -x tests.sh
|
=========================================
|
||||||
|
== Installing imapsync on other Unixes ==
|
||||||
|
=========================================
|
||||||
|
|
||||||
Specific tests can be run by using them as argument to tests.sh:
|
|
||||||
|
|
||||||
sh -x tests.sh ll_ssl_justconnect ll_bad_host ...
|
Purchase imapsync at
|
||||||
|
http://imapsync.lamiral.info/
|
||||||
|
You'll have access to a compressed tarball called imapsync-x.xxx.tgz
|
||||||
|
where x.xxx is the version number. Untar the tarball where
|
||||||
|
you want:
|
||||||
|
|
||||||
The tests.sh script break on first failure ("set -e" directive).
|
tar xzvf imapsync-x.xxx.tgz
|
||||||
|
|
||||||
|
Go into the directory imapsync-x.xxx
|
||||||
|
|
||||||
|
cd imapsync-x.xxx
|
||||||
|
|
||||||
|
You can easily detect any missing Perl modules via the
|
||||||
|
script prerequisites_imapsync located in the INSTALL.d directory:
|
||||||
|
|
||||||
|
sh INSTALL.d/prerequisites_imapsync
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
cd INSTALL.d/
|
||||||
|
sh prerequisites_imapsync
|
||||||
|
|
||||||
|
You don't need to be root to run the previous command. You have
|
||||||
|
to be root if you want the Perl modules to be available for the
|
||||||
|
whole system, for all users.
|
||||||
|
|
||||||
|
You may be in one of following cases:
|
||||||
|
- you are not root.
|
||||||
|
- you are in a environment where modifying system Perl
|
||||||
|
modules can break other things or where you're not allowed to
|
||||||
|
change the whole system.
|
||||||
|
|
||||||
|
In the previous cases, you have to reinit cpan in order to use
|
||||||
|
your local account:
|
||||||
|
|
||||||
|
perl -MCPAN -e shell
|
||||||
|
# then inside the cpan shell type "o conf init"
|
||||||
|
cpan> o conf init
|
||||||
|
cpan> exit
|
||||||
|
# finally source your modified local bashrc
|
||||||
|
. $HOME/.bashrc
|
||||||
|
|
||||||
|
Run again prerequisites_imapsync
|
||||||
|
|
||||||
|
sh INSTALL.d/prerequisites_imapsync
|
||||||
|
|
||||||
|
Run the "cpan -i" command with the missing Perl modules as arguments.
|
||||||
|
For example it can be:
|
||||||
|
|
||||||
|
cpan -i Authen::NTLM Data::Uniqid File::Copy::Recursive IO::Tee Mail::IMAPClient Unicode::String
|
||||||
|
|
||||||
|
Once you've run the "cpan -i" command, you can rerun "sh prerequisites_imapsync"
|
||||||
|
to verify everything is ok:
|
||||||
|
|
||||||
|
sh prerequisites_imapsync
|
||||||
|
|
||||||
|
When everything is ok the script execution ends with this sentence
|
||||||
|
"All needed modules are already installed"
|
||||||
|
|
||||||
|
Now imapsync should work on your system.
|
||||||
|
|
||||||
|
|
||||||
Since I added more tests you also need a remote imap server see the
|
|
||||||
file tests.sh and help yourself. No time to make a universal test
|
|
||||||
file.
|
|
||||||
|
|
||||||
|
|
24
INSTALL.d/INSTALL.CPanel.txt
Normal file
24
INSTALL.d/INSTALL.CPanel.txt
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
=================================
|
||||||
|
= Installing imapsync on CPanel =
|
||||||
|
=================================
|
||||||
|
|
||||||
|
============
|
||||||
|
== CPanel ==
|
||||||
|
============
|
||||||
|
|
||||||
|
This procedure has been tested on cPanel 11.36 (64 bits).
|
||||||
|
It should be the same for any Cpanel distribution based on Centos.
|
||||||
|
|
||||||
|
First install access to the Epel repository via yum:
|
||||||
|
|
||||||
|
yum install epel-release
|
||||||
|
|
||||||
|
Then install imapsync and its dependencies:
|
||||||
|
|
||||||
|
yum install imapsync
|
||||||
|
|
||||||
|
|
||||||
|
After installing imapsync, it should be able to work on your system.
|
||||||
|
A good test that shows also the basic example:
|
||||||
|
|
||||||
|
imapsync
|
51
INSTALL.d/INSTALL.Centos
Normal file
51
INSTALL.d/INSTALL.Centos
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
=================================
|
||||||
|
= Installing imapsync on CentOS =
|
||||||
|
=================================
|
||||||
|
|
||||||
|
There is one section for Centos 7 and one for Centos 6.
|
||||||
|
|
||||||
|
==============
|
||||||
|
== Centos 7 ==
|
||||||
|
==============
|
||||||
|
|
||||||
|
First install access to the Epel repository via yum:
|
||||||
|
|
||||||
|
yum install epel-release
|
||||||
|
|
||||||
|
Then install imapsync and its dependencies:
|
||||||
|
|
||||||
|
yum install imapsync
|
||||||
|
|
||||||
|
After installing imapsync, it should be able to work on your system.
|
||||||
|
A good test that shows also the basic example:
|
||||||
|
|
||||||
|
imapsync
|
||||||
|
|
||||||
|
|
||||||
|
==============
|
||||||
|
== Centos 6 ==
|
||||||
|
==============
|
||||||
|
|
||||||
|
This section has not been tested with latest imapsync releases (2014 and after)
|
||||||
|
so it can fail. In case it happens, just write me at gilles.lamiral@laposte.net
|
||||||
|
and we will fix it together.
|
||||||
|
|
||||||
|
First, install access to the Epel repository
|
||||||
|
|
||||||
|
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
|
||||||
|
rpm -Uvh epel-release-6-8.noarch.rpm
|
||||||
|
|
||||||
|
Then install all other packages via yum:
|
||||||
|
|
||||||
|
yum install \
|
||||||
|
perl-Mail-IMAPClient \
|
||||||
|
"perl(Term::ReadKey)" \
|
||||||
|
"perl(Authen::NTLM)" \
|
||||||
|
perl-Data-Uniqid \
|
||||||
|
perl-File-Copy-Recursive \
|
||||||
|
perl-IO-Tee \
|
||||||
|
perl-Unicode-String
|
||||||
|
|
||||||
|
|
||||||
|
|
92
INSTALL.d/INSTALL.Darwin.txt
Normal file
92
INSTALL.d/INSTALL.Darwin.txt
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
|
||||||
|
# $Id: INSTALL.Darwin.txt,v 1.6 2015/03/16 16:29:27 gilles Exp gilles $
|
||||||
|
|
||||||
|
============================================
|
||||||
|
= Installing imapsync on Darwin / Mac OS X =
|
||||||
|
============================================
|
||||||
|
|
||||||
|
First let's configure the cpan command in order it modify only a
|
||||||
|
very local installation, local to a user, the user you're logged in.
|
||||||
|
|
||||||
|
Open a terminal: /Applications/Utilities/Terminal double-click on Terminal.
|
||||||
|
In order to do a local install, we have to take a fresh start.
|
||||||
|
In this terminal, type the following (or better copy-paste this line and press RETURN):
|
||||||
|
|
||||||
|
rm -f .cpan/CPAN/MyConfig.pm
|
||||||
|
cpan
|
||||||
|
|
||||||
|
cpan should ask for an automatic configuration, say yes.
|
||||||
|
Example of output:
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Would you like to configure as much as possible automatically? [yes]
|
||||||
|
...
|
||||||
|
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
|
||||||
|
[local::lib]
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
At the end of the run, cpan might propose to add some lines in your .bashrc file.
|
||||||
|
Say yes. The output on the screen is something like the following:
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
...
|
||||||
|
local::lib is installed. You must now add the following environment variables
|
||||||
|
to your shell configuration files (or registry, if you are on Windows) and
|
||||||
|
then restart your command line shell and CPAN before installing modules:
|
||||||
|
|
||||||
|
PERL_MB_OPT="--install_base \"/Users/gilles/perl5\""; export PERL_MB_OPT;
|
||||||
|
PERL_MM_OPT="INSTALL_BASE=/Users/gilles/perl5"; export PERL_MM_OPT;
|
||||||
|
|
||||||
|
Would you like me to append that to /home/Users/.bashrc now? [yes]
|
||||||
|
commit: wrote '/Users/gilles/.cpan/CPAN/MyConfig.pm'
|
||||||
|
...
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
You have to source (the command to source is "." ) your .bashrc and run the "cpan -i" command:
|
||||||
|
|
||||||
|
. .bashrc
|
||||||
|
|
||||||
|
The next time you use cpan command, it will install Perl modules locally,
|
||||||
|
where you have permission to create files and directories, something like
|
||||||
|
the path /Users/gilles/perl5/ (where gilles is replaced by your login name).
|
||||||
|
|
||||||
|
Next, let's get a script that will check your Perl installation.
|
||||||
|
Open a terminal: /Applications/Utilities/Terminal double-click on Terminal.
|
||||||
|
In this terminal, type the following (or better copy-paste this line and press RETURN):
|
||||||
|
|
||||||
|
curl -L http://imapsync.lamiral.info/INSTALL.d/prerequisites_imapsync > prerequisites_imapsync
|
||||||
|
|
||||||
|
Now you should have a script named "prerequisites_imapsync" in the current directory.
|
||||||
|
Let's execute it with a shell, type:
|
||||||
|
|
||||||
|
sh prerequisites_imapsync
|
||||||
|
|
||||||
|
When "sh prerequisites_imapsync" command is ended it will propose you
|
||||||
|
to execute a "cpan -i ..." command to install the missing Perl modules.
|
||||||
|
The "..." in "cpan -i ..." have to be replaced by the list proposed
|
||||||
|
in the last output line of a "sh prerequisites_imapsync" run.
|
||||||
|
For example it can be:
|
||||||
|
|
||||||
|
cpan -i Authen::NTLM Data::Uniqid File::Copy::Recursive IO::Tee Mail::IMAPClient Unicode::String
|
||||||
|
|
||||||
|
Once you've run the "cpan -i" command, you can rerun "sh prerequisites_imapsync"
|
||||||
|
to verify everything is ok:
|
||||||
|
|
||||||
|
sh prerequisites_imapsync
|
||||||
|
|
||||||
|
When everything is ok the script execution ends with this sentence
|
||||||
|
"All needed modules are already installed"
|
||||||
|
|
||||||
|
Now imapsync should work on your system.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
==========================================
|
||||||
|
== Installing imapsync Mac OS X Leopard ==
|
||||||
|
==========================================
|
||||||
|
|
||||||
|
Mac OS X Leopard has perl 5.8.8 and an old openssl version.
|
||||||
|
|
||||||
|
|
121
INSTALL.d/INSTALL.Debian.txt
Normal file
121
INSTALL.d/INSTALL.Debian.txt
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
|
||||||
|
========================================
|
||||||
|
= Installing imapsync on Debian 6 or 7 =
|
||||||
|
========================================
|
||||||
|
|
||||||
|
There is one section for Debian 7 and one for Debian 6.
|
||||||
|
|
||||||
|
== Debian 7 wheezy or higher ==
|
||||||
|
|
||||||
|
Here are the two commands to install imapsync dependencies.
|
||||||
|
The first command installs standard packages:
|
||||||
|
|
||||||
|
apt-get install \
|
||||||
|
libauthen-ntlm-perl \
|
||||||
|
libcrypt-ssleay-perl \
|
||||||
|
libdigest-hmac-perl \
|
||||||
|
libfile-copy-recursive-perl \
|
||||||
|
libio-compress-perl \
|
||||||
|
libio-socket-inet6-perl \
|
||||||
|
libio-socket-ssl-perl \
|
||||||
|
libio-tee-perl \
|
||||||
|
libmail-imapclient-perl \
|
||||||
|
libmodule-scandeps-perl \
|
||||||
|
libnet-ssleay-perl \
|
||||||
|
libpar-packer-perl \
|
||||||
|
libterm-readkey-perl \
|
||||||
|
libtest-pod-perl \
|
||||||
|
libtest-simple-perl \
|
||||||
|
libunicode-string-perl \
|
||||||
|
liburi-perl
|
||||||
|
|
||||||
|
|
||||||
|
The second command installs "manually" the Perl module Data::Uniqid
|
||||||
|
because Debian hasn't made it available via a package yet:
|
||||||
|
|
||||||
|
cpan Data::Uniqid
|
||||||
|
|
||||||
|
After installing the dependencies, imapsync should be working.
|
||||||
|
A good dependencies test that shows also the basic example:
|
||||||
|
|
||||||
|
./imapsync
|
||||||
|
|
||||||
|
Now the install command:
|
||||||
|
|
||||||
|
cp imapsync /usr/bin/
|
||||||
|
|
||||||
|
That's finished for the installation part.
|
||||||
|
You can use imapsync.
|
||||||
|
|
||||||
|
|
||||||
|
== Debian 6 Squeeze ==
|
||||||
|
|
||||||
|
apt-get install \
|
||||||
|
libcrypt-ssleay-perl \
|
||||||
|
libdigest-hmac-perl \
|
||||||
|
libfile-copy-recursive-perl \
|
||||||
|
libio-compress-perl \
|
||||||
|
libio-socket-inet6-perl \
|
||||||
|
libio-socket-ssl-perl \
|
||||||
|
libio-tee-perl \
|
||||||
|
libmail-imapclient-perl \
|
||||||
|
libmodule-scandeps-perl \
|
||||||
|
libnet-ssleay-perl \
|
||||||
|
libpar-packer-perl \
|
||||||
|
libterm-readkey-perl \
|
||||||
|
libtest-pod-perl \
|
||||||
|
libtest-simple-perl \
|
||||||
|
libunicode-string-perl \
|
||||||
|
liburi-perl
|
||||||
|
|
||||||
|
|
||||||
|
perl -MCPAN -e "install Data::Uniqid"
|
||||||
|
perl -MCPAN -e "install Authen::NTLM"
|
||||||
|
|
||||||
|
Now a good dependencies test that shows also the basic example:
|
||||||
|
|
||||||
|
./imapsync
|
||||||
|
|
||||||
|
Now the install command:
|
||||||
|
|
||||||
|
cp imapsync /usr/bin/
|
||||||
|
|
||||||
|
That's finished for the installation part.
|
||||||
|
You can use imapsync.
|
||||||
|
|
||||||
|
|
||||||
|
== Appendix ==
|
||||||
|
|
||||||
|
Here are some explanations about what is really needed in case
|
||||||
|
you want to avoid installing some packages.
|
||||||
|
|
||||||
|
=== Mandatory packages ===
|
||||||
|
|
||||||
|
Digest::HMAC_MD5 libdigest-hmac-perl
|
||||||
|
Digest::HMAC_SHA1 libdigest-hmac-perl
|
||||||
|
File::Copy::Recursive libfile-copy-recursive-perl
|
||||||
|
IO::Socket::INET6 libio-socket-inet6-perl
|
||||||
|
IO::Socket::SSL libio-socket-ssl-perl
|
||||||
|
IO::Tee libio-tee-perl
|
||||||
|
Mail::IMAPClient libmail-imapclient-perl
|
||||||
|
Unicode::String libunicode-string-perl
|
||||||
|
|
||||||
|
=== Optional packages ===
|
||||||
|
|
||||||
|
Authen::NTLM libauthen-ntlm-perl # NTLM authentication
|
||||||
|
URI::Escape liburi-perl # XOAUTH authentication
|
||||||
|
Data::Uniqid # XOAUTH authentication
|
||||||
|
|
||||||
|
Since Perl module Data::Uniqid is not packaged in Ubuntu you have to install
|
||||||
|
it "manually" from CPAN.
|
||||||
|
|
||||||
|
=== Developper packages ===
|
||||||
|
|
||||||
|
Module::ScanDeps libmodule-scandeps-perl
|
||||||
|
PAR::Packer libpar-packer-perl
|
||||||
|
Test::Pod libtest-pod-perl
|
||||||
|
|
||||||
|
You may need to have also those packages:
|
||||||
|
|
||||||
|
sudo apt-get install makepasswd rcs perl-doc git
|
||||||
|
|
17
INSTALL.d/INSTALL.FreeBSD.txt
Normal file
17
INSTALL.d/INSTALL.FreeBSD.txt
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
==================================
|
||||||
|
= Installing imapsync on FreeBSD =
|
||||||
|
==================================
|
||||||
|
$Id: INSTALL.FreeBSD.txt,v 1.3 2015/03/16 16:32:06 gilles Exp gilles $
|
||||||
|
|
||||||
|
Thanks to Kurt Jaeger pi@FreeBSD.org a imapsync package is available in FreeBSD
|
||||||
|
http://portsmon.freebsd.org/portoverview.py?category=mail&portname=imapsync
|
||||||
|
So, to install imapsync you just have to type one command in a terminal:
|
||||||
|
|
||||||
|
sudo pkg install imapsync
|
||||||
|
|
||||||
|
or if you're already root on the console:
|
||||||
|
|
||||||
|
pkg install imapsync
|
||||||
|
|
||||||
|
Tested 7 March 2015 on FreeBSD 10.1-RELEASE
|
||||||
|
|
17
INSTALL.d/INSTALL.Mandriva.txt
Normal file
17
INSTALL.d/INSTALL.Mandriva.txt
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
=====================================
|
||||||
|
== Installing imapsync on Mandriva ==
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Install the Perl modules dependencies with urpmi:
|
||||||
|
|
||||||
|
urpmi perl-Mail-IMAPClient # Mail::IMAPClient
|
||||||
|
urpmi perl-Term-ReadKey # Term::ReadKey
|
||||||
|
urpmi perl-IO-Socket-SSL # IO::Socket::SSL
|
||||||
|
urpmi perl-Digest-HMAC # Digest::HMAC_MD5 Digest::HMAC_SHA1
|
||||||
|
urpmi perl-URI # URI::Escape
|
||||||
|
urpmi perl-File-Copy-Recursive # File::Copy::Recursive
|
||||||
|
urpmi perl-IO-Tee # IO::Tee
|
||||||
|
urpmi perl-Unicode-String # Unicode::String
|
||||||
|
|
||||||
|
|
40
INSTALL.d/INSTALL.Ubuntu.txt
Normal file
40
INSTALL.d/INSTALL.Ubuntu.txt
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
|
||||||
|
=================================
|
||||||
|
= Installing imapsync on Ubuntu =
|
||||||
|
=================================
|
||||||
|
|
||||||
|
== Ubuntu 12.04 or higher ==
|
||||||
|
|
||||||
|
Here are the two commands to install imapsync dependencies:
|
||||||
|
|
||||||
|
sudo apt-get install \
|
||||||
|
libauthen-ntlm-perl \
|
||||||
|
libcrypt-ssleay-perl \
|
||||||
|
libdigest-hmac-perl \
|
||||||
|
libfile-copy-recursive-perl \
|
||||||
|
libio-compress-perl \
|
||||||
|
libio-socket-inet6-perl \
|
||||||
|
libio-socket-ssl-perl \
|
||||||
|
libio-tee-perl \
|
||||||
|
libmail-imapclient-perl \
|
||||||
|
libmodule-scandeps-perl \
|
||||||
|
libnet-ssleay-perl \
|
||||||
|
libpar-packer-perl \
|
||||||
|
libterm-readkey-perl \
|
||||||
|
libtest-pod-perl \
|
||||||
|
libtest-simple-perl \
|
||||||
|
libunicode-string-perl \
|
||||||
|
liburi-perl
|
||||||
|
|
||||||
|
sudo cpan Data::Uniqid
|
||||||
|
|
||||||
|
Now a good dependencies test that shows also the basic example:
|
||||||
|
|
||||||
|
./imapsync
|
||||||
|
|
||||||
|
Now the install command:
|
||||||
|
|
||||||
|
sudo cp imapsync /usr/bin/
|
||||||
|
|
||||||
|
That's finished for the installation part.
|
||||||
|
You can use imapsync.
|
146
INSTALL.d/prerequisites_imapsync
Executable file
146
INSTALL.d/prerequisites_imapsync
Executable file
|
@ -0,0 +1,146 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# $Id: prerequisites_imapsync,v 1.10 2015/03/14 23:46:59 gilles Exp gilles $
|
||||||
|
|
||||||
|
MODULES_MANDATORY='
|
||||||
|
Digest::HMAC_MD5
|
||||||
|
Authen::NTLM
|
||||||
|
Compress::Zlib
|
||||||
|
Data::Dumper
|
||||||
|
Data::Uniqid
|
||||||
|
Digest::HMAC
|
||||||
|
Digest::MD5
|
||||||
|
File::Copy::Recursive
|
||||||
|
IO::Socket::INET
|
||||||
|
IO::Socket::INET6
|
||||||
|
IO::Socket::SSL
|
||||||
|
IO::Tee
|
||||||
|
Mail::IMAPClient
|
||||||
|
Parse::RecDescent
|
||||||
|
Term::ReadKey
|
||||||
|
Test::More
|
||||||
|
Test::Pod
|
||||||
|
Unicode::String
|
||||||
|
URI::Escape
|
||||||
|
'
|
||||||
|
|
||||||
|
MODULES_DEVEL='
|
||||||
|
Module::ScanDeps
|
||||||
|
PAR::Packer
|
||||||
|
'
|
||||||
|
|
||||||
|
test_perl() {
|
||||||
|
# First we need perl
|
||||||
|
|
||||||
|
if perl -v > /dev/null 2>&1 ; then
|
||||||
|
perl_version=`perl -e 'printf "%vd\n", $^V;'`
|
||||||
|
echo Ok: Found Perl $perl_version
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo Failure: Perl is not here. You have to install Perl first.
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
test_module() {
|
||||||
|
test -n $1 || return
|
||||||
|
M_tested=$1
|
||||||
|
shift
|
||||||
|
if perl -m"$M_tested" -e '' >/dev/null 2>&1 ; then
|
||||||
|
echo "Ok: Found Perl module $M_tested"
|
||||||
|
else
|
||||||
|
echo "Failure: Not found Perl module $M_tested $@"
|
||||||
|
LIST_TO_INSTALL="$LIST_TO_INSTALL $M_tested"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
test_mandatory_modules() {
|
||||||
|
for M in $MODULES_MANDATORY
|
||||||
|
do
|
||||||
|
test_module $M
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
search_modules_any() {
|
||||||
|
test -n "$*" || {
|
||||||
|
echo "All needed modules are already installed"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
apt-get -h > /dev/null 2>&1 && {
|
||||||
|
search_modules_apt "$@"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
yum -h > /dev/null 2>&1 && {
|
||||||
|
search_modules_yum "$@"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# no yum, no apt-get
|
||||||
|
{
|
||||||
|
search_modules_cpan "$@"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
search_modules_cpan() {
|
||||||
|
cat <<EOD
|
||||||
|
Here is a cpan command to install missing Perl modules:
|
||||||
|
cpan -i $@
|
||||||
|
EOD
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
search_modules_yum() {
|
||||||
|
echo
|
||||||
|
echo Searching rpm packages names
|
||||||
|
for M in "$@" ; do
|
||||||
|
echo "==== Searching rpm package name for $M"
|
||||||
|
F=`echo $M|tr -s ":" "/"`.pm
|
||||||
|
#echo yum -q whatprovides "*/$F"
|
||||||
|
echo
|
||||||
|
yum -q whatprovides "*/$F"
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
search_modules_apt() {
|
||||||
|
echo
|
||||||
|
echo Searching deb packages names
|
||||||
|
for M in "$@" ; do
|
||||||
|
echo "==== Searching deb package name for $M"
|
||||||
|
F=`echo $M|tr -s ":" "/"`.pm
|
||||||
|
#echo apt-file search /$F
|
||||||
|
echo
|
||||||
|
apt-file search /$F
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
list_to_install() {
|
||||||
|
test -n "$LIST_TO_INSTALL" || return
|
||||||
|
echo
|
||||||
|
echo 'What you have to do before using imapsync:'
|
||||||
|
for M in $LIST_TO_INSTALL ; do
|
||||||
|
echo "Install Perl module $M"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
test_unix() {
|
||||||
|
echo '$SHELL says ' $SHELL
|
||||||
|
echo '$0 gives ' $0
|
||||||
|
echo -n "ps -ef gives " ; ps -ef | grep $$ | grep -v grep| grep -v 'ps -ef'
|
||||||
|
sw_vers > /dev/null 2>&1 && sw_vers # Darwin
|
||||||
|
lsb_release -dirc > /dev/null 2>&1 && lsb_release -dirc # Linux
|
||||||
|
uname -a
|
||||||
|
}
|
||||||
|
|
||||||
|
test_unix
|
||||||
|
#exit
|
||||||
|
test_perl || exit
|
||||||
|
test_mandatory_modules
|
||||||
|
list_to_install
|
||||||
|
#search_modules_cpan $MODULES_MANDATORY
|
||||||
|
search_modules_any $LIST_TO_INSTALL
|
179
Makefile
179
Makefile
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
# $Id: Makefile,v 1.155 2014/11/14 23:54:52 gilles Exp gilles $
|
# $Id: Makefile,v 1.179 2015/04/01 03:00:13 gilles Exp gilles $
|
||||||
|
|
||||||
.PHONY: help usage all
|
.PHONY: help usage all
|
||||||
|
|
||||||
|
@ -7,19 +7,20 @@ help: usage
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
@echo " imapsync $(VERSION), You can do :"
|
@echo " imapsync $(VERSION), You can do :"
|
||||||
|
@echo "make testp # it shows needed Perl modules from your distro or CPAN"
|
||||||
@echo "make install # as root"
|
@echo "make install # as root"
|
||||||
@echo "make install_dependencies # it installs needed Perl modules from CPAN"
|
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "All other goals are for the upstream developper"
|
@echo "All other goals are for the upstream developper"
|
||||||
|
|
||||||
@echo "make testf # run tests"
|
@echo "make testf # run tests"
|
||||||
@echo "make testv # run tests verbosely"
|
@echo "make testv # run tests verbosely"
|
||||||
@echo "make test_quick # few tests verbosely"
|
@echo "make test_quick # few tests verbosely"
|
||||||
@echo "make W/test.bat # run --test and W/test.bat on win32"
|
@echo "make W/test.bat # run --tests and W/test.bat on win32"
|
||||||
|
@echo "make W/test_tests.bat # run --tests on win32"
|
||||||
@echo "make W/test2.bat # run W/test2.bat on win32"
|
@echo "make W/test2.bat # run W/test2.bat on win32"
|
||||||
@echo "make W/test3.bat # run W/test3.bat on win32"
|
@echo "make W/test3.bat # run W/test3.bat on win32"
|
||||||
@echo "make W/test_exe_2.bat # run W/test_exe_2.bat on win32"
|
@echo "make W/test_exe_2.bat # run W/test_exe_2.bat on win32"
|
||||||
@echo "make prereq_win32 # run examples/install_modules.bat on win32"
|
@echo "make prereq_win32 # run W/install_modules.bat on win32"
|
||||||
@echo "make all "
|
@echo "make all "
|
||||||
@echo "make upload_tests # upload tests.sh"
|
@echo "make upload_tests # upload tests.sh"
|
||||||
@echo "make upload_index"
|
@echo "make upload_index"
|
||||||
|
@ -29,6 +30,9 @@ usage:
|
||||||
@echo "make imapsync_elf_x86.bin"
|
@echo "make imapsync_elf_x86.bin"
|
||||||
@echo "make publish"
|
@echo "make publish"
|
||||||
@echo "make perlcritic"
|
@echo "make perlcritic"
|
||||||
|
@echo "make prereq # Generates W/prereq.*"
|
||||||
|
@echo "make checklink # Check links"
|
||||||
|
@echo "make checklinkext # Check links of S/*.shtml"
|
||||||
|
|
||||||
|
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
|
@ -48,10 +52,11 @@ hello:
|
||||||
echo "$(IMAPClient)"
|
echo "$(IMAPClient)"
|
||||||
|
|
||||||
|
|
||||||
all: ChangeLog README VERSION imapsync_elf_x86.bin imapsync.exe
|
all: ChangeLog README VERSION OPTIONS W/imapsync.1 prereq perlcritic imapsync_elf_x86.bin imapsync.exe VERSION_EXE
|
||||||
|
|
||||||
testp :
|
testp :
|
||||||
perl -c imapsync || { echo; echo "Read the INSTALL file to solve Perl module dependencies!"; exit 1; }
|
sh INSTALL.d/prerequisites_imapsync
|
||||||
|
@perl -c imapsync || { echo; echo "Read the INSTALL file to solve Perl module dependencies!"; exit 1; }
|
||||||
|
|
||||||
ChangeLog: imapsync
|
ChangeLog: imapsync
|
||||||
rlog imapsync > ChangeLog
|
rlog imapsync > ChangeLog
|
||||||
|
@ -59,17 +64,26 @@ ChangeLog: imapsync
|
||||||
README: imapsync
|
README: imapsync
|
||||||
perldoc -t imapsync > README
|
perldoc -t imapsync > README
|
||||||
|
|
||||||
|
OPTIONS: imapsync
|
||||||
|
perl -I./$(IMAPClient) ./imapsync --help > ./OPTIONS
|
||||||
|
|
||||||
VERSION: imapsync
|
VERSION: imapsync
|
||||||
perl -I./$(IMAPClient) ./imapsync --version > ./VERSION
|
perl -I./$(IMAPClient) ./imapsync --version > ./VERSION
|
||||||
touch -r ./imapsync ./VERSION
|
touch -r ./imapsync ./VERSION
|
||||||
|
|
||||||
|
VERSION_EXE: imapsync
|
||||||
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --version' > ./VERSION_EXE
|
||||||
|
dos2unix ./VERSION_EXE
|
||||||
|
touch -r ./imapsync ./VERSION_EXE
|
||||||
|
|
||||||
|
|
||||||
GOOD_PRACTICES.html: W/GOOD_PRACTICES.t2t
|
GOOD_PRACTICES.html: W/GOOD_PRACTICES.t2t
|
||||||
txt2tags -i W/GOOD_PRACTICES.t2t -t html --toc -o GOOD_PRACTICES.html
|
txt2tags -i W/GOOD_PRACTICES.t2t -t html --toc -o GOOD_PRACTICES.html
|
||||||
|
|
||||||
TUTORIAL.html: W/TUTORIAL.t2t
|
TUTORIAL.html: W/TUTORIAL.t2t
|
||||||
txt2tags -i W/TUTORIAL.t2t -t html --toc -o TUTORIAL.html
|
txt2tags -i W/TUTORIAL.t2t -t html --toc -o TUTORIAL.html
|
||||||
|
|
||||||
doc: README ChangeLog TUTORIAL.html GOOD_PRACTICES.html
|
doc: README OPTIONS ChangeLog TUTORIAL.html GOOD_PRACTICES.html
|
||||||
|
|
||||||
.PHONY: clean clean_tilde clean_test doc clean_log
|
.PHONY: clean clean_tilde clean_test doc clean_log
|
||||||
|
|
||||||
|
@ -92,19 +106,19 @@ man: imapsync.1
|
||||||
clean_man:
|
clean_man:
|
||||||
rm -f imapsync.1
|
rm -f imapsync.1
|
||||||
|
|
||||||
imapsync.1: imapsync
|
W/imapsync.1: imapsync
|
||||||
pod2man imapsync > imapsync.1
|
pod2man < /dev/null
|
||||||
|
pod2man imapsync > W/imapsync.1
|
||||||
|
|
||||||
install: testp imapsync.1
|
install: testp W/imapsync.1
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||||
install imapsync $(DESTDIR)$(PREFIX)/bin/imapsync
|
install imapsync $(DESTDIR)$(PREFIX)/bin/imapsync
|
||||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/imapsync
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/imapsync
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
|
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
|
||||||
install imapsync.1 $(DESTDIR)$(PREFIX)/share/man/man1/imapsync.1
|
install W/imapsync.1 $(DESTDIR)$(PREFIX)/share/man/man1/imapsync.1
|
||||||
chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/imapsync.1
|
chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/imapsync.1
|
||||||
|
|
||||||
install_dependencies:
|
|
||||||
sh examples/install_modules_linux.sh
|
|
||||||
|
|
||||||
.PHONY: cidone ci
|
.PHONY: cidone ci
|
||||||
|
|
||||||
|
@ -113,14 +127,22 @@ ci: cidone
|
||||||
cidone:
|
cidone:
|
||||||
rcsdiff RCS/*
|
rcsdiff RCS/*
|
||||||
cd W && rcsdiff RCS/*
|
cd W && rcsdiff RCS/*
|
||||||
|
cd S && rcsdiff RCS/*
|
||||||
cd examples && rcsdiff RCS/*
|
cd examples && rcsdiff RCS/*
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Local goals
|
# Local goals
|
||||||
###############
|
###############
|
||||||
|
|
||||||
|
.PHONY: prereq test tests testp testf test3xx testv3 perlcritic
|
||||||
|
|
||||||
|
prereq: W/prereq.scandeps
|
||||||
|
|
||||||
|
W/prereq.scandeps: INSTALL.d/prerequisites_imapsync imapsync
|
||||||
|
scandeps -c -x imapsync | tee W/prereq.scandeps
|
||||||
|
./INSTALL.d/prerequisites_imapsync | tee W/prereq.`lsb_release -i -s || echo Unknown`
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test tests testp testf test3xx testv3 perlcritic
|
|
||||||
|
|
||||||
perlcritic: W/perlcritic_3.out W/perlcritic_2.out
|
perlcritic: W/perlcritic_3.out W/perlcritic_2.out
|
||||||
|
|
||||||
|
@ -156,12 +178,13 @@ testf: clean_test test
|
||||||
.PHONY: lfo upload_lfo dosify_bat public imapsync_cidone
|
.PHONY: lfo upload_lfo dosify_bat public imapsync_cidone
|
||||||
|
|
||||||
dosify_bat:
|
dosify_bat:
|
||||||
unix2dos W/*.bat examples/*.bat build_exe.bat
|
unix2dos W/*.bat examples/*.bat
|
||||||
|
|
||||||
copy_win32:
|
copy_win32:
|
||||||
scp imapsync Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
|
|
||||||
tests_win32: dosify_bat
|
W/test.bat:
|
||||||
|
unix2dos W/test.bat
|
||||||
scp imapsync W/test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync W/test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests_debug'
|
# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests_debug'
|
||||||
ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests'
|
ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests'
|
||||||
|
@ -169,73 +192,80 @@ tests_win32: dosify_bat
|
||||||
# ssh Admin@c 'tasklist /FI "PID eq 0"'
|
# ssh Admin@c 'tasklist /FI "PID eq 0"'
|
||||||
# ssh Admin@c 'tasklist /NH /FO CSV'
|
# ssh Admin@c 'tasklist /NH /FO CSV'
|
||||||
|
|
||||||
|
|
||||||
|
W/test_tests.bat:
|
||||||
|
unix2dos W/test_tests.bat
|
||||||
|
scp imapsync W/test_tests.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_tests.bat'
|
||||||
|
|
||||||
.PHONY: W/*.bat
|
.PHONY: W/*.bat
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
W/test2.bat:
|
W/test2.bat:
|
||||||
unix2dos W/*.bat
|
unix2dos W/test2.bat
|
||||||
scp imapsync examples/file.txt W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync examples/file.txt W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat'
|
||||||
|
|
||||||
W/test3.bat:
|
W/test3.bat:
|
||||||
unix2dos W/*.bat
|
unix2dos W/test3.bat
|
||||||
scp imapsync W/test3.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync W/test3.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3.bat'
|
||||||
|
|
||||||
W/test_exe_2.bat:
|
W/test_exe_2.bat:
|
||||||
unix2dos W/*.bat
|
unix2dos W/test_exe_2.bat
|
||||||
scp imapsync W/test_exe_2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync W/test_exe_2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe_2.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe_2.bat'
|
||||||
|
|
||||||
W/test3_gmail.bat:
|
W/test3_gmail.bat:
|
||||||
unix2dos W/*.bat
|
unix2dos W/test3_gmail.bat
|
||||||
scp imapsync W/test3_gmail.bat /g/var/pass/secret.gilles_gmail Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync W/test3_gmail.bat /g/var/pass/secret.gilles_gmail Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3_gmail.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3_gmail.bat'
|
||||||
|
|
||||||
test_imapsync_exe:
|
test_imapsync_exe:
|
||||||
unix2dos W/*.bat
|
unix2dos W/test_exe.bat
|
||||||
scp W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
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'
|
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
|
||||||
|
|
||||||
prereq_win32:
|
prereq_win32:
|
||||||
unix2dos W/*.bat examples/*.bat build_exe.bat
|
unix2dos W/*.bat examples/*.bat
|
||||||
scp examples/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/examples/'
|
scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/examples/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/examples/install_modules.bat'
|
|
||||||
|
|
||||||
|
|
||||||
imapsync.exe: imapsync
|
imapsync.exe: imapsync
|
||||||
rcsdiff imapsync
|
rcsdiff imapsync
|
||||||
ssh Admin@c 'perl -V'
|
ssh Admin@c 'perl -V'
|
||||||
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
||||||
unix2dos W/*.bat examples/*.bat build_exe.bat
|
unix2dos W/*.bat examples/*.bat
|
||||||
scp examples/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/examples/'
|
scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/examples/install_modules.bat'
|
# ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat'
|
||||||
scp imapsync build_exe.bat W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync W/build_exe.bat W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
|
||||||
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
|
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --version' > ./VERSION_EXE
|
|
||||||
dos2unix ./VERSION_EXE
|
|
||||||
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
||||||
|
|
||||||
exe: imapsync build_exe.bat dosify_bat
|
exe: imapsync W/build_exe.bat dosify_bat
|
||||||
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
||||||
scp imapsync build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
scp imapsync W/build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
|
||||||
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --modules_version'
|
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --modules_version'
|
||||||
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
|
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
|
||||||
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
|
||||||
|
|
||||||
|
|
||||||
zip: dosify_bat
|
zip: dosify_bat
|
||||||
rm -rfv ../prepa_zip/imapsync_$(VERSION_EXE)/
|
rm -rfv ../prepa_zip/imapsync_$(VERSION_EXE)/
|
||||||
mkdir -p ../prepa_zip/imapsync_$(VERSION_EXE)/
|
mkdir -p ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/
|
||||||
cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION_EXE)/
|
cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION_EXE)/
|
||||||
|
cp -av W/build_exe.bat W/install_modules.bat W/test_cook_exe.bat W/test_cook_src.bat imapsync ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/
|
||||||
for f in FAQ README ; do cp -av $$f ../prepa_zip/imapsync_$(VERSION_EXE)/$$f.txt ; done
|
for f in FAQ README ; do cp -av $$f ../prepa_zip/imapsync_$(VERSION_EXE)/$$f.txt ; done
|
||||||
|
cp -av FAQ.d/*.txt ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/
|
||||||
cp -av imapsync.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION_EXE)/
|
cp -av imapsync.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION_EXE)/
|
||||||
unix2dos ../prepa_zip/imapsync_$(VERSION_EXE)/*.txt
|
unix2dos ../prepa_zip/imapsync_$(VERSION_EXE)/*.txt
|
||||||
cd ../prepa_zip/ && rm -f ./imapsync_$(VERSION_EXE).zip && zip -r ./imapsync_$(VERSION_EXE).zip ./imapsync_$(VERSION_EXE)/
|
cd ../prepa_zip/ && rm -f ./imapsync_$(VERSION_EXE).zip && zip -r ./imapsync_$(VERSION_EXE).zip ./imapsync_$(VERSION_EXE)/
|
||||||
scp ../prepa_zip/imapsync_$(VERSION_EXE).zip Admin@c:'C:/msys/1.0/home/Admin/'
|
scp ../prepa_zip/imapsync_$(VERSION_EXE).zip Admin@c:'C:/msys/1.0/home/Admin/'
|
||||||
cp ../prepa_zip/imapsync_$(VERSION_EXE).zip /ee/imapsync/
|
cp ../prepa_zip/imapsync_$(VERSION_EXE).zip /fe/imapsync/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C:\Users\mansour\Desktop\imapsync
|
# C:\Users\mansour\Desktop\imapsync
|
||||||
|
@ -252,12 +282,9 @@ imapsync_elf_x86.bin: imapsync
|
||||||
} || :
|
} || :
|
||||||
{ test 'petite' = "`hostname`" && \
|
{ test 'petite' = "`hostname`" && \
|
||||||
pp -o imapsync_elf_x86.bin -I $(IMAPClient_3xx) \
|
pp -o imapsync_elf_x86.bin -I $(IMAPClient_3xx) \
|
||||||
-I W/NTLM-1.09/blib/lib \
|
|
||||||
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
||||||
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
||||||
-M Authen::NTLM \
|
-M Authen::NTLM \
|
||||||
-M Tie::Hash::NamedCapture \
|
|
||||||
-a '/usr/lib/perl/5.10.1/auto/POSIX/SigAction;auto/POSIX/SigAction' \
|
|
||||||
imapsync ; \
|
imapsync ; \
|
||||||
} || :
|
} || :
|
||||||
{ test 'ks200821.kimsufi.com' = "`hostname`" && \
|
{ test 'ks200821.kimsufi.com' = "`hostname`" && \
|
||||||
|
@ -265,14 +292,12 @@ imapsync_elf_x86.bin: imapsync
|
||||||
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
||||||
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
|
||||||
-M Authen::NTLM \
|
-M Authen::NTLM \
|
||||||
-M Tie::Hash::NamedCapture \
|
|
||||||
-a '/usr/lib/perl/5.10.1/auto/POSIX/SigAction;auto/POSIX/SigAction' \
|
|
||||||
imapsync ; \
|
imapsync ; \
|
||||||
} || :
|
} || :
|
||||||
./imapsync_elf_x86.bin
|
./imapsync_elf_x86.bin
|
||||||
|
|
||||||
|
|
||||||
lfo: cidone upload_lfo
|
lfo: upload_lfo
|
||||||
|
|
||||||
|
|
||||||
tarball: .tarball
|
tarball: .tarball
|
||||||
|
@ -353,37 +378,33 @@ upload_tests: tests.sh
|
||||||
rsync -avHz --delete -P \
|
rsync -avHz --delete -P \
|
||||||
tests.sh \
|
tests.sh \
|
||||||
gilles@ks.lamiral.info:public_html/imapsync/
|
gilles@ks.lamiral.info:public_html/imapsync/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#upload_ks: ci tarball
|
||||||
upload_ks: ci tarball
|
upload_ks: ci tarball
|
||||||
rsync -lptvHzP $(PUBLIC_FILES) \
|
rsync -aHv $(PUBLIC) ../imapsync_website/
|
||||||
root@ks.lamiral.info:/var/www/imapsync/
|
rsync -aHv $(PUBLIC_W) ../imapsync_website/W/
|
||||||
rsync -lptvHzP $(PUBLIC_FILES_W) \
|
rsync -aHv --delete ./W/images/ ../imapsync_website/W/images/
|
||||||
root@ks.lamiral.info:/var/www/imapsync/W/
|
rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess
|
||||||
rsync -lptvHzPr $(PUBLIC_FILES_IMAGES) \
|
rsync -aHv --delete ./dist/ ../imapsync_website/dist/
|
||||||
root@ks.lamiral.info:/var/www/imapsync/W/images/
|
rsync -aHv --delete ./examples/ ../imapsync_website/examples/
|
||||||
rsync -lptvHzP ./W/ks.htaccess \
|
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
|
||||||
root@ks.lamiral.info:/var/www/imapsync/.htaccess
|
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
|
||||||
rsync -lptvHzPr ./dist/ \
|
|
||||||
root@ks.lamiral.info:/var/www/imapsync/dist/
|
|
||||||
rsync -lptvHzPr ./examples/ \
|
|
||||||
root@ks.lamiral.info:/var/www/imapsync/examples/
|
|
||||||
|
|
||||||
publish: dist upload_ks ksa
|
publish: dist upload_ks ksa
|
||||||
echo Now ou can do make ml
|
echo Now ou can do make ml
|
||||||
|
|
||||||
PUBLIC_FILES = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \
|
PUBLIC = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \
|
||||||
./index.shtml ./INSTALL ./README_Windows.txt \
|
./index.shtml ./INSTALL ./README_Windows.txt \
|
||||||
./VERSION ./VERSION_EXE \
|
./VERSION ./VERSION_EXE ./imapsync \
|
||||||
./README ./TODO ./TUTORIAL.html ./GOOD_PRACTICES.html
|
./README ./OPTIONS ./TODO ./TUTORIAL.html ./GOOD_PRACTICES.html
|
||||||
|
|
||||||
PUBLIC_FILES_W = ./W/style.css \
|
PUBLIC_W = ./W/style.css ./W/tw-hash.html \
|
||||||
./W/TIME \
|
./W/TIME \
|
||||||
./W/paypal.shtml ./W/paypal_return.shtml ./W/paypal_return_support.shtml
|
./W/paypal.shtml ./W/paypal_return.shtml
|
||||||
|
|
||||||
|
|
||||||
PUBLIC_FILES_IMAGES = ./W/images/
|
|
||||||
|
|
||||||
ml: dist_dir
|
ml: dist_dir
|
||||||
m4 -P W/ml_announce.in | mutt -H-
|
m4 -P W/ml_announce.in | mutt -H-
|
||||||
mailq
|
mailq
|
||||||
|
@ -392,7 +413,7 @@ ml: dist_dir
|
||||||
upload_lfo:
|
upload_lfo:
|
||||||
#rm -rf /home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
|
#rm -rf /home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
|
||||||
#rm -rf /home/gilles/public_html/www.linux-france.org/ftp/prj/imapsync/
|
#rm -rf /home/gilles/public_html/www.linux-france.org/ftp/prj/imapsync/
|
||||||
#rsync -avHz $(PUBLIC_FILES) \
|
#rsync -avHz $(PUBLIC) \
|
||||||
#/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
|
#/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
|
||||||
rsync -lptvHzP ./W/memo glamiral@linux-france.org:imapsync_stats/memo
|
rsync -lptvHzP ./W/memo glamiral@linux-france.org:imapsync_stats/memo
|
||||||
rsync -lptvHzP ./W/lfo.htaccess \
|
rsync -lptvHzP ./W/lfo.htaccess \
|
||||||
|
@ -401,15 +422,31 @@ upload_lfo:
|
||||||
|
|
||||||
valid_index: .valid.index.shtml
|
valid_index: .valid.index.shtml
|
||||||
|
|
||||||
|
checklink: index.shtml
|
||||||
|
checklink -b -q http://lamiral.info/~gilles/imapsync/
|
||||||
|
|
||||||
.valid.index.shtml: index.shtml
|
checklinkext: S/news.shtml S/external.shtml S/imapservers.shtml S/template.shtml
|
||||||
tidy -q index.shtml> /dev/null
|
checklink -b -q \
|
||||||
validate --verbose index.shtml
|
http://lamiral.info/~gilles/imapsync/S/template.shtml \
|
||||||
|
http://lamiral.info/~gilles/imapsync/S/news.shtml \
|
||||||
|
http://lamiral.info/~gilles/imapsync/S/external.shtml \
|
||||||
|
http://lamiral.info/~gilles/imapsync/S/imapservers.shtml
|
||||||
|
|
||||||
|
.valid.index.shtml: index.shtml S/*.shtml
|
||||||
|
tidy -q index.shtml S/*.shtml > /dev/null
|
||||||
|
validate --verbose index.shtml S/*.shtml
|
||||||
touch .valid.index.shtml
|
touch .valid.index.shtml
|
||||||
|
|
||||||
upload_index: .valid.index.shtml FAQ LICENSE CREDITS TUTORIAL.html GOOD_PRACTICES.html W/*.bat examples/*.bat examples/*.sh
|
.PHONY: upload_index
|
||||||
rcsdiff index.shtml FAQ LICENSE CREDITS W/*.bat examples/*.bat index.shtml
|
|
||||||
rsync -avH index.shtml FAQ NOLIMIT LICENSE CREDITS TUTORIAL.html GOOD_PRACTICES.html root@ks.lamiral.info:/var/www/imapsync/
|
upload_index: .valid.index.shtml
|
||||||
rsync -avH W/*.bat ./W/style.css W/fb-like.html ./W/fb-root.js W/tw-hash.html root@ks.lamiral.info:/var/www/imapsync/W/
|
rcsdiff index.shtml S/*.shtml FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO W/*.bat examples/*.bat index.shtml INSTALL.d/prerequisites_imapsync imapsync
|
||||||
rsync -avH examples/*.bat examples/*.sh root@ks.lamiral.info:/var/www/imapsync/examples/
|
rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO TUTORIAL.html GOOD_PRACTICES.html imapsync ../imapsync_website/
|
||||||
|
rsync -avH $(PUBLIC_W) ../imapsync_website/W/
|
||||||
|
rsync -avH S/ ../imapsync_website/S/
|
||||||
|
rsync -avH W/images/ ../imapsync_website/W/images/
|
||||||
|
rsync -aHv --delete ./examples/ ../imapsync_website/examples/
|
||||||
|
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
|
||||||
|
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
|
||||||
|
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
|
||||||
|
|
||||||
|
|
247
OPTIONS
Normal file
247
OPTIONS
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
|
||||||
|
usage: ./imapsync [options]
|
||||||
|
|
||||||
|
Several options are mandatory.
|
||||||
|
|
||||||
|
--dry : Makes imapsync doing nothing, just print what would
|
||||||
|
be done without --dry.
|
||||||
|
|
||||||
|
--host1 <string> : Source or "from" imap server. Mandatory.
|
||||||
|
--port1 <int> : Port to connect on host1. Default is 143, 993 if --ssl1
|
||||||
|
--user1 <string> : User to login on host1. Mandatory.
|
||||||
|
--showpasswords : Shows passwords on output instead of "MASKED".
|
||||||
|
Useful to restart a complete run by just reading the log.
|
||||||
|
--password1 <string> : Password for the user1.
|
||||||
|
--host2 <string> : "destination" imap server. Mandatory.
|
||||||
|
--port2 <int> : Port to connect on host2. Default is 143, 993 if --ssl2
|
||||||
|
--user2 <string> : User to login on host2. Mandatory.
|
||||||
|
--password2 <string> : Password for the user2.
|
||||||
|
|
||||||
|
--passfile1 <string> : Password file for the user1. It must contain the
|
||||||
|
password on the first line. This option avoids to show
|
||||||
|
the password on the command line like --password1 does.
|
||||||
|
--passfile2 <string> : Password file for the user2. Contains the password.
|
||||||
|
|
||||||
|
--ssl1 : Use a SSL connection on host1.
|
||||||
|
--ssl2 : Use a SSL connection on host2.
|
||||||
|
--tls1 : Use a TLS connection on host1.
|
||||||
|
--tls2 : Use a TLS connection on host2.
|
||||||
|
--timeout <int> : Connections timeout in seconds. Default is 120.
|
||||||
|
0 means no timeout.
|
||||||
|
|
||||||
|
--authmech1 <string> : Auth mechanism to use with host1:
|
||||||
|
PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE.
|
||||||
|
--authmech2 <string> : Auth mechanism to use with host2. See --authmech1
|
||||||
|
|
||||||
|
--authuser1 <string> : User to auth with on host1 (admin user).
|
||||||
|
Avoid using --authmech1 SOMETHING with --authuser1.
|
||||||
|
--authuser2 <string> : User to auth with on host2 (admin user).
|
||||||
|
--proxyauth1 : Use proxyauth on host1. Requires --authuser1.
|
||||||
|
Required by Sun/iPlanet/Netscape IMAP servers to
|
||||||
|
be able to use an administrative user.
|
||||||
|
--proxyauth2 : Use proxyauth on host2. Requires --authuser2.
|
||||||
|
|
||||||
|
--authmd51 : Use MD5 authentification for host1.
|
||||||
|
--authmd52 : Use MD5 authentification for host2.
|
||||||
|
--domain1 <string> : Domain on host1 (NTLM authentication).
|
||||||
|
--domain2 <string> : Domain on host2 (NTLM authentication).
|
||||||
|
|
||||||
|
|
||||||
|
--folder <string> : Sync this folder.
|
||||||
|
--folder <string> : and this one, etc.
|
||||||
|
--folderrec <string> : Sync this folder recursively.
|
||||||
|
--folderrec <string> : and this one, etc.
|
||||||
|
|
||||||
|
--folderfirst <string> : Sync this folder first. --folderfirst "Work"
|
||||||
|
--folderfirst <string> : then this one, etc.
|
||||||
|
--folderlast <string> : Sync this folder last. --folderlast "[Gmail]/All Mail"
|
||||||
|
--folderlast <string> : then this one, etc.
|
||||||
|
|
||||||
|
--nomixfolders : Do not merge folders when host1 is case sensitive
|
||||||
|
while host2 is not (like Exchange). Only the first
|
||||||
|
similar folder is synced (ex: Sent SENT sent -> Sent).
|
||||||
|
|
||||||
|
--skipemptyfolders : Empty host1 folders are not created on host2.
|
||||||
|
|
||||||
|
--include <regex> : Sync folders matching this regular expression
|
||||||
|
--include <regex> : or this one, etc.
|
||||||
|
in case both --include --exclude options are
|
||||||
|
use, include is done before.
|
||||||
|
--exclude <regex> : Skips folders matching this regular expression
|
||||||
|
Several folders to avoid:
|
||||||
|
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
|
||||||
|
--exclude <regex> : or this one, etc.
|
||||||
|
|
||||||
|
--regextrans2 <regex> : Apply the whole regex to each destination folders.
|
||||||
|
--regextrans2 <regex> : and this one. etc.
|
||||||
|
When you play with the --regextrans2 option, first
|
||||||
|
add also the safe options --dry --justfolders
|
||||||
|
Then, when happy, remove --dry, remove --justfolders.
|
||||||
|
Have in mind that --regextrans2 is applied after prefix
|
||||||
|
and separator inversion.
|
||||||
|
|
||||||
|
--tmpdir <string> : Where to store temporary files and subdirectories.
|
||||||
|
Will be created if it doesn't exist.
|
||||||
|
Default is system specific, Unix is /tmp but
|
||||||
|
it's often small and deleted at reboot.
|
||||||
|
--tmpdir /var/tmp should be better.
|
||||||
|
--pidfile <string> : The file where imapsync pid is written.
|
||||||
|
--pidfilelocking : Abort if pidfile already exists. Usefull to avoid
|
||||||
|
concurrent transfers on the same mailbox.
|
||||||
|
|
||||||
|
--nolog : Turn off logging on file
|
||||||
|
--logfile <string> : Change the default logfile pathname and filename.
|
||||||
|
|
||||||
|
--prefix1 <string> : Remove prefix to all destination folders
|
||||||
|
(usually INBOX. or INBOX/ or an empty string "")
|
||||||
|
you have to use --prefix1 if host1 imap server
|
||||||
|
does not have NAMESPACE capability, all other
|
||||||
|
cases are bad.
|
||||||
|
--prefix2 <string> : Add prefix to all host2 folders. See --prefix1
|
||||||
|
--sep1 <string> : Host1 separator in case NAMESPACE is not supported.
|
||||||
|
--sep2 <string> : Host2 separator in case NAMESPACE is not supported.
|
||||||
|
|
||||||
|
--skipmess <regex> : Skips messages maching the regex.
|
||||||
|
Example: 'm/[\x80-ff]/' # to avoid 8bits messages.
|
||||||
|
--skipmess is applied before --regexmess
|
||||||
|
--skipmess <regex> : or this one, etc.
|
||||||
|
|
||||||
|
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
|
||||||
|
|
||||||
|
--regexmess <regex> : Apply the whole regex to each message before transfer.
|
||||||
|
Example: 's/\000/ /g' # to replace null by space.
|
||||||
|
--regexmess <regex> : and this one, etc.
|
||||||
|
|
||||||
|
--regexflag <regex> : Apply the whole regex to each flags list.
|
||||||
|
Example: 's/"Junk"//g' # to remove "Junk" flag.
|
||||||
|
--regexflag <regex> : and this one, etc.
|
||||||
|
|
||||||
|
--delete : Deletes messages on host1 server after a successful
|
||||||
|
transfer. Option --delete has the following behavior:
|
||||||
|
it marks messages as deleted with the IMAP flag
|
||||||
|
\Deleted, then messages are really deleted with an
|
||||||
|
EXPUNGE IMAP command.
|
||||||
|
|
||||||
|
--delete2 : Delete messages in host2 that are not in
|
||||||
|
host1 server. Useful for backup or pre-sync.
|
||||||
|
--delete2duplicates : Delete messages in host2 that are duplicates.
|
||||||
|
Works only without --useuid since duplicates are
|
||||||
|
detected with an header part of each message.
|
||||||
|
|
||||||
|
--delete2folders : Delete folders in host2 that are not in host1 server.
|
||||||
|
For safety, first try it like this (it is safe):
|
||||||
|
--delete2folders --dry --justfolders --nofoldersizes
|
||||||
|
--delete2foldersonly <regex>: Deleted only folders matching regex.
|
||||||
|
Example: --delete2foldersonly "/^Junk$|^INBOX.Junk$/"
|
||||||
|
--delete2foldersbutnot <regex>: Do not delete folders matching regex.
|
||||||
|
Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/"
|
||||||
|
--noexpunge : Do not expunge messages on host1.
|
||||||
|
Expunge really deletes messages marked deleted.
|
||||||
|
Expunge is made at the beginning, on host1 only.
|
||||||
|
Newly transferred messages are also expunged if
|
||||||
|
option --delete is given.
|
||||||
|
No expunge is done on host2 account (unless --expunge2)
|
||||||
|
--expunge1 : Expunge messages on host1 after messages transfer.
|
||||||
|
--expunge2 : Expunge messages on host2 after messages transfer.
|
||||||
|
--uidexpunge2 : uidexpunge messages on the host2 account
|
||||||
|
that are not on the host1 account, requires --delete2
|
||||||
|
--nomixfolders : Avoid merging folders that are considered different on
|
||||||
|
host1 but the same on destination host2 because of
|
||||||
|
case sensitivities and insensitivities.
|
||||||
|
|
||||||
|
--syncinternaldates : Sets the internal dates on host2 same as host1.
|
||||||
|
Turned on by default. Internal date is the date
|
||||||
|
a message arrived on a host (mtime).
|
||||||
|
--idatefromheader : Sets the internal dates on host2 same as the
|
||||||
|
"Date:" headers.
|
||||||
|
|
||||||
|
--maxsize <int> : Skip messages larger (or equal) than <int> bytes
|
||||||
|
--minsize <int> : Skip messages smaller (or equal) than <int> bytes
|
||||||
|
--maxage <int> : Skip messages older than <int> days.
|
||||||
|
final stats (skipped) don't count older messages
|
||||||
|
see also --minage
|
||||||
|
--minage <int> : Skip messages newer than <int> days.
|
||||||
|
final stats (skipped) don't count newer messages
|
||||||
|
You can do (+ are the messages selected):
|
||||||
|
past|----maxage+++++++++++++++>now
|
||||||
|
past|+++++++++++++++minage---->now
|
||||||
|
past|----maxage+++++minage---->now (intersection)
|
||||||
|
past|++++minage-----maxage++++>now (union)
|
||||||
|
|
||||||
|
--search <string> : Selects only messages returned by this IMAP SEARCH
|
||||||
|
command. Applied on both sides.
|
||||||
|
--search1 <string> : Same as --search for selecting host1 messages only.
|
||||||
|
--search2 <string> : Same as --search for selecting host2 messages only.
|
||||||
|
--search CRIT equals --search1 CRIT --search2 CRIT
|
||||||
|
|
||||||
|
--exitwhenover <int> : Stop syncing when total bytes transferred reached.
|
||||||
|
Gmail per day allows 2500000000 down 500000000 upload.
|
||||||
|
|
||||||
|
--maxlinelength <int> : skip messages with a line length longer than <int> bytes.
|
||||||
|
RFC 2822 says it must be no more than 1000 bytes.
|
||||||
|
|
||||||
|
--useheader <string> : Use this header to compare messages on both sides.
|
||||||
|
Ex: Message-ID or Subject or Date.
|
||||||
|
--useheader <string> and this one, etc.
|
||||||
|
|
||||||
|
--subscribed : Transfers subscribed folders.
|
||||||
|
--subscribe : Subscribe to the folders transferred on the
|
||||||
|
host2 that are subscribed on host1. On by default.
|
||||||
|
--subscribeall : Subscribe to the folders transferred on the
|
||||||
|
host2 even if they are not subscribed on host1.
|
||||||
|
|
||||||
|
--nofoldersizes : Do not calculate the size of each folder in bytes
|
||||||
|
and message counts. Default is to calculate them.
|
||||||
|
--nofoldersizesatend : Do not calculate the size of each folder in bytes
|
||||||
|
and message counts at the end. Default is on.
|
||||||
|
--justfoldersizes : Exit after having printed the folder sizes.
|
||||||
|
|
||||||
|
--syncacls : Synchronises acls (Access Control Lists).
|
||||||
|
--nosyncacls : Does not synchronize acls. This is the default.
|
||||||
|
Acls in IMAP are not standardized, be careful.
|
||||||
|
|
||||||
|
--usecache : Use cache to speedup.
|
||||||
|
--nousecache : Do not use cache. Caveat: --useuid --nousecache creates
|
||||||
|
duplicates on multiple runs.
|
||||||
|
--useuid : Use uid instead of header as a criterium to recognize
|
||||||
|
messages. Option --usecache is then implied unless
|
||||||
|
--nousecache is used.
|
||||||
|
|
||||||
|
--debug : Debug mode.
|
||||||
|
--debugcontent : Debug content of the messages transfered.
|
||||||
|
--debugflags : Debug flags.
|
||||||
|
--debugimap1 : IMAP debug mode for host1. imap debug is very verbose.
|
||||||
|
--debugimap2 : IMAP debug mode for host2.
|
||||||
|
--debugimap : IMAP debug mode for host1 and host2.
|
||||||
|
|
||||||
|
--tests : Run non-regression tests.
|
||||||
|
--testslive : Run a live test with test1.lamiral.info imap server.
|
||||||
|
Useful to check the basics. Needs internet connexion.
|
||||||
|
|
||||||
|
--version : Print software version.
|
||||||
|
--noreleasecheck : Do not check for new imapsync release (a http request).
|
||||||
|
--releasecheck : Check for new imapsync release (a http request).
|
||||||
|
--justconnect : Just connect to both servers and print useful
|
||||||
|
information. Need only --host1 and --host2 options.
|
||||||
|
--justlogin : Just login to both host1 and host2 with users
|
||||||
|
credentials, then exit.
|
||||||
|
--justfolders : Do only things about folders (ignore messages).
|
||||||
|
|
||||||
|
--help : print this help.
|
||||||
|
|
||||||
|
Example: to synchronize imap account "test1" on "test1.lamiral.info"
|
||||||
|
to imap account "test2" on "test2.lamiral.info"
|
||||||
|
with test1 password "secret1"
|
||||||
|
and test2 password "secret2"
|
||||||
|
|
||||||
|
./imapsync \
|
||||||
|
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
|
||||||
|
--host2 test2.lamiral.info --user2 test2 --password2 secret2
|
||||||
|
|
||||||
|
Here is a [linux] system (Linux petite 3.2.0-77-generic #114-Ubuntu SMP Tue Mar 10 17:25:28 UTC 2015 i686)
|
||||||
|
With perl 5.14.2 Mail::IMAPClient 3.35
|
||||||
|
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
|
||||||
|
This current imapsync is up to date
|
||||||
|
|
||||||
|
Homepage: http://imapsync.lamiral.info/
|
||||||
|
|
87
README
87
README
|
@ -4,7 +4,7 @@ NAME
|
||||||
More than 52 different IMAP server softwares supported with success, few
|
More than 52 different IMAP server softwares supported with success, few
|
||||||
failures.
|
failures.
|
||||||
|
|
||||||
$Revision: 1.607 $
|
$Revision: 1.637 $
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
To synchronize imap account "foo" on "imap.truc.org" to imap account
|
To synchronize imap account "foo" on "imap.truc.org" to imap account
|
||||||
|
@ -23,7 +23,7 @@ INSTALL
|
||||||
|
|
||||||
imapsync can be available directly on the following distributions:
|
imapsync can be available directly on the following distributions:
|
||||||
FreeBSD, Debian, Ubuntu, Gentoo, Fedora, NetBSD, Darwin, Mandriva and
|
FreeBSD, Debian, Ubuntu, Gentoo, Fedora, NetBSD, Darwin, Mandriva and
|
||||||
OpenBSD.
|
OpenBSD. See http://oswatershed.org/pkg/imapsync
|
||||||
|
|
||||||
Purchase latest imapsync at
|
Purchase latest imapsync at
|
||||||
http://imapsync.lamiral.info/
|
http://imapsync.lamiral.info/
|
||||||
|
@ -35,10 +35,12 @@ INSTALL
|
||||||
tar xzvf imapsync-x.xx.tgz
|
tar xzvf imapsync-x.xx.tgz
|
||||||
|
|
||||||
Go into the directory imapsync-x.xx and read the INSTALL file.
|
Go into the directory imapsync-x.xx and read the INSTALL file.
|
||||||
The INSTALL file is also at
|
The INSTALL file can be found at
|
||||||
http://imapsync.lamiral.info/INSTALL
|
http://imapsync.lamiral.info/INSTALL
|
||||||
|
It is now split in several files for each system
|
||||||
|
http://imapsync.lamiral.info/INSTALL.d/
|
||||||
|
|
||||||
The freecode (was freshmeat) record is at
|
The frozen freecode (was freshmeat) record is at
|
||||||
http://freecode.com/projects/imapsync
|
http://freecode.com/projects/imapsync
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
|
@ -47,8 +49,14 @@ USAGE
|
||||||
To get a description of each option just run imapsync like this:
|
To get a description of each option just run imapsync like this:
|
||||||
|
|
||||||
imapsync --help
|
imapsync --help
|
||||||
|
|
||||||
|
or simply
|
||||||
|
|
||||||
imapsync
|
imapsync
|
||||||
|
|
||||||
|
This description of all options is available at
|
||||||
|
http://imapsync.lamiral.info/OPTIONS
|
||||||
|
|
||||||
The option list:
|
The option list:
|
||||||
|
|
||||||
imapsync [--host1 server1] [--port1 <num>]
|
imapsync [--host1 server1] [--port1 <num>]
|
||||||
|
@ -73,6 +81,7 @@ USAGE
|
||||||
[--idatefromheader]
|
[--idatefromheader]
|
||||||
[--syncacls]
|
[--syncacls]
|
||||||
[--regexmess <regex>] [--regexmess <regex>]
|
[--regexmess <regex>] [--regexmess <regex>]
|
||||||
|
[--skipmess <regex>] [--skipmess <regex>]
|
||||||
[--maxsize <int>]
|
[--maxsize <int>]
|
||||||
[--minsize <int>]
|
[--minsize <int>]
|
||||||
[--maxage <int>]
|
[--maxage <int>]
|
||||||
|
@ -80,34 +89,31 @@ USAGE
|
||||||
[--search <string>]
|
[--search <string>]
|
||||||
[--search1 <string>]
|
[--search1 <string>]
|
||||||
[--search2 <string>]
|
[--search2 <string>]
|
||||||
[--skipheader <regex>]
|
|
||||||
[--useheader <string>] [--useheader <string>]
|
[--useheader <string>] [--useheader <string>]
|
||||||
[--nouid1] [--nouid2]
|
[--nouid1] [--nouid2]
|
||||||
[--usecache]
|
[--usecache]
|
||||||
[--skipsize] [--allowsizemismatch]
|
[--noskipsize]
|
||||||
[--delete] [--delete2]
|
[--delete]
|
||||||
|
[--delete2] [--delete2duplicates]
|
||||||
[--expunge] [--expunge1] [--expunge2] [--uidexpunge2]
|
[--expunge] [--expunge1] [--expunge2] [--uidexpunge2]
|
||||||
[--delete2folders] [--delete2foldersonly] [--delete2foldersbutnot]
|
[--delete2folders] [--delete2foldersonly] [--delete2foldersbutnot]
|
||||||
[--subscribed] [--subscribe] [--subscribe_all]
|
[--subscribed] [--subscribe] [--subscribeall]
|
||||||
[--nofoldersizes] [--nofoldersizesatend]
|
[--nofoldersizes] [--nofoldersizesatend]
|
||||||
[--dry]
|
[--dry]
|
||||||
[--debug] [--debugimap][--debugimap1][--debugimap2]
|
[--debug] [--debugimap][--debugimap1][--debugimap2] [--debugcontent]
|
||||||
[--timeout <int>]
|
[--timeout <int>]
|
||||||
[--split1] [--split2]
|
|
||||||
[--reconnectretry1 <int>] [--reconnectretry2 <int>]
|
|
||||||
[--noreleasecheck]
|
[--noreleasecheck]
|
||||||
[--releasecheck]
|
[--releasecheck]
|
||||||
[--pidfile <filepath>]
|
[--pidfile <filepath>] [--pidfilelocking]
|
||||||
[--tmpdir <dirpath>]
|
[--tmpdir <dirpath>]
|
||||||
[--nolog]
|
[--nolog]
|
||||||
[--log]
|
|
||||||
[--logfile <filepath>]
|
[--logfile <filepath>]
|
||||||
[--version] [--help]
|
[--version] [--help]
|
||||||
[--tests] [--tests_debug]
|
[--tests] [--testsdebug] [--testslive]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
The command imapsync is a tool allowing incremental and recursive imap
|
Imapsync command is a tool allowing incremental and recursive imap
|
||||||
transfer from one mailbox to another.
|
transfers from one mailbox to another.
|
||||||
|
|
||||||
By default all folders are transferred, recursively, all possible flags
|
By default all folders are transferred, recursively, all possible flags
|
||||||
(\Seen \Answered \Flagged etc.) are synced too.
|
(\Seen \Answered \Flagged etc.) are synced too.
|
||||||
|
@ -115,12 +121,13 @@ DESCRIPTION
|
||||||
We sometimes need to transfer mailboxes from one imap server to another.
|
We sometimes need to transfer mailboxes from one imap server to another.
|
||||||
This is called migration.
|
This is called migration.
|
||||||
|
|
||||||
imapsync is a good tool because it reduces the amount of data
|
Imapsync reduces the amount of data transferred by not transferring a
|
||||||
transferred by not transferring a given message if it is already on both
|
given message if it resides already on both sides. Same specific headers
|
||||||
sides. Same headers and the transfer is done only once. All flags are
|
and the transfer is done only once; taken into account are by default
|
||||||
preserved, unread will stay unread, read will stay read, deleted will
|
Message-Id and Received header lines. All flags are preserved, unread
|
||||||
stay deleted. You can stop the transfer at any time and restart it
|
will stay unread, read will stay read, deleted will stay deleted. You
|
||||||
later, imapsync works well with bad connections.
|
can stop the transfer at any time and restart it later, imapsync works
|
||||||
|
well with bad connections and interruptions.
|
||||||
|
|
||||||
You can decide to delete the messages from the source mailbox after a
|
You can decide to delete the messages from the source mailbox after a
|
||||||
successful transfer, it can be a good feature when migrating live
|
successful transfer, it can be a good feature when migrating live
|
||||||
|
@ -128,22 +135,26 @@ DESCRIPTION
|
||||||
--delete option. Option --delete implies also option --expunge so all
|
--delete option. Option --delete implies also option --expunge so all
|
||||||
messages marked deleted on host1 will be really deleted. (you can use
|
messages marked deleted on host1 will be really deleted. (you can use
|
||||||
--noexpunge to avoid this but I don't see any good real world scenario
|
--noexpunge to avoid this but I don't see any good real world scenario
|
||||||
for the combinaison --delete --noexpunge).
|
for the combination --delete --noexpunge).
|
||||||
|
|
||||||
You can also just synchronize a mailbox B from another mailbox A in case
|
A different scenario is synchronizing a mailbox B from another mailbox A
|
||||||
you just want to keep a "live" copy of A in B. In that case --delete2
|
in case you just want to keep a "live" copy of A in B. In that case
|
||||||
can be used, it deletes messages in host2 folder B that are not in host1
|
--delete2 has to be used, it deletes messages in host2 folder B that are
|
||||||
folder A.
|
not in host1 folder A. If you also need to destroy host2 folders that
|
||||||
|
are not in host1 then use --delete2folders (see also
|
||||||
|
--delete2foldersonly and --delete2foldersbutnot).
|
||||||
|
|
||||||
imapsync is not adequate for maintaining two active imap accounts in
|
Imapsync is not adequate for maintaining two active imap accounts in
|
||||||
synchronization where the user plays independently on both sides. Use
|
synchronization when the user plays independently on both sides. Use
|
||||||
offlineimap (written by John Goerzen) or mbsync (written by Michael R.
|
offlineimap (written by John Goerzen) or mbsync (written by Michael R.
|
||||||
Elkins) for 2 ways synchronizations.
|
Elkins) for 2 ways synchronizations.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
To get a description of each option just invoke:
|
To get a description of each option just invoke:
|
||||||
|
|
||||||
imapsync --help
|
imapsync
|
||||||
|
|
||||||
|
or read http://imapsync.lamiral.info/OPTIONS
|
||||||
|
|
||||||
HISTORY
|
HISTORY
|
||||||
I wrote imapsync because an enterprise (basystemes) paid me to install a
|
I wrote imapsync because an enterprise (basystemes) paid me to install a
|
||||||
|
@ -151,9 +162,9 @@ HISTORY
|
||||||
remote imap server accessible by a low bandwidth link. The tool imapcp
|
remote imap server accessible by a low bandwidth link. The tool imapcp
|
||||||
(written in python) could not help me because I had to verify every
|
(written in python) could not help me because I had to verify every
|
||||||
mailbox was well transferred and delete it after a good transfer.
|
mailbox was well transferred and delete it after a good transfer.
|
||||||
imapsync started life as a copy_folder.pl patch. The tool copy_folder.pl
|
imapsync started its life as a copy_folder.pl patch. The tool
|
||||||
comes from the Mail-IMAPClient-2.1.3 perl module tarball source (in the
|
copy_folder.pl comes from the Mail-IMAPClient-2.1.3 perl module tarball
|
||||||
examples/ directory of the tarball).
|
source (in the examples/ directory of the tarball).
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
While working on imapsync parameters please run imapsync in dry mode (no
|
While working on imapsync parameters please run imapsync in dry mode (no
|
||||||
|
@ -266,7 +277,7 @@ BUG REPORT GUIDELINES
|
||||||
http://search.cpan.org/dist/Mail-IMAPClient/ maybe the bug is already
|
http://search.cpan.org/dist/Mail-IMAPClient/ maybe the bug is already
|
||||||
fixed there.
|
fixed there.
|
||||||
|
|
||||||
Make a good title with word "imapsync" in it (my spam filter won't
|
Make a good title with word "imapsync" in it (my spam filters won't
|
||||||
filter it), Try to write an email title with more words than just
|
filter it), Try to write an email title with more words than just
|
||||||
"imapsync" or "problem", a good title is made of keywords summary, but
|
"imapsync" or "problem", a good title is made of keywords summary, but
|
||||||
not too long (one visible line).
|
not too long (one visible line).
|
||||||
|
@ -466,7 +477,9 @@ Hacking
|
||||||
Feel free to hack imapsync as the NOLIMIT license permits it.
|
Feel free to hack imapsync as the NOLIMIT license permits it.
|
||||||
|
|
||||||
Links
|
Links
|
||||||
Entries for imapsync: http://www.imap.org/products/showall.php
|
Entries for imapsync:
|
||||||
|
https://web.archive.org/web/20070202005121/http://www.imap.org/products/
|
||||||
|
showall.php
|
||||||
|
|
||||||
SIMILAR SOFTWARES
|
SIMILAR SOFTWARES
|
||||||
imap_tools : http://www.athensfbc.com/imap_tools
|
imap_tools : http://www.athensfbc.com/imap_tools
|
||||||
|
@ -487,5 +500,5 @@ SIMILAR SOFTWARES
|
||||||
|
|
||||||
Feedback (good or bad) will often be welcome.
|
Feedback (good or bad) will often be welcome.
|
||||||
|
|
||||||
$Id: imapsync,v 1.607 2014/11/14 16:25:06 gilles Exp gilles $
|
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: README_Windows.txt,v 1.4 2014/05/29 23:41:41 gilles Exp gilles $
|
# $Id: README_Windows.txt,v 1.5 2015/03/26 04:27:39 gilles Exp gilles $
|
||||||
#
|
#
|
||||||
# README_Windows.txt file for imapsync
|
# README_Windows.txt file for imapsync
|
||||||
# imapsync : IMAP sync and migrate tool.
|
# imapsync : IMAP sync and migrate tool.
|
||||||
|
@ -10,7 +10,7 @@ Two ways to install and use imapsync on Windows systems: A) or B).
|
||||||
|
|
||||||
Standard users should only take the A) way.
|
Standard users should only take the A) way.
|
||||||
|
|
||||||
Developpers, users that want to build their own imapsync.exe
|
Developers, users that want to build their own imapsync.exe
|
||||||
or modify it, have to consider the B) way.
|
or modify it, have to consider the B) way.
|
||||||
|
|
||||||
A) Simplest way
|
A) Simplest way
|
||||||
|
@ -25,27 +25,30 @@ where 1.xxx is the imapsync release number.
|
||||||
A.2) Extract the zip file in a folder where you'll work with imapsync
|
A.2) Extract the zip file in a folder where you'll work with imapsync
|
||||||
|
|
||||||
You can work on the Desktop since the zip file extraction creates
|
You can work on the Desktop since the zip file extraction creates
|
||||||
a uniq folder named imapsync_1.xxx (where 1.xxx is the imapsync
|
a unique folder named imapsync_1.xxx (where 1.xxx is the imapsync
|
||||||
release number).
|
release number).
|
||||||
|
|
||||||
A.3) Check the folder
|
A.3) Check the folder
|
||||||
|
|
||||||
In the folder extracted imapsync_1.xxx you see 6 files:
|
In the folder extracted imapsync_1.xxx you see 6 files and 2 directories:
|
||||||
|
|
||||||
* README_Windows.txt is the current file you are reading
|
* README_Windows.txt is the current file you are reading
|
||||||
* imapsync_example.bat is a batch file example you will copy and edit
|
* imapsync_example.bat is a batch file example you will copy and edit
|
||||||
* sync_loop_windows.bat is a batch file example for syncing many accounts
|
* sync_loop_windows.bat is a batch file example for syncing many accounts
|
||||||
* FAQ.txt contains many useful tips,
|
* FAQ.txt contains many useful tips, too many so I started
|
||||||
FAQ is a must read when something goes wrong.
|
* FAQ.d/* to split them in FAQ.d/ folder.
|
||||||
|
FAQs are a must read when something goes wrong.
|
||||||
* README.txt imapsync general documentation.
|
* README.txt imapsync general documentation.
|
||||||
* imapsync.exe is the imapsync binary. You don't have to run it directly.
|
* imapsync.exe is the imapsync binary. You don't have to run it directly.
|
||||||
|
* Cook/ is the directory to build imapsync.exe from its source.
|
||||||
|
|
||||||
You can copy or rename imapsync_example.bat as you wish as long as
|
You can copy or rename imapsync_example.bat as you wish as long as
|
||||||
its extension remains ".bat". On Windows systems .bat extension
|
its extension remains ".bat". On Windows systems .bat extension
|
||||||
means "I'm a batch script". Same thing for sync_loop_windows.bat.
|
means "I'm a batch script". Same thing for sync_loop_windows.bat.
|
||||||
The batch scripts have to stay with imapsync.exe because
|
The batch scripts have to stay with imapsync.exe because
|
||||||
of the way they call it, they use ".\imapsync.exe", so
|
of the way they call it, they use ".\imapsync.exe", so
|
||||||
let them be in the same directory.
|
let them be in the same directory (or change the path if you
|
||||||
|
understand what you're doing).
|
||||||
|
|
||||||
For the rest of this documentation I assume you copied
|
For the rest of this documentation I assume you copied
|
||||||
imapsync_example.bat to a file named imapsync_stuff.bat
|
imapsync_example.bat to a file named imapsync_stuff.bat
|
||||||
|
@ -58,15 +61,15 @@ in the list presented in the small window menu.
|
||||||
Notepad is a good editor to modify it,
|
Notepad is a good editor to modify it,
|
||||||
Office Word is not good for that job.
|
Office Word is not good for that job.
|
||||||
|
|
||||||
File FAQ.txt contains many tips and special options sometimes
|
Files FAQ.txt and FAQ.d/* contain many tips and special options sometimes
|
||||||
needed by specific imap server softwares like Exchange or Gmail.
|
needed by specific imap server softwares like Exchange or Gmail.
|
||||||
|
|
||||||
A.5) Run the batch file
|
A.5) Run the batch file
|
||||||
|
|
||||||
To run imapsync with your values just double-clic on
|
To run imapsync with your values just double-clic on
|
||||||
the batch file imapsync_example.bat
|
the batch file imapsync_stuff.bat
|
||||||
|
|
||||||
You do not need to have administrator priviledge to run imapsync.
|
You do not need to have administrator privilege to run imapsync.
|
||||||
|
|
||||||
A.6) Loop on A.5) A.6)
|
A.6) Loop on A.5) A.6)
|
||||||
|
|
||||||
|
@ -77,27 +80,25 @@ A.7) Look the sync running. You can abort it at any time with a ctrl-c.
|
||||||
|
|
||||||
A.8) When the sync is finished you can find the whole log of the output
|
A.8) When the sync is finished you can find the whole log of the output
|
||||||
in the folder named "LOG_imapsync", the logfile name is based
|
in the folder named "LOG_imapsync", the logfile name is based
|
||||||
on the launching date and hour and the user2 parameter, one logfile per run.
|
on the launching date, hour, minute, second and the user2 parameter,
|
||||||
|
one logfile per run.
|
||||||
The logfile name is printed at the end of the imapsync run.
|
The logfile name is printed at the end of the imapsync run.
|
||||||
If you do not want logging in a file use option --nolog
|
If you do not want logging in a file use option --nolog
|
||||||
|
|
||||||
|
|
||||||
B) Hard way. It is the hard way because it installs all software
|
B) Hard way. It is the hard way because it installs all software
|
||||||
dependencies. This is the way for modifying imapsync if needed.
|
dependencies. This is the way for modifying imapsync.exe if needed.
|
||||||
|
|
||||||
- Get imapsync-x.xx.tgz
|
B.1) Install Perl if it isn't already installed.
|
||||||
|
|
||||||
- Install Perl if it isn't already installed.
|
|
||||||
Strawberry Perl is a very good candidate
|
Strawberry Perl is a very good candidate
|
||||||
http://strawberryperl.com/
|
http://strawberryperl.com/
|
||||||
|
I use 5.16 (March 2015) but later releases should work (5.18 and 5.20 do)
|
||||||
|
|
||||||
- Use the command CPAN to install modules listed in the PREREQUISITES section.
|
B.2) Go into the Cook/ directory
|
||||||
There is also a batch file that does this install for you
|
B.3) Double-clic build_exe.bat
|
||||||
It is called install_modules.bat available at
|
|
||||||
http://imapsync.lamiral.info/examples/install_modules.bat
|
|
||||||
|
|
||||||
c) How to build imapsync.exe?
|
It should create a binary imapsync.exe in the current Cook/ directory.
|
||||||
|
|
||||||
- Do the hard stuff in B)
|
B.4) Move imapsync.exe in the upper directory and follow instructions
|
||||||
- Run build_exe.bat (found in the tarball)
|
from A.3) to A.8)
|
||||||
|
|
||||||
|
|
1
S/VERSION
Symbolic link
1
S/VERSION
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../VERSION
|
107
S/external.shtml
Executable file
107
S/external.shtml
Executable file
|
@ -0,0 +1,107 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="TOP">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Imapsync similar softwares and external services</title>
|
||||||
|
<meta name="generator" content="Bluefish 1.0.7"/>
|
||||||
|
<meta name="author" content="Gilles LAMIRAL"/>
|
||||||
|
<meta name="date" content="2015-01-30T17:30:18+0100"/>
|
||||||
|
<meta name="copyright" content="None"/>
|
||||||
|
<meta name="keywords" content="imap, transfer, migration"/>
|
||||||
|
<meta name="description" content="imap migration tool"/>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-style-type" content="text/css"/>
|
||||||
|
<meta http-equiv="expires" content="0"/>
|
||||||
|
<link rel="icon" type="image/png" href="../W/images/logo_imapsync_s.png" />
|
||||||
|
<link href="../W/style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Similar softwares <a id="similar" href="../#TOP"><small>(back to menu)</small></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li> <b>imapsync</b>: <a href="https://github.com/imapsync/imapsync">https://github.com/imapsync/imapsync</a> (imapsync copy, sometimes delayed)</li>
|
||||||
|
<li> imap_tools: <a href="http://www.athensfbc.com/imap_tools/">http://www.athensfbc.com/imap_tools/</a></li>
|
||||||
|
<li> davmail: <a href="http://davmail.sourceforge.net/">http://davmail.sourceforge.net/</a></li>
|
||||||
|
|
||||||
|
<li> imaputils: <a href="http://code.google.com/p/imaputils/">http://code.google.com/p/imaputils/</a> (imap_tools fork)</li>
|
||||||
|
<li> <b>offlineimap</b>: <a href="http://offlineimap.org/">http://offlineimap.org/</a></li>
|
||||||
|
<li> <b>mbsync</b>: <a href="http://isync.sourceforge.net/">http://isync.sourceforge.net/</a></li>
|
||||||
|
<li> mailsync: <a href="http://mailsync.sourceforge.net/">http://mailsync.sourceforge.net/</a></li>
|
||||||
|
<li> mailutil: <a href="http://www.washington.edu/imap/">http://www.washington.edu/imap/</a>
|
||||||
|
part of the UW IMAP tookit.</li>
|
||||||
|
<li> imaprepl: <a href="https://bl0rg.net/software/">https://bl0rg.net/software/</a>
|
||||||
|
<a href="http://freecode.com/projects/imap-repl/">http://freecode.com/projects/imap-repl/</a></li>
|
||||||
|
<li> imapcopy (Pascal): <a href="http://home.arcor.de/armin.diehl/imapcopy/imapcopy.html">http://home.arcor.de/armin.diehl/imapcopy/imapcopy.html</a></li>
|
||||||
|
<li> imapcopy (Java): <a href="https://code.google.com/p/imapcopy/">https://code.google.com/p/imapcopy/</a></li>
|
||||||
|
<li> migrationtool: <a href="http://sourceforge.net/projects/migrationtool/">http://sourceforge.net/projects/migrationtool/</a></li>
|
||||||
|
<li> imapmigrate: <a href="http://sourceforge.net/projects/cyrus-utils/">http://sourceforge.net/projects/cyrus-utils/</a></li>
|
||||||
|
<li> larch: <a href="https://github.com/rgrove/larch">https://github.com/rgrove/larch</a> (derived from wonko_imapsync, good at Gmail)</li>
|
||||||
|
<li> wonko_imapsync: <a href="http://web.archive.org/web/20130807173030/http://wonko.com/post/ruby_script_to_sync_email_from_any_imap_server_to_gmail">http://wonko.com/article/554</a> (superseded by larch)</li>
|
||||||
|
<li> pop2imap: <a href="http://www.linux-france.org/prj/pop2imap/">http://www.linux-france.org/prj/pop2imap/</a></li>
|
||||||
|
<li> exchange-away: <a href="http://exchange-away.sourceforge.net/">http://exchange-away.sourceforge.net/</a></li>
|
||||||
|
<li> SyncBackPro <a href="http://www.2brightsparks.com/syncback/sbpro.html">http://www.2brightsparks.com/syncback/sbpro.html</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1>External online IMAP migration services <a id="ONLINE_OTHERS" href="../#TOP"><small>(back to menu)</small></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>I have no share in these free or paid services.
|
||||||
|
I don't think they use Imapsync.
|
||||||
|
Prices are given par mailbox and may be outdated (December 2011).</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li> French Ovh imapcopy <b>0 EUR</b>: <a href="https://ssl0.ovh.net/fr/imapcopy/">https://ssl0.ovh.net/fr/imapcopy/</a></li>
|
||||||
|
<li> Turkish imapcopy.net <b>0 TRY</b>: <a href="http://imapcopy.net/">http://imapcopy.net/</a></li>
|
||||||
|
<li> Movemymail free for the first and 5 USD thereafter: <a href="https://movemymail.net">https://movemymail.net</a> .</li>
|
||||||
|
<li> Migrationwiz 10 USD: <a href="https://www.bittitan.com/products/#migrationwiz"></a>https://www.bittitan.com/products/#migrationwiz</li>
|
||||||
|
<li> Rackspace migration 5 USD: <a href="http://www.rackspace.com/email-hosting/migrations">http://www.rackspace.com/email-hosting/migrations</a></li>
|
||||||
|
<li> Audriga Gmbh 9.99 EUR: <a href="https://www.email-umzug.de/en.html">https://www.email-umzug.de/</a></li>
|
||||||
|
<li> Yippiemove 15 USD: <a href="http://www.yippiemove.com">http://www.yippiemove.com/</a></li>
|
||||||
|
<li> Dell ondemand-migration-for-email (price unknown): <a href="http://software.dell.com/products/ondemand-migration-for-email/">http://software.dell.com/products/ondemand-migration-for-email/</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<div>
|
||||||
|
<a href="http://validator.w3.org/check?uri=referer">
|
||||||
|
<img
|
||||||
|
src="../W/images/valid-xhtml10"
|
||||||
|
alt="Valid XHTML 1.0 Strict" height="31" width="88" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/vcss-blue"
|
||||||
|
alt="CSS Valide !" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://www.anybrowser.org/campaign/">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/ab_jlh.png"
|
||||||
|
alt="Viewable With Any Browser" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<!--#config timefmt="%D" -->
|
||||||
|
<!--#config timefmt="%A %B %d, %Y" -->
|
||||||
|
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
|
||||||
|
($Id: external.shtml,v 1.4 2015/04/01 00:00:50 gilles Exp gilles $)<br/>
|
||||||
|
<a href="#TOP">Top of the page</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
186
S/imapservers.shtml
Executable file
186
S/imapservers.shtml
Executable file
|
@ -0,0 +1,186 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="TOP">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Imapsync list of imap server softwares supported (and the failures one)</title>
|
||||||
|
<meta name="generator" content="Bluefish 1.0.7"/>
|
||||||
|
<meta name="author" content="Gilles LAMIRAL"/>
|
||||||
|
<meta name="date" content="2015-01-30T17:30:18+0100"/>
|
||||||
|
<meta name="copyright" content="None"/>
|
||||||
|
<meta name="keywords" content="imap, transfer, migration"/>
|
||||||
|
<meta name="description" content="imap migration tool"/>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-style-type" content="text/css"/>
|
||||||
|
<meta http-equiv="expires" content="0"/>
|
||||||
|
<link rel="icon" type="image/png" href="../W/images/logo_imapsync_s.png" />
|
||||||
|
<link href="../W/style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<h1>Imapsync list of imap server softwares supported (and the failures one) <a id="imap_server_success" href="../#TOP"><small>(back to menu)</small></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<p>Let's start with the long reported <b>success stories</b> list: <b>
|
||||||
|
62 different imap server softwares supported!</b><br/>
|
||||||
|
[host1] means "source server" and [host2] means "destination server":
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>1und1 H mimap1 84498 [host1], H mibap4 95231 [host1](<a href="http://www.1und1.de/">http://www.1und1.de/</a>)</li>
|
||||||
|
<li>a1.net imap.a1.net IMAP4 Ready [host1] </li>
|
||||||
|
<li><b>Apple Server</b> 10.6 Snow Leopard [host1] </li>
|
||||||
|
<li>Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
|
||||||
|
(OSL 3.0) (<a href="http://www.archiveopteryx.org/">http://www.archiveopteryx.org/</a>)</li>
|
||||||
|
<li>Atmail 6.x [host1] <a href="https://www.atmail.com/">https://www.atmail.com/</a></li>
|
||||||
|
<li>Axigen Mail Server Version 8.0.0 (<a href="https://www.axigen.com/">https://www.axigen.com/</a>)</li>
|
||||||
|
<li>BincImap 1.2.3 (GPL) (<a href="http://www.bincimap.org/">http://www.bincimap.org/</a>)</li>
|
||||||
|
<li>CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
|
||||||
|
(<a href="http://www.communigate.com/">http://www.communigate.com/</a>) </li>
|
||||||
|
<li>Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
|
||||||
|
(<a href="http://www.courier-mta.org/imap/">http://www.courier-mta.org/imap/</a>) </li>
|
||||||
|
<li>Critical Path (7.0.020) </li>
|
||||||
|
<li>Cyrus IMAP 1.5, 1.6,
|
||||||
|
2.1, 2.1.15, 2.1.16, 2.1.18
|
||||||
|
2.2.1, 2.2.2-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
|
||||||
|
2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
|
||||||
|
(<a href="http://cyrusimap.web.cmu.edu/">http://cyrusimap.web.cmu.edu/</a>)
|
||||||
|
</li>
|
||||||
|
<li>David Tobit V8. (<a href="http://de.tobit.com/">http://de.tobit.com/</a>) </li>
|
||||||
|
<li>DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL).
|
||||||
|
2.0.7 seems buggy. (<a href="http://www.dbmail.org/">http://www.dbmail.org/</a>) </li>
|
||||||
|
<li>DBOX 2.41 System [host1] (<a href="http://www.dbox.handshake.de/">http://www.dbox.handshake.de/</a>).</li>
|
||||||
|
<li>Deerfield VisNetic MailServer 5.8.6 [host1]
|
||||||
|
(<a href="http://www.deerfield.net/products/visnetic-mailserver/">http://www.deerfield.net/products/visnetic-mailserver/</a>) </li>
|
||||||
|
<li>dkimap4 [host1] </li>
|
||||||
|
<li>Domino (Notes) 4.61[host1], 6.5, 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1, 7.0.1[host1], 8.0.1[host1]
|
||||||
|
(<a href="http://www-03.ibm.com/software/products/en/ibmnotes">http://www-03.ibm.com/software/products/en/ibmnotes</a>) </li>
|
||||||
|
<li><b>Dovecot</b> 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7,
|
||||||
|
1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/) (<a href="http://www.dovecot.org/">http://www.dovecot.org/</a>) </li>
|
||||||
|
<li>Eudora WorldMail v2 (<a href="http://www.eudora.com/worldmail/">http://www.eudora.com/worldmail/</a>) </li>
|
||||||
|
<li>FirtClass 12 [host1] hard so read the FAQ! (<a href="http://www.firstclass.com/">http://www.firstclass.com/</a>)</li>
|
||||||
|
<li>FTGate [host1][host2] (<a href="http://www.ftgate.com/">http://www.ftgate.com/</a>)</li>
|
||||||
|
<li>Fusemail imap.fusemail.net:143 (<a href="https://www.fusemail.com/">https://www.fusemail.com/</a>).</li>
|
||||||
|
<li><b>Gimap</b> (<b>Gmail</b> imap) [host1] [host2] (<a href="http://mail.google.com/">http://mail.google.com/</a>) </li>
|
||||||
|
<li>GMX IMAP4 StreamProxy. (<a href="http://www.gmx.com/">http://www.gmx.com/</a>) </li>
|
||||||
|
<li>Godaddy IMAP (since Godaddy runs Courier) (<a href="https://www.godaddy.com/">https://www.godaddy.com/</a>) </li>
|
||||||
|
<li>Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
|
||||||
|
(<a href="http://www.novell.com/products/groupwise/">http://www.novell.com/products/groupwise/</a>) </li>
|
||||||
|
<li>hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1], HMAILSERVER 5.3.2-B1769 on windows 2003 [hsot2]
|
||||||
|
(<a href="https://www.hmailserver.com/">https://www.hmailserver.com/</a>) </li>
|
||||||
|
<li><b>Hotmail</b> hotmail.com is outlook.com and live.com now.</li>
|
||||||
|
<li>IceWarp Server 10.4.5 [host1] (<a href="https://www.icewarp.com/">https://www.icewarp.com/</a>)</li>
|
||||||
|
<li>iPlanet Messaging server 4.15, 5.1, 5.2
|
||||||
|
(<a href="http://en.wikipedia.org/wiki/Oracle_Communications_Messaging_Server">http://en.wikipedia.org/wiki/Oracle_Communications_Messaging_Server</a>) </li>
|
||||||
|
<li>IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] (<a href="http://www.imailserver.com/">http://www.imailserver.com/</a>) </li>
|
||||||
|
<li>Kerio 7.2.0P1 [host1] (<a href="http://www.kerio.com/">http://www.kerio.com/</a>) </li>
|
||||||
|
<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), 9.6.5 [host1],
|
||||||
|
12 [host2], 12.0.3 [host1], 12.5.5 [host1], 13.5 [host2], 14.5 [host2]
|
||||||
|
(<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],
|
||||||
|
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
|
||||||
|
Exchange2007-EP-SP2,
|
||||||
|
Exchange 2010 RTM (Release to Manufacturing) [host2],
|
||||||
|
Exchange 2010 SP1 RU2 [host2]
|
||||||
|
(<a href="http://www.microsoft.com/exchange/">http://www.microsoft.com/exchange/</a>)
|
||||||
|
</li>
|
||||||
|
<li>Mirapoint server 4.1.9-GA [host1] (<a href="http://www.mirapoint.com/">http://www.mirapoint.com/</a>) </li>
|
||||||
|
<li>Netscape Mail Server 3.6 (Wintel) </li>
|
||||||
|
<li>Netscape Messaging Server 4.15 Patch 7 </li>
|
||||||
|
<li><b>Office 365</b> [host1] [host2] (<a href="http://office365.com">http://office365.com</a>) </li>
|
||||||
|
<li>OpenMail IMAP server B.07.00.k0 </li>
|
||||||
|
<li>OpenWave (<a href="http://www.openwave.com/">http://www.openwave.com/</a>) </li>
|
||||||
|
<li>Oracle Beehive [host1]
|
||||||
|
(<a href="http://www.oracle.com/technetwork/middleware/beehive/overview/index.html">http://www.oracle.com/technetwork/middleware/beehive/overview/</a>) </li>
|
||||||
|
<li><b><a href="http://outlook.com/">Outlook.com</a></b> can be IMAP accessed via host imap-mail.outlook.com over ssl (use --ssl1 or --ssl2).</li>
|
||||||
|
<li>Parallels Plesk Panel 9.x [host2] 11.x [host2] (<a href="http://www.parallels.com/">http://www.parallels.com/</a>)</li>
|
||||||
|
<li>Qualcomm Worldmail (NT) (<a href="http://www.eudora.com/worldmail/">http://www.eudora.com/worldmail/</a>) </li>
|
||||||
|
<li>Rockliffe Mailsite 5.3.11, 4.5.6 (<a href="http://www.mailsite.com/">http://www.mailsite.com/</a>) </li>
|
||||||
|
<li>RackSpace hoster secure.emailsrvr.com:993 <a href="http://www.rackspace.com/">http://www.rackspace.com/</a>)</li>
|
||||||
|
<li>QQMail IMAP4Server [host1] [host2] (See FAQ) <a href="https://en.mail.qq.com/">https://en.mail.qq.com/</a> </li>
|
||||||
|
<li>Samsung Contact IMAP server 8.5.0 </li>
|
||||||
|
<li>Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6 (<a href="http://www.scalix.com/">http://www.scalix.com/</a>) </li>
|
||||||
|
<li>Sendmail Mail Store IMAP4rev1 (5.5.6/mstore-5-5-build-1874 [host1].</li>
|
||||||
|
<li>SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1], SmarterMail Professional 10.2 [host1],
|
||||||
|
Smarter Mail 11.7 [host1][host2].
|
||||||
|
(<a href="http://www.smartertools.com/">http://www.smartertools.com/</a>) </li>
|
||||||
|
<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, 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>
|
||||||
|
<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>
|
||||||
|
<li>Zarafa ZCP 7.1.4 IMAP Gateway [host2]</li>
|
||||||
|
<li><b>Zimbra-IMAP</b> 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
|
||||||
|
Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
|
||||||
|
(<a href="http://www.zimbra.com/">http://www.zimbra.com/</a>) </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Let's finish with reported <b>failure stories</b> over the past.<br/>
|
||||||
|
Maybe <b>new imapsync releases can run successfully with them</b>.<br/>
|
||||||
|
Don't hesitate to have a try, It's been a long time since last failure occured,
|
||||||
|
I will help you and make efforts to switch them to the success list,
|
||||||
|
that's my job.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>DBMail 0.9, 2.0.7 (GPL). But most other DBMail releases are supported (see below).</li>
|
||||||
|
<li>Imail 7.04 (maybe).</li>
|
||||||
|
<li>MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported. </li>
|
||||||
|
<li>(2011) <b>MDaemon 12.0.3</b> as <b>host2</b>
|
||||||
|
but MDaemon is <b>supported as host1</b>.
|
||||||
|
MDaemon is simply buggy with the APPEND IMAP command with any IMAP email client.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<div>
|
||||||
|
<a href="http://validator.w3.org/check?uri=referer">
|
||||||
|
<img
|
||||||
|
src="../W/images/valid-xhtml10"
|
||||||
|
alt="Valid XHTML 1.0 Strict" height="31" width="88" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/vcss-blue"
|
||||||
|
alt="CSS Valide !" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://www.anybrowser.org/campaign/">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/ab_jlh.png"
|
||||||
|
alt="Viewable With Any Browser" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<!--#config timefmt="%D" -->
|
||||||
|
<!--#config timefmt="%A %B %d, %Y" -->
|
||||||
|
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
|
||||||
|
($Id: imapservers.shtml,v 1.1 2015/03/29 17:24:01 gilles Exp gilles $)<br/>
|
||||||
|
<a href="#TOP">Top of the page</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
305
S/news.shtml
Executable file
305
S/news.shtml
Executable file
|
@ -0,0 +1,305 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="TOP">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Imapsync News</title>
|
||||||
|
<meta name="generator" content="Bluefish 2.2.2" />
|
||||||
|
<meta name="author" content="Gilles LAMIRAL" />
|
||||||
|
<meta name="date" content="2015-03-29T15:09:06+0200" />
|
||||||
|
<meta name="copyright" content="None"/>
|
||||||
|
<meta name="keywords" content="imap, transfer, migration"/>
|
||||||
|
<meta name="description" content="imap migration tool"/>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-style-type" content="text/css"/>
|
||||||
|
<meta http-equiv="expires" content="0"/>
|
||||||
|
<link rel="icon" type="image/png" href="../W/images/logo_imapsync_s.png" />
|
||||||
|
<link href="../W/style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<h1>News about imapsync <!--#exec cmd="cat ../VERSION" --> and previous releases <a id="latest" href="../#TOP"><small>(back to menu)</small></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>imapsync <!--#exec cmd="cat ../VERSION" --> was written on <!--#flastmod file="VERSION" -->
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div id="osw_imapsync"></div>
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="http://static.oswatershed.org/js/package_badge.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">$(document).ready(function(){ package_badge("imapsync", "#osw_imapsync"); });</script>
|
||||||
|
|
||||||
|
<p>See <b><a href="../ChangeLog">ChangeLog</a></b> to read what has been done in details since 2001.</p>
|
||||||
|
|
||||||
|
<p>New features or bugfixes since previous releases:</p>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<ul>
|
||||||
|
<li><b>1.636</b></li>
|
||||||
|
<li><b>Enhancement</b>: </li>
|
||||||
|
<li><b>Enhancement</b>: </li>
|
||||||
|
<li><b>Enhancement</b>: </li>
|
||||||
|
|
||||||
|
<li><b>Usability</b>: </li>
|
||||||
|
<li><b>Usability</b>: </li>
|
||||||
|
<li><b>Usability</b>: </li>
|
||||||
|
<li><b>Usability</b>: </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>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>1.636</b></li>
|
||||||
|
<li><b>Enhancement</b>: Added errors dump listing at the end, before last folder sizes or the statistics. Turned on by default. Use --noerrorsdump to avoid it.</li>
|
||||||
|
<li><b>Enhancement</b>: Added --maxlinelengthcmd that will be called upon when a line over --maxlinelength is detected. </li>
|
||||||
|
<li><b>Enhancement</b>: Exchange maxlinelength issue fixed with --maxlinelengthcmd 'reformime -r7' on Linux. Install maildrop package to get reformime command</li>
|
||||||
|
<li><b>Enhancement</b>: Added --testslive. "imapsync --testslive" performs a live test on real accounts (I own).</li>
|
||||||
|
<li><b>Enhancement</b>: Added --pipemess in order to pass all message to an external filter tool like "reformime -r7".</li>
|
||||||
|
<li><b>Enhancement</b>: Added xoauth2 support, available on Unix with underlying openssl. Thanks to Joaquin Lopez.</li>
|
||||||
|
<li><b>Enhancement</b>: Added --skipmess to skip messages matching a regex.
|
||||||
|
Example --skipmess 'm/[\x80-ff]/' to slip messages with non-7bit characters ( ie a byte somewhere begins with 1 )</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Better output of folders excluded by --exclude and folders included by --include</li>
|
||||||
|
<li><b>Usability</b>: Added inline help in many places. What you can do with switches to change imapsync behaviour, contextually. Learn imapsync the easy way.</li>
|
||||||
|
|
||||||
|
<li><b>Bug fix</b>: imapsync --tests should work under any circumstance now, any Unix, Windows, exe or bin or script. 561 non-regression tests</li>
|
||||||
|
<li><b>Bug fix</b>: --folderfirst and --folderlast generated an error when their value folder does not exist. Existence is checked.</li>
|
||||||
|
<li><b>Bug fix</b>: --disarmreadreceipts used to change Disposition-Notification-To in the body when not available in the header. Now never changes the body in all cases.</li>
|
||||||
|
<li><b>Bug fix</b>: Change default useheader values. Now it is really like --useheader "Message-Id" --useheader "Received".
|
||||||
|
HMailServer replies two lines with --useheader "Message-Id" --useheader "Message-ID" in older releases.
|
||||||
|
</li>
|
||||||
|
<li><b>Bug fix</b>: in imap_utf7_decode() + must not be escaped. Was a bug with Cyrillic characters</li>
|
||||||
|
|
||||||
|
<li><b>Refactoring</b>: Started to split the <a href="../FAQ">FAQ</a> file in several parts in <a href="../FAQ.d/">FAQ.d/*</a></li>
|
||||||
|
<li><b>Refactoring</b>: Split the <a href="../INSTALL">INSTALL</a> file in several parts in <a href="../INSTALL.d/">INSTALL.d/*</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>1.607</b> Folders shown also in utf8.</li>
|
||||||
|
<li><b>Caveat to upgrade on Unix!</b>: New <b>Unicode::String</b> Perl module dependency, for utf8 output. See the <a href="../INSTALL">INSTALL</a> file.</li>
|
||||||
|
<li><b>Enhancement</b>: Added --skipemptyfolders to skip syncing empty host1 folders. They are not created on host2.</li>
|
||||||
|
<li><b>Enhancement</b>: Windows exe now uses IO::SSL 2.002 instead of 1.98 (is it really an enhancement?).</li>
|
||||||
|
<li><b>Usability</b>: Remove /x from regexes applied with --include and --exclude. Blanks no longer have to be explicit with \ or [ ].</li>
|
||||||
|
<li><b>Usability</b>: Added utf8 output for folder names, protocol native utf7imap special characters are not user friendly readable</li>
|
||||||
|
<li><b>Usability</b>: Moved foldersizes output after folders lists output.</li>
|
||||||
|
<li><b>Usability</b>: Added total size transferred after each message copied.</li>
|
||||||
|
<li><b>Usability</b>: After ETA, added number of total to be synced, as a denominator dddd after each message copied, like nnn/dddd
|
||||||
|
where nnn is the number of messages copied. Before there was only nnn without /dddd.</li>
|
||||||
|
<li><b>Bug fix</b>: Cache fix on Windows. File paths with brackets [] are special, they have to be escaped with glob.
|
||||||
|
For example, [Gmail] must be written [[]Gmail[]].</li>
|
||||||
|
<li><b>Bug fix</b>: Added several checks if IsUnconnected. Goal avoid imap commands while disconnected.
|
||||||
|
Reconnexion would be better anyway.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>1.597</b> Small things</li>
|
||||||
|
<li><b>Enhancement</b>: Added --nomixfolders to avoid merging folders that are considered different on host1 but the same on destination host2
|
||||||
|
because of case sensitivities and insensitivities.</li>
|
||||||
|
<li><b>Bug fix</b>: Fixed "imapsync doesn't see created folders in the listing of folder sizes at the end". (second time this bug shows up)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>1.592</b> Logging by default! (an internal feature now)</li>
|
||||||
|
|
||||||
|
<li><b>Caveat to upgrade</b>: New <b>IO::Tee</b> Perl module dependency, for logging. See the <a href="../INSTALL">INSTALL</a> file.</li>
|
||||||
|
<li><b>Windows upgrade</b>: Win32 binary is now distributed in a zip file with two batches scripts ready to use it.</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added logging by default in subdirectory <b>./LOG_imapsync/</b></li>
|
||||||
|
<li><b>Enhancement</b>: <b>Added option --log turned on by default</b>. Use --nolog to disable logging.</li>
|
||||||
|
<li><b>Enhancement</b>: Added option --logfile. Default is like ./LOG_imapsync/YYYY_MM_DD_HH_MM_SS_user2.txt
|
||||||
|
where YYYY_MM_DD_HH_MM_SS is the launching date and time like 2014_05_20_23_45_10</li>
|
||||||
|
<li><b>Enhancement</b>: Added option <b>--disarmreadreceipts</b> to fix resending read receipts on host2. A must with Exchange as host2.</li>
|
||||||
|
<li><b>Enhancement</b>: Added FTGate support (no EXAMINE imap command used anymore).</li>
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Updated the code to easily switch on --noreleasecheck by default but allowing --releasecheck (some users want this feature).</li>
|
||||||
|
<li><b>Usability</b>: Warn syncing messges will not be simulated when --dry mode is on and folder on host2 does not exist yet.</li>
|
||||||
|
|
||||||
|
<li><b>Bug fix</b>: Make TLS works with last IO::Socket::SSL default value (Added SSL_verify_mode => 'SSL_VERIFY_NONE') in --tls mode.</li>
|
||||||
|
<li><b>Bug fix</b>: Fixed bug when creating folders on host2 with --sep2=\\ (Lotus Notes).</li>
|
||||||
|
<li><b>Bug fix</b>: Try to get folder size when a folder on host2 has the same name but with a different case
|
||||||
|
like OLD_MAIL -> old_mail. This avoids "does not exist" output.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>1.584</b></li>
|
||||||
|
<li><b>Enhancement</b>: Added --minmaxlinelength to select messages with long lines only.
|
||||||
|
It helps to diagnostic Echange error on messages with lines longer than 9000 characters</li>
|
||||||
|
<li><b>Enhancement</b>: Added --debugmaxlinelength</li>
|
||||||
|
<li><b>Bug fix</b>: --ssl1 --tls2 was buggy because of default SSL_VERIFY_PEER.
|
||||||
|
"Can not go to tls encryption on [localhost]:Unable to start TLS: Cannot determine peer hostname for verification..."</li>
|
||||||
|
<li><b>Bug fix</b>: Check if going to tls is ok, exit otherwise with explicit error message.
|
||||||
|
Thanks to Dennis Schridde for reporting this ugly bug that deserves this <a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-2014">CVE-2014-2014</a>.</li>
|
||||||
|
<li><b>Debug</b>: Print separator given by NAMESPACE even when --sep1 oe --sep2 is used.</li>
|
||||||
|
<li><b>Debug</b>: Prints prefix given by NAMESPACE even when --prefix1 or --prefix2 is used.
|
||||||
|
It is a preparation for advising not to use --prefix unless suggested.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>Good changes</b> made before, listed because <b>they can help</b>:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>Enhancement</b>: Added <b>--skipcrossduplicates</b> to avoid copying messages that are already copied in another folder, good <b>from Gmail to X</b>.</li>
|
||||||
|
<li><b>Enhancement</b>: Added --debugcrossduplicates to print which messages (UIDs) are skipped with --skipcrossduplicates (and in what other folders they are).</li>
|
||||||
|
<li><b>Enhancement</b>: Added --folderfirst string: sync this folder first. --folderfirst "Work" --folderfirst "Friends"</li>
|
||||||
|
<li><b>Enhancement</b>: Added --folderlast string: sync this folder last. --folderlast "[Gmail]/All Mail" etc.</li>
|
||||||
|
<li><b>Enhancement</b>: Added <b>--maxmessagespersecond</b> to limit messages tranfer rate and fix <b>Office365 throttle limitation</b> (use --maxmessagespersecond 4).</li>
|
||||||
|
<li><b>Enhancement</b>: Added --maxbytespersecond to limit byte transfer rate.</li>
|
||||||
|
<li><b>Enhancement</b>: Added --debugmemory option that prints memory consumption after each message is copied.</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added --authmech EXTERNAL.</li>
|
||||||
|
<li><b>Enhancement</b>: Adapted behavior for allowing --maxdate --mindate with --noabletosearch.
|
||||||
|
Use internat date instead of Date: header.</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: QQMail IMAP4Server success (with --noabletosearch option) </li>
|
||||||
|
<li><b>Usability</b>: Apply same treatment to --delete2duplicates as --delete2.
|
||||||
|
If --uidexpunge2 can be done, do it, else do --expunge2 (unless --nouidexpunge2 or --noexpunge2).</li>
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Added --timeout in the --help output. Default timeout is 120 seconds now
|
||||||
|
(was nothing by imapsync, 600 with underlying modules).</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement/Bug fix</b>: Added --ssl1_SSL_version and --ssl2_SSL_version to force the SSL_version
|
||||||
|
in case the default auto-negociation does not work. Example: <b>--ssl1 --ssl1_SSL_version SSLv3</b></li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option --messageidnodomain to fix Mailenable bug changing the domain part of Message-Id header, and avoid duplicates</li>
|
||||||
|
<li><b>Enhancement</b>: Added option --syncflagsaftercopy to fix Mailenable bug not getting the flags with the APPEND</li>
|
||||||
|
<li><b>Enhancement</b>: Added option <b>--maxlinelength</b> to skip messages whose max line length is over a number of bytes.
|
||||||
|
Exchange 2013 and Office365 need <b>--maxlinelength 1000</b> (which is a RFC2822 must) to avoid disconnections.</li>
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Added --fixInboxINBOX, turned on by default, to map automatically Inbox INBOX folder names.</li>
|
||||||
|
<li><b>Usability</b>: IMAP server removing consecutive spaces on the header part doesn't generate duplicates (MailEnable does that)</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Usability</b>: SSL_verify_mode 0 to avoid warning about Man-In-The-Middle.</li>
|
||||||
|
<li><b>Enhancement</b>: Added XOAUTH authentication. Thanks to Eduardo Bortoluzzi Junior.</li>
|
||||||
|
<li><b>Enhancement</b>: Added <b>--search1</b> and <b>--search2</b> to allow different searches on each host.</li>
|
||||||
|
<li><b>Usability</b>: Added --delete1 as an alias for --delete</li>
|
||||||
|
<li><b>Speed</b>: Option <b>--nocheckmessageexists is activated by default</b> since --checkmessageexists often slow down transfers too much.</li>
|
||||||
|
<li><b>Usability</b>: Option --foldersizesatend is on if --foldersizes is on. Off if --nofoldersizesatend</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Added <b>host2 minus host1 statistic</b>: number of messages and bytes.
|
||||||
|
One difference at the start and one at the end.
|
||||||
|
Useful to <b>detect quickly a difference between host2 and host1</b>.
|
||||||
|
Need both --foldersizes and --foldersizesatend options (which are on by default).</li>
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Added <b>--foldersizesatend</b>.
|
||||||
|
It gets the folders sizes at the end of the whole transfer.
|
||||||
|
Turned on by default (use --nofoldersizesatend to turn it off).</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option <b>--delete2duplicates</b>;
|
||||||
|
it deletes messages in host2 that are duplicates.
|
||||||
|
--delete2duplicates is on when --delete2 is set unless --nodelete2duplicates is set too.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option <b>--pidfilelocking</b>;
|
||||||
|
it aborts imapsync, when just launched,
|
||||||
|
in case another imapsync may be running.
|
||||||
|
Turned off by default</li>
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Added option <b>--showpasswords</b>.
|
||||||
|
it shows passwords on output instead of "MASKED".
|
||||||
|
Turned off by default.
|
||||||
|
Useful to restart a run by reading the log
|
||||||
|
or to see what happen with special characters.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><b>Bug fix</b>: Added option <b>--fixslash2</b>
|
||||||
|
to avoid the '<b>Invalid mailbox name</b>' error.
|
||||||
|
It acts when --sep1 is character / and --sep2 is not character /
|
||||||
|
and host1 folder name contains --sep2 characters.
|
||||||
|
Turned on by default (--nofixslash2 to unable it).</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option <b>--noabletosearch</b>
|
||||||
|
to allow the listing of messages without the imap "SEARCH ALL" command.
|
||||||
|
It's useful for playing with poor imap servers like <b>Softalk 7.6.4</b>
|
||||||
|
(8.6 is fine with SEARCH ALL).</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added <b>--noexpungeaftereach</b>
|
||||||
|
to speedup --delete --expunge from Gmail.</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option <b>--nocheckmessageexists</b> to <b>speed up</b> with <b>Tobit imap server</b> as host1.</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option --exitwhenover option <b>to avoid locking</b>
|
||||||
|
when transfers exceed maximum limit.
|
||||||
|
See for example <a href="https://support.google.com/a/answer/1071518?hl=en">this Gmail constraint</a>
|
||||||
|
<ul>
|
||||||
|
<li>imapsync ... --exitwhenover 2500000000 # 2.5GB if <b>host1 is Gmail</b></li>
|
||||||
|
<li>imapsync ... --exitwhenover 500000000 # 500MB if <b>host2 is Gmail</b></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li><b>Usability</b>: Default headers used to identify a message are like --useheader "Message-Id" --useheader "Received"
|
||||||
|
(<b>Exchange compatibility</b> bu default).</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added option --addheader to fix the issue
|
||||||
|
"ignored (no header so we ignore this message)" (on <b>Sent</b> folder usually).
|
||||||
|
Thanks to Ameir Abdeldayem</li>
|
||||||
|
|
||||||
|
<li><b>Enhancement</b>: Added --nofilterflags to check any STORE flags
|
||||||
|
by ignoring PERMANENTFLAGS (Exchange tests)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<div>
|
||||||
|
<a href="http://validator.w3.org/check?uri=referer">
|
||||||
|
<img
|
||||||
|
src="../W/images/valid-xhtml10"
|
||||||
|
alt="Valid XHTML 1.0 Strict" height="31" width="88" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/vcss-blue"
|
||||||
|
alt="CSS Valide !" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://www.anybrowser.org/campaign/">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/ab_jlh.png"
|
||||||
|
alt="Viewable With Any Browser" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<!--#config timefmt="%D" -->
|
||||||
|
<!--#config timefmt="%A %B %d, %Y" -->
|
||||||
|
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
|
||||||
|
($Id: news.shtml,v 1.2 2015/03/31 23:59:58 gilles Exp gilles $)<br/>
|
||||||
|
<a href="#TOP">Top of the page</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
68
S/template.shtml
Executable file
68
S/template.shtml
Executable file
|
@ -0,0 +1,68 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="TOP">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Imapsync template file</title>
|
||||||
|
<meta name="generator" content="Bluefish 2.2.2" />
|
||||||
|
<meta name="author" content="Gilles LAMIRAL" />
|
||||||
|
<meta name="date" content="2015-03-29T15:09:06+0200" />
|
||||||
|
<meta name="copyright" content="None"/>
|
||||||
|
<meta name="keywords" content="imap, transfer, migration"/>
|
||||||
|
<meta name="description" content="imap migration tool"/>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
|
||||||
|
<meta http-equiv="content-style-type" content="text/css"/>
|
||||||
|
<meta http-equiv="expires" content="0"/>
|
||||||
|
<link rel="icon" type="image/png" href="../W/images/logo_imapsync_s.png" />
|
||||||
|
<link href="../W/style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Tittle 1 <a id="title1" href="../#TOP"><small>(back to menu)</small></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>Blabla 1</p>
|
||||||
|
|
||||||
|
<h1>Tittle 2 <a id="title2" href="../#TOP"><small>(back to menu)</small></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>Blabla 2</p>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<div>
|
||||||
|
<a href="http://validator.w3.org/check?uri=referer">
|
||||||
|
<img
|
||||||
|
src="../W/images/valid-xhtml10"
|
||||||
|
alt="Valid XHTML 1.0 Strict" height="31" width="88" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/vcss-blue"
|
||||||
|
alt="CSS Valide !" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="http://www.anybrowser.org/campaign/">
|
||||||
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
src="../W/images/ab_jlh.png"
|
||||||
|
alt="Viewable With Any Browser" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<!--#config timefmt="%D" -->
|
||||||
|
<!--#config timefmt="%A %B %d, %Y" -->
|
||||||
|
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
|
||||||
|
($Id: template.shtml,v 1.2 2015/03/29 17:24:47 gilles Exp gilles $)<br/>
|
||||||
|
<a href="#TOP">Top of the page</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
101
TODO
101
TODO
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/cat
|
#!/bin/cat
|
||||||
# $Id: TODO,v 1.127 2014/11/14 17:06:17 gilles Exp gilles $
|
# $Id: TODO,v 1.135 2015/03/31 14:56:25 gilles Exp gilles $
|
||||||
|
|
||||||
TODO file for imapsync
|
TODO file for imapsync
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -9,37 +9,50 @@ Start a wiki for imapsync.
|
||||||
Write a tutorial.
|
Write a tutorial.
|
||||||
Add a best practice migration tips document.
|
Add a best practice migration tips document.
|
||||||
|
|
||||||
|
Add uidexpunge with --delete if possible (like with --delete2).
|
||||||
|
|
||||||
|
Add the possibility to specify a unity with --maxsize and --minsize
|
||||||
|
Example --maxsize 10MB --minsize 10KB
|
||||||
|
B
|
||||||
|
KB
|
||||||
|
MB
|
||||||
|
GB
|
||||||
|
TB
|
||||||
|
|
||||||
|
2015_03_24
|
||||||
|
Add --sslargs with usage like:
|
||||||
|
imapsync ... --sslargs 'SSL_version=' --sslargs 'SSL_use_cert=1' \
|
||||||
|
--sslargs 'SSL_verify_mode=SSL_VERIFY_PEER'
|
||||||
|
See perldoc IO::Socket::SSL for all possibilities.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2015_03_06
|
||||||
|
Dealing with Content-Type Message/Partial
|
||||||
|
Extract the components of the partial messages and construct them
|
||||||
|
with reformime as one message which can then be transferred. (Larry Moore)
|
||||||
|
See also uudeview http://www.fpx.de/fp/Software/UUDeview/
|
||||||
|
(Larry said uudeview is weird on Partial issue, too old maybe)
|
||||||
|
|
||||||
|
Apply --disarmreadreceipts only to UNSEEN messages.
|
||||||
|
|
||||||
|
Add an exit value when exiting because of --exitwhenover
|
||||||
|
The goal is to know easily why to restart later.
|
||||||
|
|
||||||
Write a Mail::imapsync package and use it.
|
Write a Mail::imapsync package and use it.
|
||||||
|
|
||||||
Evaluate
|
One day, when I have really nothing better to do, evaluate:
|
||||||
http://www.rackspace.com/apps/email_hosting/migrations
|
http://www.rackspace.com/apps/email_hosting/migrations
|
||||||
http://www.yippiemove.com/
|
http://www.yippiemove.com/
|
||||||
http://www.migrationwiz.com/
|
http://www.migrationwiz.com/
|
||||||
http://www.microsoft.com/download/en/details.aspx?id=1329 "Microsoft Transporter Suite"
|
http://www.microsoft.com/download/en/details.aspx?id=1329 "Microsoft Transporter Suite"
|
||||||
|
|
||||||
Separate the online site in a subfolder site/ or www/ and make the upper directory simple.
|
|
||||||
|
|
||||||
Add an option to remove empty folders on host1, except INBOX.
|
|
||||||
Is it possible to run imapsync in a way that empty folders on host1
|
|
||||||
aren't created at all on host2?
|
|
||||||
|
|
||||||
Apply --disarmreadreceipts only to UNSEEN messages.
|
|
||||||
|
|
||||||
Convert folder names to utf-8 and print them next to the uft-7 ones.
|
|
||||||
Look at imapsync/W/learn/
|
|
||||||
./imap_utf7 data_utf7
|
|
||||||
|
|
||||||
Add an exit value when exiting because of --exitwhenover
|
|
||||||
The goal is to know easily why to restart later.
|
|
||||||
|
|
||||||
Add --mark-as-deleted1 --mark-as-deleted2 as
|
Add --mark-as-deleted1 --mark-as-deleted2 as
|
||||||
aliases for --noexpunge1 --delete1 and --noexpunge2 --delete2
|
aliases for --noexpunge1 --delete1 and --noexpunge2 --delete2
|
||||||
|
|
||||||
Move --help documentation into the man page so that description is easier to find.
|
Move --help documentation into the man page so that description is easier to find.
|
||||||
|
|
||||||
Feature request for ImapSync.
|
|
||||||
Can you setup an option to make it stop if the destination mailbox reports that it is over quota?
|
|
||||||
|
|
||||||
Print the list of messages not copied and why (duplicates or void header)
|
Print the list of messages not copied and why (duplicates or void header)
|
||||||
|
|
||||||
Fix bug found by Pavel Stano on 01/06/2012 (june) imapsync never stop login
|
Fix bug found by Pavel Stano on 01/06/2012 (june) imapsync never stop login
|
||||||
|
@ -80,7 +93,7 @@ with
|
||||||
Add a well described problem for each problem detected
|
Add a well described problem for each problem detected
|
||||||
and counted in error counter statistics.
|
and counted in error counter statistics.
|
||||||
|
|
||||||
Add sync imap keywords. Sync gmail labels to imap keyword
|
Add sync imap keywords. Sync Gmail labels to imap keyword
|
||||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503159
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503159
|
||||||
http://www.linux-france.org/prj/imapsync_list/msg00022.html
|
http://www.linux-france.org/prj/imapsync_list/msg00022.html
|
||||||
http://mail.google.com/support/bin/answer.py?hl=en&answer=77657
|
http://mail.google.com/support/bin/answer.py?hl=en&answer=77657
|
||||||
|
@ -118,11 +131,6 @@ Fix bug "not possible to use space in the imap password"
|
||||||
|
|
||||||
Add kerberos authentification
|
Add kerberos authentification
|
||||||
|
|
||||||
Add stdin/stdout filter before transfer:
|
|
||||||
"Now i asked me, how to modify your perl program to work with
|
|
||||||
that - in example, to write each mail to stdout, pipe that to the
|
|
||||||
convertion program, and read the result from stdin - and this all before
|
|
||||||
the mail will transfer to the target imap-server"
|
|
||||||
|
|
||||||
Fix bug with folder names starting with an asterisk: *Archiv
|
Fix bug with folder names starting with an asterisk: *Archiv
|
||||||
Sending: 220 SELECT *Archiv/Support/foobar
|
Sending: 220 SELECT *Archiv/Support/foobar
|
||||||
|
@ -154,6 +162,47 @@ Add cyrus link about INBOX. namespace
|
||||||
http://asg.web.cmu.edu/cyrus/download/imapd/altnamespace.html
|
http://asg.web.cmu.edu/cyrus/download/imapd/altnamespace.html
|
||||||
|
|
||||||
===========================================================================
|
===========================================================================
|
||||||
|
Now the TODO done! (or not)
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
WON'T DO. Not enough examples.
|
||||||
|
Can you setup an option to make it stop if the destination mailbox reports
|
||||||
|
that it is over quota?
|
||||||
|
|
||||||
|
|
||||||
|
DONE. Add stdin/stdout filter before transfer:
|
||||||
|
"Now i asked me, how to modify your perl program to work with
|
||||||
|
that - in example, to write each mail to stdout, pipe that to the
|
||||||
|
conversion program, and read the result from stdin - and this all before
|
||||||
|
the mail will transfer to the target imap-server"
|
||||||
|
http://www.courier-mta.org/maildrop/reformime.html
|
||||||
|
Look at IPC::Open2, assuming a good and safe pipe,
|
||||||
|
or write more code handling all the bad stranger behaviours possible.
|
||||||
|
Option name: --pipemess "command arg1 arg2 ..."
|
||||||
|
|
||||||
|
|
||||||
|
DONE. Transform messages with too long linelength.
|
||||||
|
Office365 and Exchange abort connexion
|
||||||
|
when they encounter a message with more than 10000 characters on a single line.
|
||||||
|
Could be done with the previous --pipemess with reformime.
|
||||||
|
Thanks to Larry Moore for suggesting reformime tool!
|
||||||
|
Usage: --maxlinelength 9900 maxlinelengthcmd 'reformime -r7'
|
||||||
|
|
||||||
|
|
||||||
|
DONE. Add DavMail in Similar Softwares section. http://davmail.sourceforge.net/
|
||||||
|
|
||||||
|
DONE. Convert folder names to utf-8 and print them next to the uft-7 ones.
|
||||||
|
Look at imapsync/W/learn/
|
||||||
|
./imap_utf7 data_utf7
|
||||||
|
|
||||||
|
DONE. Separate the online site in a folder site/ or www/ and make the upper directory simple.
|
||||||
|
|
||||||
|
DONE. --skipemptyfolders
|
||||||
|
Is it possible to run imapsync in a way that empty folders on host1
|
||||||
|
aren't created at all on host2? Yes with --skipemptyfolders
|
||||||
|
|
||||||
|
NO. Add an option to remove empty folders on host1, except INBOX.
|
||||||
|
Use --skipemptyfolders instead
|
||||||
|
|
||||||
DONE. Subject is output when APPEND fails. Done since a long time.
|
DONE. Subject is output when APPEND fails. Done since a long time.
|
||||||
Suggestion: it's very difficult to track down messages which are behaving
|
Suggestion: it's very difficult to track down messages which are behaving
|
||||||
|
@ -209,7 +258,7 @@ separator inversion produces an invalid character.
|
||||||
From uw to cyrus, for example :
|
From uw to cyrus, for example :
|
||||||
FoldA/FoldB.ext -> FoldA.FoldB/ext
|
FoldA/FoldB.ext -> FoldA.FoldB/ext
|
||||||
|
|
||||||
DONE. Not donse since useless now (--useuid)
|
DONE. Not done since useless now (--useuid)
|
||||||
Add a --skipheaderinfolder option
|
Add a --skipheaderinfolder option
|
||||||
|
|
||||||
DONE. Not fixed since only reported once a long time ago.
|
DONE. Not fixed since only reported once a long time ago.
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.607
|
1.637
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.607
|
1.637
|
||||||
|
|
|
@ -302,3 +302,15 @@
|
||||||
1415819173 END 1.605 : mercredi 12 novembre 2014, 20:06:13 (UTC+0100)
|
1415819173 END 1.605 : mercredi 12 novembre 2014, 20:06:13 (UTC+0100)
|
||||||
1415985918 BEGIN 1.607 : vendredi 14 novembre 2014, 18:25:18 (UTC+0100)
|
1415985918 BEGIN 1.607 : vendredi 14 novembre 2014, 18:25:18 (UTC+0100)
|
||||||
1415986823 END 1.607 : vendredi 14 novembre 2014, 18:40:23 (UTC+0100)
|
1415986823 END 1.607 : vendredi 14 novembre 2014, 18:40:23 (UTC+0100)
|
||||||
|
1426391624 BEGIN 1.626 : dimanche 15 mars 2015, 04:53:44 (UTC+0100)
|
||||||
|
1426637725 BEGIN 1.627 : mercredi 18 mars 2015, 01:15:26 (UTC+0100)
|
||||||
|
1426734624 BEGIN 1.628 : jeudi 19 mars 2015, 04:10:24 (UTC+0100)
|
||||||
|
1426736361 END 1.628 : jeudi 19 mars 2015, 04:39:21 (UTC+0100)
|
||||||
|
1426820957 BEGIN 1.630 : vendredi 20 mars 2015, 04:09:18 (UTC+0100)
|
||||||
|
1426823109 END 1.630 : vendredi 20 mars 2015, 04:45:09 (UTC+0100)
|
||||||
|
1427249505 BEGIN 1.634 : mercredi 25 mars 2015, 03:11:45 (UTC+0100)
|
||||||
|
1427250851 END 1.634 : mercredi 25 mars 2015, 03:34:11 (UTC+0100)
|
||||||
|
1427814853 BEGIN 1.636 : mardi 31 mars 2015, 17:14:13 (UTC+0200)
|
||||||
|
1427815136 END 1.636 : mardi 31 mars 2015, 17:18:56 (UTC+0200)
|
||||||
|
1427853312 BEGIN 1.637 : mercredi 1 avril 2015, 03:55:12 (UTC+0200)
|
||||||
|
1427854440 END 1.637 : mercredi 1 avril 2015, 04:14:00 (UTC+0200)
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
The "Artistic License"
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The intent of this document is to state the conditions under which a
|
|
||||||
Package may be copied, such that the Copyright Holder maintains some
|
|
||||||
semblance of artistic control over the development of the package,
|
|
||||||
while giving the users of the package the right to use and distribute
|
|
||||||
the Package in a more-or-less customary fashion, plus the right to make
|
|
||||||
reasonable modifications.
|
|
||||||
|
|
||||||
Definitions:
|
|
||||||
|
|
||||||
"Package" refers to the collection of files distributed by the
|
|
||||||
Copyright Holder, and derivatives of that collection of files
|
|
||||||
created through textual modification.
|
|
||||||
|
|
||||||
"Standard Version" refers to such a Package if it has not been
|
|
||||||
modified, or has been modified in accordance with the wishes
|
|
||||||
of the Copyright Holder as specified below.
|
|
||||||
|
|
||||||
"Copyright Holder" is whoever is named in the copyright or
|
|
||||||
copyrights for the package.
|
|
||||||
|
|
||||||
"You" is you, if you're thinking about copying or distributing
|
|
||||||
this Package.
|
|
||||||
|
|
||||||
"Reasonable copying fee" is whatever you can justify on the
|
|
||||||
basis of media cost, duplication charges, time of people involved,
|
|
||||||
and so on. (You will not be required to justify it to the
|
|
||||||
Copyright Holder, but only to the computing community at large
|
|
||||||
as a market that must bear the fee.)
|
|
||||||
|
|
||||||
"Freely Available" means that no fee is charged for the item
|
|
||||||
itself, though there may be fees involved in handling the item.
|
|
||||||
It also means that recipients of the item may redistribute it
|
|
||||||
under the same conditions they received it.
|
|
||||||
|
|
||||||
1. You may make and give away verbatim copies of the source form of the
|
|
||||||
Standard Version of this Package without restriction, provided that you
|
|
||||||
duplicate all of the original copyright notices and associated disclaimers.
|
|
||||||
|
|
||||||
2. You may apply bug fixes, portability fixes and other modifications
|
|
||||||
derived from the Public Domain or from the Copyright Holder. A Package
|
|
||||||
modified in such a way shall still be considered the Standard Version.
|
|
||||||
|
|
||||||
3. You may otherwise modify your copy of this Package in any way, provided
|
|
||||||
that you insert a prominent notice in each changed file stating how and
|
|
||||||
when you changed that file, and provided that you do at least ONE of the
|
|
||||||
following:
|
|
||||||
|
|
||||||
a) place your modifications in the Public Domain or otherwise make them
|
|
||||||
Freely Available, such as by posting said modifications to Usenet or
|
|
||||||
an equivalent medium, or placing the modifications on a major archive
|
|
||||||
site such as uunet.uu.net, or by allowing the Copyright Holder to include
|
|
||||||
your modifications in the Standard Version of the Package.
|
|
||||||
|
|
||||||
b) use the modified Package only within your corporation or organization.
|
|
||||||
|
|
||||||
c) rename any non-standard executables so the names do not conflict
|
|
||||||
with standard executables, which must also be provided, and provide
|
|
||||||
a separate manual page for each non-standard executable that clearly
|
|
||||||
documents how it differs from the Standard Version.
|
|
||||||
|
|
||||||
d) make other distribution arrangements with the Copyright Holder.
|
|
||||||
|
|
||||||
4. You may distribute the programs of this Package in object code or
|
|
||||||
executable form, provided that you do at least ONE of the following:
|
|
||||||
|
|
||||||
a) distribute a Standard Version of the executables and library files,
|
|
||||||
together with instructions (in the manual page or equivalent) on where
|
|
||||||
to get the Standard Version.
|
|
||||||
|
|
||||||
b) accompany the distribution with the machine-readable source of
|
|
||||||
the Package with your modifications.
|
|
||||||
|
|
||||||
c) give non-standard executables non-standard names, and clearly
|
|
||||||
document the differences in manual pages (or equivalent), together
|
|
||||||
with instructions on where to get the Standard Version.
|
|
||||||
|
|
||||||
d) make other distribution arrangements with the Copyright Holder.
|
|
||||||
|
|
||||||
5. You may charge a reasonable copying fee for any distribution of this
|
|
||||||
Package. You may charge any fee you choose for support of this
|
|
||||||
Package. You may not charge a fee for this Package itself. However,
|
|
||||||
you may distribute this Package in aggregate with other (possibly
|
|
||||||
commercial) programs as part of a larger (possibly commercial) software
|
|
||||||
distribution provided that you do not advertise this Package as a
|
|
||||||
product of your own. You may embed this Package's interpreter within
|
|
||||||
an executable of yours (by linking); this shall be construed as a mere
|
|
||||||
form of aggregation, provided that the complete Standard Version of the
|
|
||||||
interpreter is so embedded.
|
|
||||||
|
|
||||||
6. The scripts and library files supplied as input to or produced as
|
|
||||||
output from the programs of this Package do not automatically fall
|
|
||||||
under the copyright of this Package, but belong to whoever generated
|
|
||||||
them, and may be sold commercially, and may be aggregated with this
|
|
||||||
Package. If such scripts or library files are aggregated with this
|
|
||||||
Package via the so-called "undump" or "unexec" methods of producing a
|
|
||||||
binary executable image, then distribution of such an image shall
|
|
||||||
neither be construed as a distribution of this Package nor shall it
|
|
||||||
fall under the restrictions of Paragraphs 3 and 4, provided that you do
|
|
||||||
not represent such an executable image as a Standard Version of this
|
|
||||||
Package.
|
|
||||||
|
|
||||||
7. C subroutines (or comparably compiled subroutines in other
|
|
||||||
languages) supplied by you and linked into this Package in order to
|
|
||||||
emulate subroutines and variables of the language defined by this
|
|
||||||
Package shall not be considered part of this Package, but are the
|
|
||||||
equivalent of input as in Paragraph 6, provided these subroutines do
|
|
||||||
not change the language in any way that would cause it to fail the
|
|
||||||
regression tests for the language.
|
|
||||||
|
|
||||||
8. Aggregation of this Package with a commercial distribution is always
|
|
||||||
permitted provided that the use of this Package is embedded; that is,
|
|
||||||
when no overt attempt is made to make this Package's interfaces visible
|
|
||||||
to the end user of the commercial distribution. Such use shall not be
|
|
||||||
construed as a distribution of this Package.
|
|
||||||
|
|
||||||
9. The name of the Copyright Holder may not be used to endorse or promote
|
|
||||||
products derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
|
||||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
The End
|
|
|
@ -1,250 +0,0 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 1, February 1989
|
|
||||||
|
|
||||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The license agreements of most software companies try to keep users
|
|
||||||
at the mercy of those companies. By contrast, our General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. The
|
|
||||||
General Public License applies to the Free Software Foundation's
|
|
||||||
software and to any other program whose authors commit to using it.
|
|
||||||
You can use it for your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Specifically, the General Public License is designed to make
|
|
||||||
sure that you have the freedom to give away or sell copies of free
|
|
||||||
software, that you receive source code or can get it if you want it,
|
|
||||||
that you can change the software or use pieces of it in new free
|
|
||||||
programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of a such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must tell them their rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any program or other work which
|
|
||||||
contains a notice placed by the copyright holder saying it may be
|
|
||||||
distributed under the terms of this General Public License. The
|
|
||||||
"Program", below, refers to any such program or work, and a "work based
|
|
||||||
on the Program" means either the Program or any work containing the
|
|
||||||
Program or a portion of it, either verbatim or with modifications. Each
|
|
||||||
licensee is addressed as "you".
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's source
|
|
||||||
code as you receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice and
|
|
||||||
disclaimer of warranty; keep intact all the notices that refer to this
|
|
||||||
General Public License and to the absence of any warranty; and give any
|
|
||||||
other recipients of the Program a copy of this General Public License
|
|
||||||
along with the Program. You may charge a fee for the physical act of
|
|
||||||
transferring a copy.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion of
|
|
||||||
it, and copy and distribute such modifications under the terms of Paragraph
|
|
||||||
1 above, provided that you also do the following:
|
|
||||||
|
|
||||||
a) cause the modified files to carry prominent notices stating that
|
|
||||||
you changed the files and the date of any change; and
|
|
||||||
|
|
||||||
b) cause the whole of any work that you distribute or publish, that
|
|
||||||
in whole or in part contains the Program or any part thereof, either
|
|
||||||
with or without modifications, to be licensed at no charge to all
|
|
||||||
third parties under the terms of this General Public License (except
|
|
||||||
that you may choose to grant warranty protection to some or all
|
|
||||||
third parties, at your option).
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively when
|
|
||||||
run, you must cause it, when started running for such interactive use
|
|
||||||
in the simplest and most usual way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a notice
|
|
||||||
that there is no warranty (or else, saying that you provide a
|
|
||||||
warranty) and that users may redistribute the program under these
|
|
||||||
conditions, and telling the user how to view a copy of this General
|
|
||||||
Public License.
|
|
||||||
|
|
||||||
d) You may charge a fee for the physical act of transferring a
|
|
||||||
copy, and you may at your option offer warranty protection in
|
|
||||||
exchange for a fee.
|
|
||||||
|
|
||||||
Mere aggregation of another independent work with the Program (or its
|
|
||||||
derivative) on a volume of a storage or distribution medium does not bring
|
|
||||||
the other work under the scope of these terms.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a portion or derivative of
|
|
||||||
it, under Paragraph 2) in object code or executable form under the terms of
|
|
||||||
Paragraphs 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of
|
|
||||||
Paragraphs 1 and 2 above; or,
|
|
||||||
|
|
||||||
b) accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party free (except for a nominal charge
|
|
||||||
for the cost of distribution) a complete machine-readable copy of the
|
|
||||||
corresponding source code, to be distributed under the terms of
|
|
||||||
Paragraphs 1 and 2 above; or,
|
|
||||||
|
|
||||||
c) accompany it with the information you received as to where the
|
|
||||||
corresponding source code may be obtained. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form alone.)
|
|
||||||
|
|
||||||
Source code for a work means the preferred form of the work for making
|
|
||||||
modifications to it. For an executable file, complete source code means
|
|
||||||
all the source code for all modules it contains; but, as a special
|
|
||||||
exception, it need not include source code for modules which are standard
|
|
||||||
libraries that accompany the operating system on which the executable
|
|
||||||
file runs, or for standard header files or definitions files that
|
|
||||||
accompany that operating system.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, distribute or transfer the
|
|
||||||
Program except as expressly provided under this General Public License.
|
|
||||||
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
|
|
||||||
the Program is void, and will automatically terminate your rights to use
|
|
||||||
the Program under this License. However, parties who have received
|
|
||||||
copies, or rights to use copies, from you under this General Public
|
|
||||||
License will not have their licenses terminated so long as such parties
|
|
||||||
remain in full compliance.
|
|
||||||
|
|
||||||
5. By copying, distributing or modifying the Program (or any work based
|
|
||||||
on the Program) you indicate your acceptance of this license to do so,
|
|
||||||
and all its terms and conditions.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the original
|
|
||||||
licensor to copy, distribute or modify the Program subject to these
|
|
||||||
terms and conditions. You may not impose any further restrictions on the
|
|
||||||
recipients' exercise of the rights granted herein.
|
|
||||||
|
|
||||||
7. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of the license which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
the license, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
8. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to humanity, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these
|
|
||||||
terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest to
|
|
||||||
attach them to the start of each source file to most effectively convey
|
|
||||||
the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) 19yy <name of author>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 1, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) 19xx name of author
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the
|
|
||||||
appropriate parts of the General Public License. Of course, the
|
|
||||||
commands you use may be called something other than `show w' and `show
|
|
||||||
c'; they could even be mouse-clicks or menu items--whatever suits your
|
|
||||||
program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
program `Gnomovision' (a program to direct compilers to make passes
|
|
||||||
at assemblers) written by James Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
|
@ -1,35 +0,0 @@
|
||||||
Revision history for Perl NTLM authentication suite
|
|
||||||
|
|
||||||
1.09 8 Sep 2011
|
|
||||||
- fix CPAN ticket # 70703
|
|
||||||
|
|
||||||
1.08 6 Apr 2011
|
|
||||||
- fix CPAN ticket # 39925
|
|
||||||
|
|
||||||
1.07 - not released
|
|
||||||
|
|
||||||
1.06 24 Mar 2011
|
|
||||||
- relicense as GPL+ or Artistic
|
|
||||||
|
|
||||||
1.05 19 Jun 2008
|
|
||||||
- implement OO interface - thanks to Dmitry Karasik <dmitry@karasik.eu.org>
|
|
||||||
- fix minor bug in last release - thanks to Dmitry Karasik <dmitry@karasik.eu.org>
|
|
||||||
|
|
||||||
1.04 29 May 2008
|
|
||||||
- implement NTLMv2 - thanks to Andrew Hobson <ahobson@infloop.com>
|
|
||||||
|
|
||||||
1.03 Thur Aug 09 09:13:00 2007
|
|
||||||
- fixes bug from 2001 - http://rt.cpan.org/Public/Bug/Display.html?id=9521
|
|
||||||
- fixes minor doco bug also reported in same place.
|
|
||||||
|
|
||||||
1.02 Mon Oct 29 19:01:00 2001
|
|
||||||
- fixed package names due to a source code mixup!
|
|
||||||
- added a test suite
|
|
||||||
|
|
||||||
1.01 Sun Oct 28 11:01:00 2001
|
|
||||||
- added ntlm_domain() to set initial domain
|
|
||||||
- added ntlm_reset() to reset state machine for multiple use
|
|
||||||
- added fuller documentation
|
|
||||||
|
|
||||||
1.00 Sat Oct 27 13:31:53 2001
|
|
||||||
- original version;
|
|
|
@ -1,294 +0,0 @@
|
||||||
#!/usr/local/bin/perl
|
|
||||||
#
|
|
||||||
# This is an implementation of part of the DES specification. According
|
|
||||||
# to the code this is ported from, this code does NOT enable 2-way
|
|
||||||
# encryption and is, hence, not a cypher and does not appear to come
|
|
||||||
# under any export restrictions on such.
|
|
||||||
#
|
|
||||||
package Authen::NTLM::DES;
|
|
||||||
|
|
||||||
use vars qw($VERSION @ISA @EXPORT);
|
|
||||||
require Exporter;
|
|
||||||
|
|
||||||
$VERSION = "1.02";
|
|
||||||
@ISA = qw(Exporter);
|
|
||||||
@EXPORT = qw(E_P16 E_P24);
|
|
||||||
|
|
||||||
my ($loop, $loop2);
|
|
||||||
$loop = 0;
|
|
||||||
$loop2 = 0;
|
|
||||||
|
|
||||||
my $perm1 = [57, 49, 41, 33, 25, 17, 9,
|
|
||||||
1, 58, 50, 42, 34, 26, 18,
|
|
||||||
10, 2, 59, 51, 43, 35, 27,
|
|
||||||
19, 11, 3, 60, 52, 44, 36,
|
|
||||||
63, 55, 47, 39, 31, 23, 15,
|
|
||||||
7, 62, 54, 46, 38, 30, 22,
|
|
||||||
14, 6, 61, 53, 45, 37, 29,
|
|
||||||
21, 13, 5, 28, 20, 12, 4];
|
|
||||||
my $perm2 = [14, 17, 11, 24, 1, 5,
|
|
||||||
3, 28, 15, 6, 21, 10,
|
|
||||||
23, 19, 12, 4, 26, 8,
|
|
||||||
16, 7, 27, 20, 13, 2,
|
|
||||||
41, 52, 31, 37, 47, 55,
|
|
||||||
30, 40, 51, 45, 33, 48,
|
|
||||||
44, 49, 39, 56, 34, 53,
|
|
||||||
46, 42, 50, 36, 29, 32];
|
|
||||||
my $perm3 = [58, 50, 42, 34, 26, 18, 10, 2,
|
|
||||||
60, 52, 44, 36, 28, 20, 12, 4,
|
|
||||||
62, 54, 46, 38, 30, 22, 14, 6,
|
|
||||||
64, 56, 48, 40, 32, 24, 16, 8,
|
|
||||||
57, 49, 41, 33, 25, 17, 9, 1,
|
|
||||||
59, 51, 43, 35, 27, 19, 11, 3,
|
|
||||||
61, 53, 45, 37, 29, 21, 13, 5,
|
|
||||||
63, 55, 47, 39, 31, 23, 15, 7];
|
|
||||||
my $perm4 = [32, 1, 2, 3, 4, 5,
|
|
||||||
4, 5, 6, 7, 8, 9,
|
|
||||||
8, 9, 10, 11, 12, 13,
|
|
||||||
12, 13, 14, 15, 16, 17,
|
|
||||||
16, 17, 18, 19, 20, 21,
|
|
||||||
20, 21, 22, 23, 24, 25,
|
|
||||||
24, 25, 26, 27, 28, 29,
|
|
||||||
28, 29, 30, 31, 32, 1];
|
|
||||||
my $perm5 = [16, 7, 20, 21, 29, 12, 28, 17,
|
|
||||||
1, 15, 23, 26, 5, 18, 31, 10,
|
|
||||||
2, 8, 24, 14, 32, 27, 3, 9,
|
|
||||||
19, 13, 30, 6, 22, 11, 4, 25];
|
|
||||||
my $perm6 = [40, 8, 48, 16, 56, 24, 64, 32,
|
|
||||||
39, 7, 47, 15, 55, 23, 63, 31,
|
|
||||||
38, 6, 46, 14, 54, 22, 62, 30,
|
|
||||||
37, 5, 45, 13, 53, 21, 61, 29,
|
|
||||||
36, 4, 44, 12, 52, 20, 60, 28,
|
|
||||||
35, 3, 43, 11, 51, 19, 59, 27,
|
|
||||||
34, 2, 42, 10, 50, 18, 58, 26,
|
|
||||||
33, 1, 41, 9, 49, 17, 57, 25];
|
|
||||||
my $sc = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1];
|
|
||||||
my $sbox = [
|
|
||||||
[
|
|
||||||
[14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7],
|
|
||||||
[0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8],
|
|
||||||
[4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0],
|
|
||||||
[15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10],
|
|
||||||
[3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5],
|
|
||||||
[0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15],
|
|
||||||
[13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8],
|
|
||||||
[13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1],
|
|
||||||
[13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7],
|
|
||||||
[1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15],
|
|
||||||
[13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9],
|
|
||||||
[10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4],
|
|
||||||
[3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[2,12,4,1,7,10,11,6,8,5,3,15,13,0,14,9],
|
|
||||||
[14,11,2,12,4,7,13,1,5,0,15,10,3,9,8,6],
|
|
||||||
[4,2,1,11,10,13,7,8,15,9,12,5,6,3,0,14],
|
|
||||||
[11,8,12,7,1,14,2,13,6,15,0,9,10,4,5,3]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[12,1,10,15,9,2,6,8,0,13,3,4,14,7,5,11],
|
|
||||||
[10,15,4,2,7,12,9,5,6,1,13,14,0,11,3,8],
|
|
||||||
[9,14,15,5,2,8,12,3,7,0,4,10,1,13,11,6],
|
|
||||||
[4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1],
|
|
||||||
[13,0,11,7,4,9,1,10,14,3,5,12,2,15,8,6],
|
|
||||||
[1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2],
|
|
||||||
[6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7],
|
|
||||||
[1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2],
|
|
||||||
[7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8],
|
|
||||||
[2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
sub E_P16
|
|
||||||
{
|
|
||||||
my ($p14) = @_;
|
|
||||||
my $sp8 = [0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25];
|
|
||||||
|
|
||||||
my $p7 = substr($p14, 0, 7);
|
|
||||||
my $p16 = smbhash($sp8, $p7);
|
|
||||||
$p7 = substr($p14, 7, 7);
|
|
||||||
$p16 .= smbhash($sp8, $p7);
|
|
||||||
return $p16;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub E_P24
|
|
||||||
{
|
|
||||||
my ($p21, $c8_str) = @_;
|
|
||||||
my @c8 = map {ord($_)} split(//, $c8_str);
|
|
||||||
my $p24 = smbhash(\@c8, substr($p21, 0, 7));
|
|
||||||
$p24 .= smbhash(\@c8, substr($p21, 7, 7));
|
|
||||||
$p24 .= smbhash(\@c8, substr($p21, 14, 7));
|
|
||||||
}
|
|
||||||
|
|
||||||
sub permute
|
|
||||||
{
|
|
||||||
my ($out, $in, $p, $n) = @_;
|
|
||||||
my $i;
|
|
||||||
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$out->[$i] = $in->[$p->[$i]-1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lshift
|
|
||||||
{
|
|
||||||
my ($d, $count, $n) = @_;
|
|
||||||
my (@out, $i);
|
|
||||||
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$out[$i] = $d->[($i+$count)%$n];
|
|
||||||
}
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$d->[$i] = $out[$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub xor
|
|
||||||
{
|
|
||||||
my ($out, $in1, $in2, $n) = @_;
|
|
||||||
my $i;
|
|
||||||
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$out->[$i] = $in1->[$i]^$in2->[$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub dohash
|
|
||||||
{
|
|
||||||
my ($out, $in, $key) = @_;
|
|
||||||
my ($i, $j, $k, @pk1, @c, @d, @cd,
|
|
||||||
@ki, @pd1, @l, @r, @rl);
|
|
||||||
|
|
||||||
&permute(\@pk1, $key, $perm1, 56);
|
|
||||||
|
|
||||||
foreach $i (0..27)
|
|
||||||
{
|
|
||||||
$c[$i] = $pk1[$i];
|
|
||||||
$d[$i] = $pk1[$i+28];
|
|
||||||
}
|
|
||||||
foreach $i (0..15)
|
|
||||||
{
|
|
||||||
my @array;
|
|
||||||
&lshift(\@c, $sc->[$i], 28);
|
|
||||||
&lshift(\@d, $sc->[$i], 28);
|
|
||||||
@cd = (@c, @d);
|
|
||||||
&permute(\@array, \@cd, $perm2, 48);
|
|
||||||
$ki[$i] = \@array;
|
|
||||||
}
|
|
||||||
&permute(\@pd1, $in, $perm3, 64);
|
|
||||||
|
|
||||||
foreach $j (0..31)
|
|
||||||
{
|
|
||||||
$l[$j] = $pd1[$j];
|
|
||||||
$r[$j] = $pd1[$j+32];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach $i (0..15)
|
|
||||||
{
|
|
||||||
local (@er, @erk, @b, @cb, @pcb, @r2);
|
|
||||||
permute(\@er, \@r, $perm4, 48);
|
|
||||||
&xor(\@erk, \@er, $ki[$i], 48);
|
|
||||||
foreach $j (0..7)
|
|
||||||
{
|
|
||||||
foreach $k (0..5)
|
|
||||||
{
|
|
||||||
$b[$j][$k] = $erk[$j*6+$k];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach $j (0..7)
|
|
||||||
{
|
|
||||||
local ($m, $n);
|
|
||||||
$m = ($b[$j][0]<<1) | $b[$j][5];
|
|
||||||
$n = ($b[$j][1]<<3) | ($b[$j][2]<<2) | ($b[$j][3]<<1) | $b[$j][4];
|
|
||||||
foreach $k (0..3)
|
|
||||||
{
|
|
||||||
$b[$j][$k] = ($sbox->[$j][$m][$n] & (1<<(3-$k)))? 1: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach $j (0..7)
|
|
||||||
{
|
|
||||||
foreach $k (0..3)
|
|
||||||
{
|
|
||||||
$cb[$j*4+$k] = $b[$j][$k];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&permute(\@pcb, \@cb, $perm5, 32);
|
|
||||||
&xor(\@r2, \@l, \@pcb, 32);
|
|
||||||
foreach $j (0..31)
|
|
||||||
{
|
|
||||||
$l[$j] = $r[$j];
|
|
||||||
$r[$j] = $r2[$j];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@rl = (@r, @l);
|
|
||||||
&permute($out, \@rl, $perm6, 64);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub str_to_key
|
|
||||||
{
|
|
||||||
my ($str) = @_;
|
|
||||||
my $i;
|
|
||||||
my @key;
|
|
||||||
my $out;
|
|
||||||
my @str = map {ord($_)} split(//, $str);
|
|
||||||
$key[0] = $str[0]>>1;
|
|
||||||
$key[1] = (($str[0]&0x01)<<6) | ($str[1]>>2);
|
|
||||||
$key[2] = (($str[1]&0x03)<<5) | ($str[2]>>3);
|
|
||||||
$key[3] = (($str[2]&0x07)<<4) | ($str[3]>>4);
|
|
||||||
$key[4] = (($str[3]&0x0f)<<3) | ($str[4]>>5);
|
|
||||||
$key[5] = (($str[4]&0x1f)<<2) | ($str[5]>>6);
|
|
||||||
$key[6] = (($str[5]&0x3f)<<1) | ($str[6]>>7);
|
|
||||||
$key[7] = $str[6]&0x7f;
|
|
||||||
foreach $i (0..7)
|
|
||||||
{
|
|
||||||
$key[$i] = 0xff&($key[$i]<<1);
|
|
||||||
}
|
|
||||||
return \@key;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub smbhash
|
|
||||||
{
|
|
||||||
my ($in, $key) = @_;
|
|
||||||
|
|
||||||
my $key2 = &str_to_key($key);
|
|
||||||
my ($i, $div, $mod, @in, @outb, @inb, @keyb, @out);
|
|
||||||
foreach $i (0..63)
|
|
||||||
{
|
|
||||||
$div = int($i/8); $mod = $i%8;
|
|
||||||
$inb[$i] = ($in->[$div] & (1<<(7-($mod))))? 1: 0;
|
|
||||||
$keyb[$i] = ($key2->[$div] & (1<<(7-($mod))))? 1: 0;
|
|
||||||
$outb[$i] = 0;
|
|
||||||
}
|
|
||||||
&dohash(\@outb, \@inb, \@keyb);
|
|
||||||
foreach $i (0..7)
|
|
||||||
{
|
|
||||||
$out[$i] = 0;
|
|
||||||
}
|
|
||||||
foreach $i (0..63)
|
|
||||||
{
|
|
||||||
$out[int($i/8)] |= (1<<(7-($i%8))) if ($outb[$i]);
|
|
||||||
}
|
|
||||||
my $out = pack("C8", @out);
|
|
||||||
return $out;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
|
@ -1,599 +0,0 @@
|
||||||
# This Makefile is for the Authen::NTLM::DES extension to perl.
|
|
||||||
#
|
|
||||||
# It was generated automatically by MakeMaker version
|
|
||||||
# 6.55_02 (Revision: 65502) from the contents of
|
|
||||||
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
|
|
||||||
#
|
|
||||||
# ANY CHANGES MADE HERE WILL BE LOST!
|
|
||||||
#
|
|
||||||
# MakeMaker ARGV: ()
|
|
||||||
#
|
|
||||||
|
|
||||||
# MakeMaker Parameters:
|
|
||||||
|
|
||||||
# AUTHOR => q[David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>]
|
|
||||||
# BUILD_REQUIRES => { }
|
|
||||||
# NAME => q[Authen::NTLM::DES]
|
|
||||||
# PREREQ_PM => { }
|
|
||||||
# VERSION_FROM => q[DES.pm]
|
|
||||||
|
|
||||||
# --- MakeMaker post_initialize section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_config section:
|
|
||||||
|
|
||||||
# These definitions are from config.sh (via /usr/lib/perl/5.10/Config.pm).
|
|
||||||
# They may have been overridden via Makefile.PL or on the command line.
|
|
||||||
AR = ar
|
|
||||||
CC = cc
|
|
||||||
CCCDLFLAGS = -fPIC
|
|
||||||
CCDLFLAGS = -Wl,-E
|
|
||||||
DLEXT = so
|
|
||||||
DLSRC = dl_dlopen.xs
|
|
||||||
EXE_EXT =
|
|
||||||
FULL_AR = /usr/bin/ar
|
|
||||||
LD = cc
|
|
||||||
LDDLFLAGS = -shared -O2 -g -L/usr/local/lib -fstack-protector
|
|
||||||
LDFLAGS = -fstack-protector -L/usr/local/lib
|
|
||||||
LIBC = /lib/libc-2.11.1.so
|
|
||||||
LIB_EXT = .a
|
|
||||||
OBJ_EXT = .o
|
|
||||||
OSNAME = linux
|
|
||||||
OSVERS = 2.6.24-28-server
|
|
||||||
RANLIB = :
|
|
||||||
SITELIBEXP = /usr/local/share/perl/5.10.1
|
|
||||||
SITEARCHEXP = /usr/local/lib/perl/5.10.1
|
|
||||||
SO = so
|
|
||||||
VENDORARCHEXP = /usr/lib/perl5
|
|
||||||
VENDORLIBEXP = /usr/share/perl5
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker constants section:
|
|
||||||
AR_STATIC_ARGS = cr
|
|
||||||
DIRFILESEP = /
|
|
||||||
DFSEP = $(DIRFILESEP)
|
|
||||||
NAME = Authen::NTLM::DES
|
|
||||||
NAME_SYM = Authen_NTLM_DES
|
|
||||||
VERSION = 1.02
|
|
||||||
VERSION_MACRO = VERSION
|
|
||||||
VERSION_SYM = 1_02
|
|
||||||
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
|
|
||||||
XS_VERSION = 1.02
|
|
||||||
XS_VERSION_MACRO = XS_VERSION
|
|
||||||
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
|
|
||||||
INST_ARCHLIB = ../blib/arch
|
|
||||||
INST_SCRIPT = ../blib/script
|
|
||||||
INST_BIN = ../blib/bin
|
|
||||||
INST_LIB = ../blib/lib
|
|
||||||
INST_MAN1DIR = ../blib/man1
|
|
||||||
INST_MAN3DIR = ../blib/man3
|
|
||||||
MAN1EXT = 1p
|
|
||||||
MAN3EXT = 3pm
|
|
||||||
INSTALLDIRS = site
|
|
||||||
DESTDIR =
|
|
||||||
PREFIX = /usr
|
|
||||||
PERLPREFIX = $(PREFIX)
|
|
||||||
SITEPREFIX = $(PREFIX)/local
|
|
||||||
VENDORPREFIX = $(PREFIX)
|
|
||||||
INSTALLPRIVLIB = $(PERLPREFIX)/share/perl/5.10
|
|
||||||
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
|
|
||||||
INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.10.1
|
|
||||||
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
|
|
||||||
INSTALLVENDORLIB = $(VENDORPREFIX)/share/perl5
|
|
||||||
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
|
|
||||||
INSTALLARCHLIB = $(PERLPREFIX)/lib/perl/5.10
|
|
||||||
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
|
|
||||||
INSTALLSITEARCH = $(SITEPREFIX)/lib/perl/5.10.1
|
|
||||||
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
|
|
||||||
INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5
|
|
||||||
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
|
|
||||||
INSTALLBIN = $(PERLPREFIX)/bin
|
|
||||||
DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
|
|
||||||
INSTALLSITEBIN = $(SITEPREFIX)/bin
|
|
||||||
DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
|
|
||||||
INSTALLVENDORBIN = $(VENDORPREFIX)/bin
|
|
||||||
DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
|
|
||||||
INSTALLSCRIPT = $(PERLPREFIX)/bin
|
|
||||||
DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
|
|
||||||
INSTALLSITESCRIPT = $(SITEPREFIX)/bin
|
|
||||||
DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
|
|
||||||
INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin
|
|
||||||
DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
|
|
||||||
INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1
|
|
||||||
DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
|
|
||||||
INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
|
|
||||||
DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
|
|
||||||
INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1
|
|
||||||
DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
|
|
||||||
INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3
|
|
||||||
DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
|
|
||||||
INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3
|
|
||||||
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
|
|
||||||
INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3
|
|
||||||
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
|
|
||||||
PERL_LIB = /usr/share/perl/5.10
|
|
||||||
PERL_ARCHLIB = /usr/lib/perl/5.10
|
|
||||||
LIBPERL_A = libperl.a
|
|
||||||
FIRST_MAKEFILE = Makefile
|
|
||||||
MAKEFILE_OLD = Makefile.old
|
|
||||||
MAKE_APERL_FILE = Makefile.aperl
|
|
||||||
PERLMAINCC = $(CC)
|
|
||||||
PERL_INC = /usr/lib/perl/5.10/CORE
|
|
||||||
PERL = /usr/bin/perl
|
|
||||||
FULLPERL = /usr/bin/perl
|
|
||||||
ABSPERL = $(PERL)
|
|
||||||
PERLRUN = $(PERL)
|
|
||||||
FULLPERLRUN = $(FULLPERL)
|
|
||||||
ABSPERLRUN = $(ABSPERL)
|
|
||||||
PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
PERL_CORE = 0
|
|
||||||
PERM_DIR = 755
|
|
||||||
PERM_RW = 644
|
|
||||||
PERM_RWX = 755
|
|
||||||
|
|
||||||
MAKEMAKER = /usr/share/perl/5.10/ExtUtils/MakeMaker.pm
|
|
||||||
MM_VERSION = 6.55_02
|
|
||||||
MM_REVISION = 65502
|
|
||||||
|
|
||||||
# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
|
|
||||||
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
|
|
||||||
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
|
|
||||||
# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
|
|
||||||
MAKE = make
|
|
||||||
FULLEXT = Authen/NTLM/DES
|
|
||||||
BASEEXT = DES
|
|
||||||
PARENT_NAME = Authen::NTLM
|
|
||||||
DLBASE = $(BASEEXT)
|
|
||||||
VERSION_FROM = DES.pm
|
|
||||||
OBJECT =
|
|
||||||
LDFROM = $(OBJECT)
|
|
||||||
LINKTYPE = dynamic
|
|
||||||
BOOTDEP =
|
|
||||||
|
|
||||||
# Handy lists of source code files:
|
|
||||||
XS_FILES =
|
|
||||||
C_FILES =
|
|
||||||
O_FILES =
|
|
||||||
H_FILES =
|
|
||||||
MAN1PODS =
|
|
||||||
MAN3PODS =
|
|
||||||
|
|
||||||
# Where is the Config information that we are using/depend on
|
|
||||||
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
|
|
||||||
|
|
||||||
# Where to build things
|
|
||||||
INST_LIBDIR = $(INST_LIB)/Authen/NTLM
|
|
||||||
INST_ARCHLIBDIR = $(INST_ARCHLIB)/Authen/NTLM
|
|
||||||
|
|
||||||
INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
|
|
||||||
INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
|
|
||||||
|
|
||||||
INST_STATIC =
|
|
||||||
INST_DYNAMIC =
|
|
||||||
INST_BOOT =
|
|
||||||
|
|
||||||
# Extra linker info
|
|
||||||
EXPORT_LIST =
|
|
||||||
PERL_ARCHIVE =
|
|
||||||
PERL_ARCHIVE_AFTER =
|
|
||||||
|
|
||||||
|
|
||||||
TO_INST_PM = DES.pm
|
|
||||||
|
|
||||||
PM_TO_BLIB = DES.pm \
|
|
||||||
$(INST_LIB)/Authen/NTLM/DES.pm
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker platform_constants section:
|
|
||||||
MM_Unix_VERSION = 6.55_02
|
|
||||||
PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tool_autosplit section:
|
|
||||||
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
|
|
||||||
AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tool_xsubpp section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tools_other section:
|
|
||||||
SHELL = /bin/sh
|
|
||||||
CHMOD = chmod
|
|
||||||
CP = cp
|
|
||||||
MV = mv
|
|
||||||
NOOP = $(TRUE)
|
|
||||||
NOECHO = @
|
|
||||||
RM_F = rm -f
|
|
||||||
RM_RF = rm -rf
|
|
||||||
TEST_F = test -f
|
|
||||||
TOUCH = touch
|
|
||||||
UMASK_NULL = umask 0
|
|
||||||
DEV_NULL = > /dev/null 2>&1
|
|
||||||
MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
|
|
||||||
EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
|
|
||||||
FALSE = false
|
|
||||||
TRUE = true
|
|
||||||
ECHO = echo
|
|
||||||
ECHO_N = echo -n
|
|
||||||
UNINST = 0
|
|
||||||
VERBINST = 0
|
|
||||||
MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
|
|
||||||
DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
|
|
||||||
UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
|
|
||||||
WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
|
|
||||||
MACROSTART =
|
|
||||||
MACROEND =
|
|
||||||
USEMAKEFILE = -f
|
|
||||||
FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker makemakerdflt section:
|
|
||||||
makemakerdflt : all
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker macro section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker depend section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker cflags section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_loadlibs section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_cccmd section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker post_constants section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker pasthru section:
|
|
||||||
|
|
||||||
PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
|
|
||||||
LINKTYPE="$(LINKTYPE)"\
|
|
||||||
PREFIX="$(PREFIX)"
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker special_targets section:
|
|
||||||
.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
|
|
||||||
|
|
||||||
.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker c_o section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker xs_c section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker xs_o section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker top_targets section:
|
|
||||||
all :: pure_all manifypods
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
pure_all :: config pm_to_blib subdirs linkext
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
subdirs :: $(MYEXTLIB)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
config :: $(FIRST_MAKEFILE) blibdirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
help :
|
|
||||||
perldoc ExtUtils::MakeMaker
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker blibdirs section:
|
|
||||||
blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
# Backwards compat with 6.18 through 6.25
|
|
||||||
blibdirs.ts : blibdirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_LIBDIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_AUTODIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_BIN)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_BIN)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_SCRIPT)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker linkext section:
|
|
||||||
|
|
||||||
linkext :: $(LINKTYPE)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dlsyms section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic section:
|
|
||||||
|
|
||||||
dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic_bs section:
|
|
||||||
|
|
||||||
BOOTSTRAP =
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic_lib section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker static section:
|
|
||||||
|
|
||||||
## $(INST_PM) has been moved to the all: target.
|
|
||||||
## It remains here for awhile to allow for old usage: "make static"
|
|
||||||
static :: $(FIRST_MAKEFILE) $(INST_STATIC)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker static_lib section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker manifypods section:
|
|
||||||
|
|
||||||
POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
|
|
||||||
POD2MAN = $(POD2MAN_EXE)
|
|
||||||
|
|
||||||
|
|
||||||
manifypods : pure_all
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker processPL section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker installbin section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker subdirs section:
|
|
||||||
|
|
||||||
# none
|
|
||||||
|
|
||||||
# --- MakeMaker clean_subdirs section:
|
|
||||||
clean_subdirs :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker clean section:
|
|
||||||
|
|
||||||
# Delete temporary files but do not touch installed files. We don't delete
|
|
||||||
# the Makefile here so a later make realclean still has a makefile to use.
|
|
||||||
|
|
||||||
clean :: clean_subdirs
|
|
||||||
- $(RM_F) \
|
|
||||||
*$(LIB_EXT) core \
|
|
||||||
core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
|
|
||||||
core.[0-9][0-9] $(BASEEXT).bso \
|
|
||||||
pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
|
|
||||||
$(BASEEXT).x $(BOOTSTRAP) \
|
|
||||||
perl$(EXE_EXT) tmon.out \
|
|
||||||
*$(OBJ_EXT) pm_to_blib \
|
|
||||||
$(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
|
|
||||||
core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
|
|
||||||
core.*perl.*.? $(MAKE_APERL_FILE) \
|
|
||||||
perl $(BASEEXT).def \
|
|
||||||
core.[0-9][0-9][0-9] mon.out \
|
|
||||||
lib$(BASEEXT).def perlmain.c \
|
|
||||||
perl.exe so_locations \
|
|
||||||
$(BASEEXT).exp
|
|
||||||
- $(RM_RF) \
|
|
||||||
blib
|
|
||||||
- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker realclean_subdirs section:
|
|
||||||
realclean_subdirs :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker realclean section:
|
|
||||||
# Delete temporary files (via clean) and also delete dist files
|
|
||||||
realclean purge :: clean realclean_subdirs
|
|
||||||
- $(RM_F) \
|
|
||||||
$(MAKEFILE_OLD) $(FIRST_MAKEFILE)
|
|
||||||
- $(RM_RF) \
|
|
||||||
$(DISTVNAME)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker metafile section:
|
|
||||||
metafile : create_distdir
|
|
||||||
$(NOECHO) $(ECHO) Generating META.yml
|
|
||||||
$(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'name: Authen-NTLM-DES' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'version: 1.02' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'abstract: ~' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'author:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'distribution_type: module' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' directory:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - t' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - inc' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.55_02' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
|
|
||||||
-$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker signature section:
|
|
||||||
signature :
|
|
||||||
cpansign -s
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist_basics section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker dist_core section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker distdir section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker dist_test section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker dist_ci section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker distmeta section:
|
|
||||||
distmeta : create_distdir metafile
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
|
|
||||||
-e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker distsignature section:
|
|
||||||
distsignature : create_distdir
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
|
|
||||||
-e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
|
|
||||||
cd $(DISTVNAME) && cpansign -s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker install section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker force section:
|
|
||||||
# Phony target to force checking subdirectories.
|
|
||||||
FORCE :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker perldepend section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker makefile section:
|
|
||||||
# We take a very conservative approach here, but it's worth it.
|
|
||||||
# We move Makefile to Makefile.old here to avoid gnu make looping.
|
|
||||||
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
|
|
||||||
$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
|
|
||||||
$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
|
|
||||||
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
|
|
||||||
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
|
|
||||||
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
|
|
||||||
$(PERLRUN) Makefile.PL
|
|
||||||
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
|
|
||||||
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
|
|
||||||
$(FALSE)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker staticmake section:
|
|
||||||
|
|
||||||
# --- MakeMaker makeaperl section ---
|
|
||||||
MAP_TARGET = ../perl
|
|
||||||
FULLPERL = /usr/bin/perl
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker test section:
|
|
||||||
|
|
||||||
TEST_VERBOSE=0
|
|
||||||
TEST_TYPE=test_$(LINKTYPE)
|
|
||||||
TEST_FILE = test.pl
|
|
||||||
TEST_FILES =
|
|
||||||
TESTDB_SW = -d
|
|
||||||
|
|
||||||
testdb :: testdb_$(LINKTYPE)
|
|
||||||
|
|
||||||
test :: $(TEST_TYPE) subdirs-test
|
|
||||||
|
|
||||||
subdirs-test ::
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
$(NOECHO) $(ECHO) 'No tests defined for $(NAME) extension.'
|
|
||||||
|
|
||||||
test_dynamic :: pure_all
|
|
||||||
|
|
||||||
testdb_dynamic :: pure_all
|
|
||||||
PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
|
|
||||||
|
|
||||||
test_ : test_dynamic
|
|
||||||
|
|
||||||
test_static :: test_dynamic
|
|
||||||
testdb_static :: testdb_dynamic
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker ppd section:
|
|
||||||
# Creates a PPD (Perl Package Description) for a binary distribution.
|
|
||||||
ppd :
|
|
||||||
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1.02">' > $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <AUTHOR>David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk></AUTHOR>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i486-linux-gnu-thread-multi-5.10" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker pm_to_blib section:
|
|
||||||
|
|
||||||
pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
|
|
||||||
$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
|
|
||||||
DES.pm $(INST_LIB)/Authen/NTLM/DES.pm
|
|
||||||
$(NOECHO) $(TOUCH) pm_to_blib
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker selfdocument section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker postamble section:
|
|
||||||
|
|
||||||
|
|
||||||
# End.
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
use ExtUtils::MakeMaker;
|
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
WriteMakefile(
|
|
||||||
'NAME' => 'Authen::NTLM::DES',
|
|
||||||
'VERSION_FROM' => 'DES.pm',
|
|
||||||
($] >= 5.005 ? ## Add these new keywords supported since 5.005
|
|
||||||
('AUTHOR' => 'David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>') : ()),
|
|
||||||
);
|
|
|
@ -1,15 +0,0 @@
|
||||||
Changes
|
|
||||||
Makefile.PL
|
|
||||||
MANIFEST
|
|
||||||
README
|
|
||||||
NTLM.pm
|
|
||||||
DES/DES.pm
|
|
||||||
DES/Makefile.PL
|
|
||||||
MD4/MD4.pm
|
|
||||||
MD4/Makefile.PL
|
|
||||||
t/01_load.t
|
|
||||||
t/02_ntlm.t
|
|
||||||
t/03_oo.t
|
|
||||||
t/04_v2.t
|
|
||||||
t/99_pod.t
|
|
||||||
META.yml Module meta-data (added by MakeMaker)
|
|
|
@ -1,197 +0,0 @@
|
||||||
#!/usr/local/bin/perl
|
|
||||||
#
|
|
||||||
# This is a partial implentation of the MD4 checksum code.
|
|
||||||
#
|
|
||||||
# NOTE
|
|
||||||
#
|
|
||||||
# The function &add() in this module is required as we need to be
|
|
||||||
# able to add 32bit integers ignoring overflow. The C code this is
|
|
||||||
# based on does this because it uses the underlying hardware to
|
|
||||||
# perform the required addition however we need to be more careful
|
|
||||||
# as Perl will overflow an int and produce a result of 0xffffffff
|
|
||||||
# which is not very useful. The &add() function splits its arguments
|
|
||||||
# into two shorts and adds these carrying overflow from the low short
|
|
||||||
# to the high short and ignoring carry from the high short. Not
|
|
||||||
# exactly efficient, but it works and is fast enough for the purposes
|
|
||||||
# of this implementation
|
|
||||||
#
|
|
||||||
|
|
||||||
package Authen::NTLM::MD4;
|
|
||||||
|
|
||||||
use vars qw($VERSION @ISA @EXPORT);
|
|
||||||
require Exporter;
|
|
||||||
|
|
||||||
$VERSION = "1.02";
|
|
||||||
@ISA = qw(Exporter);
|
|
||||||
@EXPORT = qw(mdfour);
|
|
||||||
|
|
||||||
my ($A, $B, $C, $D);
|
|
||||||
my (@X, $M);
|
|
||||||
|
|
||||||
sub mdfour
|
|
||||||
{
|
|
||||||
my ($in) = @_;
|
|
||||||
|
|
||||||
my ($i, $pos);
|
|
||||||
my $len = length($in);
|
|
||||||
my $b = $len * 8;
|
|
||||||
$in .= "\0"x128;
|
|
||||||
$A = 0x67452301;
|
|
||||||
$B = 0xefcdab89;
|
|
||||||
$C = 0x98badcfe;
|
|
||||||
$D = 0x10325476;
|
|
||||||
$pos = 0;
|
|
||||||
while ($len > 64)
|
|
||||||
{
|
|
||||||
©64(substr($in, $pos, 64));
|
|
||||||
&mdfour64;
|
|
||||||
$pos += 64;
|
|
||||||
$len -= 64;
|
|
||||||
}
|
|
||||||
my $buf = substr($in, $pos, $len);
|
|
||||||
$buf .= sprintf "%c", 0x80;
|
|
||||||
if ($len <= 55)
|
|
||||||
{
|
|
||||||
$buf .= "\0"x(55-$len);
|
|
||||||
$buf .= pack("V", $b);
|
|
||||||
$buf .= "\0"x4;
|
|
||||||
©64($buf);
|
|
||||||
&mdfour64;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$buf .= "\0"x(120-$len);
|
|
||||||
$buf .= pack("V", $b);
|
|
||||||
$buf .= "\0"x4;
|
|
||||||
©64(substr($buf, 0, 64));
|
|
||||||
&mdfour64;
|
|
||||||
©64(substr($buf, 64, 64));
|
|
||||||
&mdfour64;
|
|
||||||
}
|
|
||||||
my $out = pack("VVVV", $A, $B, $C, $D);
|
|
||||||
return $out;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub F
|
|
||||||
{
|
|
||||||
my ($X, $Y, $Z) = @_;
|
|
||||||
my $res = ($X&$Y) | ((~$X)&$Z);
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub G
|
|
||||||
{
|
|
||||||
my ($X, $Y, $Z) = @_;
|
|
||||||
|
|
||||||
return ($X&$Y) | ($X&$Z) | ($Y&$Z);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub H
|
|
||||||
{
|
|
||||||
my ($X, $Y, $Z) = @_;
|
|
||||||
|
|
||||||
return $X^$Y^$Z;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lshift
|
|
||||||
{
|
|
||||||
my ($x, $s) = @_;
|
|
||||||
|
|
||||||
$x &= 0xffffffff;
|
|
||||||
return (($x<<$s)&0xffffffff) | ($x>>(32-$s));
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ROUND1
|
|
||||||
{
|
|
||||||
my ($a, $b, $c, $d, $k, $s) = @_;
|
|
||||||
my $e = &add($a, &F($b, $c, $d), $X[$k]);
|
|
||||||
return &lshift($e, $s);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ROUND2
|
|
||||||
{
|
|
||||||
my ($a, $b, $c, $d, $k, $s) = @_;
|
|
||||||
|
|
||||||
my $e = &add($a, &G($b, $c, $d), $X[$k], 0x5a827999);
|
|
||||||
return &lshift($e, $s);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ROUND3
|
|
||||||
{
|
|
||||||
my ($a, $b, $c, $d, $k, $s) = @_;
|
|
||||||
|
|
||||||
my $e = &add($a, &H($b, $c, $d), $X[$k], 0x6ed9eba1);
|
|
||||||
return &lshift($e, $s);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub mdfour64
|
|
||||||
{
|
|
||||||
my ($i, $AA, $BB, $CC, $DD);
|
|
||||||
@X = unpack("N16", $M);
|
|
||||||
$AA = $A;
|
|
||||||
$BB = $B;
|
|
||||||
$CC = $C;
|
|
||||||
$DD = $D;
|
|
||||||
|
|
||||||
$A = &ROUND1($A,$B,$C,$D, 0, 3); $D = &ROUND1($D,$A,$B,$C, 1, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B, 2,11); $B = &ROUND1($B,$C,$D,$A, 3,19);
|
|
||||||
$A = &ROUND1($A,$B,$C,$D, 4, 3); $D = &ROUND1($D,$A,$B,$C, 5, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B, 6,11); $B = &ROUND1($B,$C,$D,$A, 7,19);
|
|
||||||
$A = &ROUND1($A,$B,$C,$D, 8, 3); $D = &ROUND1($D,$A,$B,$C, 9, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B,10,11); $B = &ROUND1($B,$C,$D,$A,11,19);
|
|
||||||
$A = &ROUND1($A,$B,$C,$D,12, 3); $D = &ROUND1($D,$A,$B,$C,13, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B,14,11); $B = &ROUND1($B,$C,$D,$A,15,19);
|
|
||||||
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 0, 3); $D = &ROUND2($D,$A,$B,$C, 4, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B, 8, 9); $B = &ROUND2($B,$C,$D,$A,12,13);
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 1, 3); $D = &ROUND2($D,$A,$B,$C, 5, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B, 9, 9); $B = &ROUND2($B,$C,$D,$A,13,13);
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 2, 3); $D = &ROUND2($D,$A,$B,$C, 6, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B,10, 9); $B = &ROUND2($B,$C,$D,$A,14,13);
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 3, 3); $D = &ROUND2($D,$A,$B,$C, 7, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B,11, 9); $B = &ROUND2($B,$C,$D,$A,15,13);
|
|
||||||
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 0, 3); $D = &ROUND3($D,$A,$B,$C, 8, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 4,11); $B = &ROUND3($B,$C,$D,$A,12,15);
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 2, 3); $D = &ROUND3($D,$A,$B,$C,10, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 6,11); $B = &ROUND3($B,$C,$D,$A,14,15);
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 1, 3); $D = &ROUND3($D,$A,$B,$C, 9, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 5,11); $B = &ROUND3($B,$C,$D,$A,13,15);
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 3, 3); $D = &ROUND3($D,$A,$B,$C,11, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 7,11); $B = &ROUND3($B,$C,$D,$A,15,15);
|
|
||||||
|
|
||||||
$A = &add($A, $AA); $B = &add($B, $BB);
|
|
||||||
$C = &add($C, $CC); $D = &add($D, $DD);
|
|
||||||
$A &= 0xffffffff; $B &= 0xffffffff;
|
|
||||||
$C &= 0xffffffff; $D &= 0xffffffff;
|
|
||||||
map {$_ = 0} @X;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub copy64
|
|
||||||
{
|
|
||||||
my ($in) = @_;
|
|
||||||
|
|
||||||
$M = pack("V16", unpack("N16", $in));
|
|
||||||
}
|
|
||||||
|
|
||||||
# see note at top of this file about this function
|
|
||||||
sub add
|
|
||||||
{
|
|
||||||
my (@nums) = @_;
|
|
||||||
my ($r_low, $r_high, $n_low, $l_high);
|
|
||||||
my $num;
|
|
||||||
$r_low = $r_high = 0;
|
|
||||||
foreach $num (@nums)
|
|
||||||
{
|
|
||||||
$n_low = $num & 0xffff;
|
|
||||||
$n_high = ($num&0xffff0000)>>16;
|
|
||||||
$r_low += $n_low;
|
|
||||||
($r_low&0xf0000) && $r_high++;
|
|
||||||
$r_low &= 0xffff;
|
|
||||||
$r_high += $n_high;
|
|
||||||
$r_high &= 0xffff;
|
|
||||||
}
|
|
||||||
return ($r_high<<16)|$r_low;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
|
@ -1,599 +0,0 @@
|
||||||
# This Makefile is for the Authen::NTLM::MD4 extension to perl.
|
|
||||||
#
|
|
||||||
# It was generated automatically by MakeMaker version
|
|
||||||
# 6.55_02 (Revision: 65502) from the contents of
|
|
||||||
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
|
|
||||||
#
|
|
||||||
# ANY CHANGES MADE HERE WILL BE LOST!
|
|
||||||
#
|
|
||||||
# MakeMaker ARGV: ()
|
|
||||||
#
|
|
||||||
|
|
||||||
# MakeMaker Parameters:
|
|
||||||
|
|
||||||
# AUTHOR => q[David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>]
|
|
||||||
# BUILD_REQUIRES => { }
|
|
||||||
# NAME => q[Authen::NTLM::MD4]
|
|
||||||
# PREREQ_PM => { }
|
|
||||||
# VERSION_FROM => q[MD4.pm]
|
|
||||||
|
|
||||||
# --- MakeMaker post_initialize section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_config section:
|
|
||||||
|
|
||||||
# These definitions are from config.sh (via /usr/lib/perl/5.10/Config.pm).
|
|
||||||
# They may have been overridden via Makefile.PL or on the command line.
|
|
||||||
AR = ar
|
|
||||||
CC = cc
|
|
||||||
CCCDLFLAGS = -fPIC
|
|
||||||
CCDLFLAGS = -Wl,-E
|
|
||||||
DLEXT = so
|
|
||||||
DLSRC = dl_dlopen.xs
|
|
||||||
EXE_EXT =
|
|
||||||
FULL_AR = /usr/bin/ar
|
|
||||||
LD = cc
|
|
||||||
LDDLFLAGS = -shared -O2 -g -L/usr/local/lib -fstack-protector
|
|
||||||
LDFLAGS = -fstack-protector -L/usr/local/lib
|
|
||||||
LIBC = /lib/libc-2.11.1.so
|
|
||||||
LIB_EXT = .a
|
|
||||||
OBJ_EXT = .o
|
|
||||||
OSNAME = linux
|
|
||||||
OSVERS = 2.6.24-28-server
|
|
||||||
RANLIB = :
|
|
||||||
SITELIBEXP = /usr/local/share/perl/5.10.1
|
|
||||||
SITEARCHEXP = /usr/local/lib/perl/5.10.1
|
|
||||||
SO = so
|
|
||||||
VENDORARCHEXP = /usr/lib/perl5
|
|
||||||
VENDORLIBEXP = /usr/share/perl5
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker constants section:
|
|
||||||
AR_STATIC_ARGS = cr
|
|
||||||
DIRFILESEP = /
|
|
||||||
DFSEP = $(DIRFILESEP)
|
|
||||||
NAME = Authen::NTLM::MD4
|
|
||||||
NAME_SYM = Authen_NTLM_MD4
|
|
||||||
VERSION = 1.02
|
|
||||||
VERSION_MACRO = VERSION
|
|
||||||
VERSION_SYM = 1_02
|
|
||||||
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
|
|
||||||
XS_VERSION = 1.02
|
|
||||||
XS_VERSION_MACRO = XS_VERSION
|
|
||||||
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
|
|
||||||
INST_ARCHLIB = ../blib/arch
|
|
||||||
INST_SCRIPT = ../blib/script
|
|
||||||
INST_BIN = ../blib/bin
|
|
||||||
INST_LIB = ../blib/lib
|
|
||||||
INST_MAN1DIR = ../blib/man1
|
|
||||||
INST_MAN3DIR = ../blib/man3
|
|
||||||
MAN1EXT = 1p
|
|
||||||
MAN3EXT = 3pm
|
|
||||||
INSTALLDIRS = site
|
|
||||||
DESTDIR =
|
|
||||||
PREFIX = /usr
|
|
||||||
PERLPREFIX = $(PREFIX)
|
|
||||||
SITEPREFIX = $(PREFIX)/local
|
|
||||||
VENDORPREFIX = $(PREFIX)
|
|
||||||
INSTALLPRIVLIB = $(PERLPREFIX)/share/perl/5.10
|
|
||||||
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
|
|
||||||
INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.10.1
|
|
||||||
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
|
|
||||||
INSTALLVENDORLIB = $(VENDORPREFIX)/share/perl5
|
|
||||||
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
|
|
||||||
INSTALLARCHLIB = $(PERLPREFIX)/lib/perl/5.10
|
|
||||||
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
|
|
||||||
INSTALLSITEARCH = $(SITEPREFIX)/lib/perl/5.10.1
|
|
||||||
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
|
|
||||||
INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5
|
|
||||||
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
|
|
||||||
INSTALLBIN = $(PERLPREFIX)/bin
|
|
||||||
DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
|
|
||||||
INSTALLSITEBIN = $(SITEPREFIX)/bin
|
|
||||||
DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
|
|
||||||
INSTALLVENDORBIN = $(VENDORPREFIX)/bin
|
|
||||||
DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
|
|
||||||
INSTALLSCRIPT = $(PERLPREFIX)/bin
|
|
||||||
DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
|
|
||||||
INSTALLSITESCRIPT = $(SITEPREFIX)/bin
|
|
||||||
DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
|
|
||||||
INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin
|
|
||||||
DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
|
|
||||||
INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1
|
|
||||||
DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
|
|
||||||
INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
|
|
||||||
DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
|
|
||||||
INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1
|
|
||||||
DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
|
|
||||||
INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3
|
|
||||||
DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
|
|
||||||
INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3
|
|
||||||
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
|
|
||||||
INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3
|
|
||||||
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
|
|
||||||
PERL_LIB = /usr/share/perl/5.10
|
|
||||||
PERL_ARCHLIB = /usr/lib/perl/5.10
|
|
||||||
LIBPERL_A = libperl.a
|
|
||||||
FIRST_MAKEFILE = Makefile
|
|
||||||
MAKEFILE_OLD = Makefile.old
|
|
||||||
MAKE_APERL_FILE = Makefile.aperl
|
|
||||||
PERLMAINCC = $(CC)
|
|
||||||
PERL_INC = /usr/lib/perl/5.10/CORE
|
|
||||||
PERL = /usr/bin/perl
|
|
||||||
FULLPERL = /usr/bin/perl
|
|
||||||
ABSPERL = $(PERL)
|
|
||||||
PERLRUN = $(PERL)
|
|
||||||
FULLPERLRUN = $(FULLPERL)
|
|
||||||
ABSPERLRUN = $(ABSPERL)
|
|
||||||
PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
PERL_CORE = 0
|
|
||||||
PERM_DIR = 755
|
|
||||||
PERM_RW = 644
|
|
||||||
PERM_RWX = 755
|
|
||||||
|
|
||||||
MAKEMAKER = /usr/share/perl/5.10/ExtUtils/MakeMaker.pm
|
|
||||||
MM_VERSION = 6.55_02
|
|
||||||
MM_REVISION = 65502
|
|
||||||
|
|
||||||
# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
|
|
||||||
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
|
|
||||||
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
|
|
||||||
# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
|
|
||||||
MAKE = make
|
|
||||||
FULLEXT = Authen/NTLM/MD4
|
|
||||||
BASEEXT = MD4
|
|
||||||
PARENT_NAME = Authen::NTLM
|
|
||||||
DLBASE = $(BASEEXT)
|
|
||||||
VERSION_FROM = MD4.pm
|
|
||||||
OBJECT =
|
|
||||||
LDFROM = $(OBJECT)
|
|
||||||
LINKTYPE = dynamic
|
|
||||||
BOOTDEP =
|
|
||||||
|
|
||||||
# Handy lists of source code files:
|
|
||||||
XS_FILES =
|
|
||||||
C_FILES =
|
|
||||||
O_FILES =
|
|
||||||
H_FILES =
|
|
||||||
MAN1PODS =
|
|
||||||
MAN3PODS =
|
|
||||||
|
|
||||||
# Where is the Config information that we are using/depend on
|
|
||||||
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
|
|
||||||
|
|
||||||
# Where to build things
|
|
||||||
INST_LIBDIR = $(INST_LIB)/Authen/NTLM
|
|
||||||
INST_ARCHLIBDIR = $(INST_ARCHLIB)/Authen/NTLM
|
|
||||||
|
|
||||||
INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
|
|
||||||
INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
|
|
||||||
|
|
||||||
INST_STATIC =
|
|
||||||
INST_DYNAMIC =
|
|
||||||
INST_BOOT =
|
|
||||||
|
|
||||||
# Extra linker info
|
|
||||||
EXPORT_LIST =
|
|
||||||
PERL_ARCHIVE =
|
|
||||||
PERL_ARCHIVE_AFTER =
|
|
||||||
|
|
||||||
|
|
||||||
TO_INST_PM = MD4.pm
|
|
||||||
|
|
||||||
PM_TO_BLIB = MD4.pm \
|
|
||||||
$(INST_LIB)/Authen/NTLM/MD4.pm
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker platform_constants section:
|
|
||||||
MM_Unix_VERSION = 6.55_02
|
|
||||||
PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tool_autosplit section:
|
|
||||||
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
|
|
||||||
AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tool_xsubpp section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tools_other section:
|
|
||||||
SHELL = /bin/sh
|
|
||||||
CHMOD = chmod
|
|
||||||
CP = cp
|
|
||||||
MV = mv
|
|
||||||
NOOP = $(TRUE)
|
|
||||||
NOECHO = @
|
|
||||||
RM_F = rm -f
|
|
||||||
RM_RF = rm -rf
|
|
||||||
TEST_F = test -f
|
|
||||||
TOUCH = touch
|
|
||||||
UMASK_NULL = umask 0
|
|
||||||
DEV_NULL = > /dev/null 2>&1
|
|
||||||
MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
|
|
||||||
EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
|
|
||||||
FALSE = false
|
|
||||||
TRUE = true
|
|
||||||
ECHO = echo
|
|
||||||
ECHO_N = echo -n
|
|
||||||
UNINST = 0
|
|
||||||
VERBINST = 0
|
|
||||||
MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
|
|
||||||
DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
|
|
||||||
UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
|
|
||||||
WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
|
|
||||||
MACROSTART =
|
|
||||||
MACROEND =
|
|
||||||
USEMAKEFILE = -f
|
|
||||||
FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker makemakerdflt section:
|
|
||||||
makemakerdflt : all
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker macro section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker depend section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker cflags section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_loadlibs section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_cccmd section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker post_constants section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker pasthru section:
|
|
||||||
|
|
||||||
PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
|
|
||||||
LINKTYPE="$(LINKTYPE)"\
|
|
||||||
PREFIX="$(PREFIX)"
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker special_targets section:
|
|
||||||
.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
|
|
||||||
|
|
||||||
.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker c_o section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker xs_c section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker xs_o section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker top_targets section:
|
|
||||||
all :: pure_all manifypods
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
pure_all :: config pm_to_blib subdirs linkext
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
subdirs :: $(MYEXTLIB)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
config :: $(FIRST_MAKEFILE) blibdirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
help :
|
|
||||||
perldoc ExtUtils::MakeMaker
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker blibdirs section:
|
|
||||||
blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
# Backwards compat with 6.18 through 6.25
|
|
||||||
blibdirs.ts : blibdirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_LIBDIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_AUTODIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_BIN)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_BIN)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_SCRIPT)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker linkext section:
|
|
||||||
|
|
||||||
linkext :: $(LINKTYPE)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dlsyms section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic section:
|
|
||||||
|
|
||||||
dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic_bs section:
|
|
||||||
|
|
||||||
BOOTSTRAP =
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic_lib section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker static section:
|
|
||||||
|
|
||||||
## $(INST_PM) has been moved to the all: target.
|
|
||||||
## It remains here for awhile to allow for old usage: "make static"
|
|
||||||
static :: $(FIRST_MAKEFILE) $(INST_STATIC)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker static_lib section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker manifypods section:
|
|
||||||
|
|
||||||
POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
|
|
||||||
POD2MAN = $(POD2MAN_EXE)
|
|
||||||
|
|
||||||
|
|
||||||
manifypods : pure_all
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker processPL section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker installbin section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker subdirs section:
|
|
||||||
|
|
||||||
# none
|
|
||||||
|
|
||||||
# --- MakeMaker clean_subdirs section:
|
|
||||||
clean_subdirs :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker clean section:
|
|
||||||
|
|
||||||
# Delete temporary files but do not touch installed files. We don't delete
|
|
||||||
# the Makefile here so a later make realclean still has a makefile to use.
|
|
||||||
|
|
||||||
clean :: clean_subdirs
|
|
||||||
- $(RM_F) \
|
|
||||||
*$(LIB_EXT) core \
|
|
||||||
core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
|
|
||||||
core.[0-9][0-9] $(BASEEXT).bso \
|
|
||||||
pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
|
|
||||||
$(BASEEXT).x $(BOOTSTRAP) \
|
|
||||||
perl$(EXE_EXT) tmon.out \
|
|
||||||
*$(OBJ_EXT) pm_to_blib \
|
|
||||||
$(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
|
|
||||||
core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
|
|
||||||
core.*perl.*.? $(MAKE_APERL_FILE) \
|
|
||||||
$(BASEEXT).def perl \
|
|
||||||
core.[0-9][0-9][0-9] mon.out \
|
|
||||||
lib$(BASEEXT).def perl.exe \
|
|
||||||
perlmain.c so_locations \
|
|
||||||
$(BASEEXT).exp
|
|
||||||
- $(RM_RF) \
|
|
||||||
blib
|
|
||||||
- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker realclean_subdirs section:
|
|
||||||
realclean_subdirs :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker realclean section:
|
|
||||||
# Delete temporary files (via clean) and also delete dist files
|
|
||||||
realclean purge :: clean realclean_subdirs
|
|
||||||
- $(RM_F) \
|
|
||||||
$(MAKEFILE_OLD) $(FIRST_MAKEFILE)
|
|
||||||
- $(RM_RF) \
|
|
||||||
$(DISTVNAME)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker metafile section:
|
|
||||||
metafile : create_distdir
|
|
||||||
$(NOECHO) $(ECHO) Generating META.yml
|
|
||||||
$(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'name: Authen-NTLM-MD4' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'version: 1.02' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'abstract: ~' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'author:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'distribution_type: module' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' directory:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - t' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - inc' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.55_02' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
|
|
||||||
-$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker signature section:
|
|
||||||
signature :
|
|
||||||
cpansign -s
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist_basics section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker dist_core section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker distdir section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker dist_test section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker dist_ci section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker distmeta section:
|
|
||||||
distmeta : create_distdir metafile
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
|
|
||||||
-e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker distsignature section:
|
|
||||||
distsignature : create_distdir
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
|
|
||||||
-e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
|
|
||||||
cd $(DISTVNAME) && cpansign -s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker install section skipped.
|
|
||||||
|
|
||||||
# --- MakeMaker force section:
|
|
||||||
# Phony target to force checking subdirectories.
|
|
||||||
FORCE :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker perldepend section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker makefile section:
|
|
||||||
# We take a very conservative approach here, but it's worth it.
|
|
||||||
# We move Makefile to Makefile.old here to avoid gnu make looping.
|
|
||||||
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
|
|
||||||
$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
|
|
||||||
$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
|
|
||||||
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
|
|
||||||
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
|
|
||||||
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
|
|
||||||
$(PERLRUN) Makefile.PL
|
|
||||||
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
|
|
||||||
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
|
|
||||||
$(FALSE)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker staticmake section:
|
|
||||||
|
|
||||||
# --- MakeMaker makeaperl section ---
|
|
||||||
MAP_TARGET = ../perl
|
|
||||||
FULLPERL = /usr/bin/perl
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker test section:
|
|
||||||
|
|
||||||
TEST_VERBOSE=0
|
|
||||||
TEST_TYPE=test_$(LINKTYPE)
|
|
||||||
TEST_FILE = test.pl
|
|
||||||
TEST_FILES =
|
|
||||||
TESTDB_SW = -d
|
|
||||||
|
|
||||||
testdb :: testdb_$(LINKTYPE)
|
|
||||||
|
|
||||||
test :: $(TEST_TYPE) subdirs-test
|
|
||||||
|
|
||||||
subdirs-test ::
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
$(NOECHO) $(ECHO) 'No tests defined for $(NAME) extension.'
|
|
||||||
|
|
||||||
test_dynamic :: pure_all
|
|
||||||
|
|
||||||
testdb_dynamic :: pure_all
|
|
||||||
PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
|
|
||||||
|
|
||||||
test_ : test_dynamic
|
|
||||||
|
|
||||||
test_static :: test_dynamic
|
|
||||||
testdb_static :: testdb_dynamic
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker ppd section:
|
|
||||||
# Creates a PPD (Perl Package Description) for a binary distribution.
|
|
||||||
ppd :
|
|
||||||
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1.02">' > $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <AUTHOR>David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk></AUTHOR>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i486-linux-gnu-thread-multi-5.10" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker pm_to_blib section:
|
|
||||||
|
|
||||||
pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
|
|
||||||
$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
|
|
||||||
MD4.pm $(INST_LIB)/Authen/NTLM/MD4.pm
|
|
||||||
$(NOECHO) $(TOUCH) pm_to_blib
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker selfdocument section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker postamble section:
|
|
||||||
|
|
||||||
|
|
||||||
# End.
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
use ExtUtils::MakeMaker;
|
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
WriteMakefile(
|
|
||||||
'NAME' => 'Authen::NTLM::MD4',
|
|
||||||
'VERSION_FROM' => 'MD4.pm',
|
|
||||||
($] >= 5.005 ? ## Add these new keywords supported since 5.005
|
|
||||||
('AUTHOR' => 'David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>') : ()),
|
|
||||||
);
|
|
|
@ -1,15 +0,0 @@
|
||||||
--- #YAML:1.0
|
|
||||||
name: Authen-NTLM
|
|
||||||
version: 1.09
|
|
||||||
abstract: ~
|
|
||||||
license: perl
|
|
||||||
author:
|
|
||||||
- David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>, Nick Bebout <nbebout@cpan.org>
|
|
||||||
generated_by: ExtUtils::MakeMaker version 6.42
|
|
||||||
distribution_type: module
|
|
||||||
requires:
|
|
||||||
Digest::HMAC_MD5: 0
|
|
||||||
MIME::Base64: 0
|
|
||||||
meta-spec:
|
|
||||||
url: http://module-build.sourceforge.net/META-spec-v1.3.html
|
|
||||||
version: 1.3
|
|
|
@ -1,810 +0,0 @@
|
||||||
# This Makefile is for the Authen::NTLM extension to perl.
|
|
||||||
#
|
|
||||||
# It was generated automatically by MakeMaker version
|
|
||||||
# 6.55_02 (Revision: 65502) from the contents of
|
|
||||||
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
|
|
||||||
#
|
|
||||||
# ANY CHANGES MADE HERE WILL BE LOST!
|
|
||||||
#
|
|
||||||
# MakeMaker ARGV: ()
|
|
||||||
#
|
|
||||||
|
|
||||||
# MakeMaker Parameters:
|
|
||||||
|
|
||||||
# AUTHOR => q[David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>]
|
|
||||||
# BUILD_REQUIRES => { }
|
|
||||||
# DIR => [q[DES], q[MD4]]
|
|
||||||
# NAME => q[Authen::NTLM]
|
|
||||||
# PREREQ_PM => { Digest::HMAC_MD5=>q[0], MIME::Base64=>q[0] }
|
|
||||||
# VERSION_FROM => q[NTLM.pm]
|
|
||||||
|
|
||||||
# --- MakeMaker post_initialize section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_config section:
|
|
||||||
|
|
||||||
# These definitions are from config.sh (via /usr/lib/perl/5.10/Config.pm).
|
|
||||||
# They may have been overridden via Makefile.PL or on the command line.
|
|
||||||
AR = ar
|
|
||||||
CC = cc
|
|
||||||
CCCDLFLAGS = -fPIC
|
|
||||||
CCDLFLAGS = -Wl,-E
|
|
||||||
DLEXT = so
|
|
||||||
DLSRC = dl_dlopen.xs
|
|
||||||
EXE_EXT =
|
|
||||||
FULL_AR = /usr/bin/ar
|
|
||||||
LD = cc
|
|
||||||
LDDLFLAGS = -shared -O2 -g -L/usr/local/lib -fstack-protector
|
|
||||||
LDFLAGS = -fstack-protector -L/usr/local/lib
|
|
||||||
LIBC = /lib/libc-2.11.1.so
|
|
||||||
LIB_EXT = .a
|
|
||||||
OBJ_EXT = .o
|
|
||||||
OSNAME = linux
|
|
||||||
OSVERS = 2.6.24-28-server
|
|
||||||
RANLIB = :
|
|
||||||
SITELIBEXP = /usr/local/share/perl/5.10.1
|
|
||||||
SITEARCHEXP = /usr/local/lib/perl/5.10.1
|
|
||||||
SO = so
|
|
||||||
VENDORARCHEXP = /usr/lib/perl5
|
|
||||||
VENDORLIBEXP = /usr/share/perl5
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker constants section:
|
|
||||||
AR_STATIC_ARGS = cr
|
|
||||||
DIRFILESEP = /
|
|
||||||
DFSEP = $(DIRFILESEP)
|
|
||||||
NAME = Authen::NTLM
|
|
||||||
NAME_SYM = Authen_NTLM
|
|
||||||
VERSION = 1.09
|
|
||||||
VERSION_MACRO = VERSION
|
|
||||||
VERSION_SYM = 1_09
|
|
||||||
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
|
|
||||||
XS_VERSION = 1.09
|
|
||||||
XS_VERSION_MACRO = XS_VERSION
|
|
||||||
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
|
|
||||||
INST_ARCHLIB = blib/arch
|
|
||||||
INST_SCRIPT = blib/script
|
|
||||||
INST_BIN = blib/bin
|
|
||||||
INST_LIB = blib/lib
|
|
||||||
INST_MAN1DIR = blib/man1
|
|
||||||
INST_MAN3DIR = blib/man3
|
|
||||||
MAN1EXT = 1p
|
|
||||||
MAN3EXT = 3pm
|
|
||||||
INSTALLDIRS = site
|
|
||||||
DESTDIR =
|
|
||||||
PREFIX = /usr
|
|
||||||
PERLPREFIX = $(PREFIX)
|
|
||||||
SITEPREFIX = $(PREFIX)/local
|
|
||||||
VENDORPREFIX = $(PREFIX)
|
|
||||||
INSTALLPRIVLIB = $(PERLPREFIX)/share/perl/5.10
|
|
||||||
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
|
|
||||||
INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.10.1
|
|
||||||
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
|
|
||||||
INSTALLVENDORLIB = $(VENDORPREFIX)/share/perl5
|
|
||||||
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
|
|
||||||
INSTALLARCHLIB = $(PERLPREFIX)/lib/perl/5.10
|
|
||||||
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
|
|
||||||
INSTALLSITEARCH = $(SITEPREFIX)/lib/perl/5.10.1
|
|
||||||
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
|
|
||||||
INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5
|
|
||||||
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
|
|
||||||
INSTALLBIN = $(PERLPREFIX)/bin
|
|
||||||
DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
|
|
||||||
INSTALLSITEBIN = $(SITEPREFIX)/bin
|
|
||||||
DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
|
|
||||||
INSTALLVENDORBIN = $(VENDORPREFIX)/bin
|
|
||||||
DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
|
|
||||||
INSTALLSCRIPT = $(PERLPREFIX)/bin
|
|
||||||
DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
|
|
||||||
INSTALLSITESCRIPT = $(SITEPREFIX)/bin
|
|
||||||
DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
|
|
||||||
INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin
|
|
||||||
DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
|
|
||||||
INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1
|
|
||||||
DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
|
|
||||||
INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
|
|
||||||
DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
|
|
||||||
INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1
|
|
||||||
DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
|
|
||||||
INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3
|
|
||||||
DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
|
|
||||||
INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3
|
|
||||||
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
|
|
||||||
INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3
|
|
||||||
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
|
|
||||||
PERL_LIB = /usr/share/perl/5.10
|
|
||||||
PERL_ARCHLIB = /usr/lib/perl/5.10
|
|
||||||
LIBPERL_A = libperl.a
|
|
||||||
FIRST_MAKEFILE = Makefile
|
|
||||||
MAKEFILE_OLD = Makefile.old
|
|
||||||
MAKE_APERL_FILE = Makefile.aperl
|
|
||||||
PERLMAINCC = $(CC)
|
|
||||||
PERL_INC = /usr/lib/perl/5.10/CORE
|
|
||||||
PERL = /usr/bin/perl
|
|
||||||
FULLPERL = /usr/bin/perl
|
|
||||||
ABSPERL = $(PERL)
|
|
||||||
PERLRUN = $(PERL)
|
|
||||||
FULLPERLRUN = $(FULLPERL)
|
|
||||||
ABSPERLRUN = $(ABSPERL)
|
|
||||||
PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
|
|
||||||
PERL_CORE = 0
|
|
||||||
PERM_DIR = 755
|
|
||||||
PERM_RW = 644
|
|
||||||
PERM_RWX = 755
|
|
||||||
|
|
||||||
MAKEMAKER = /usr/share/perl/5.10/ExtUtils/MakeMaker.pm
|
|
||||||
MM_VERSION = 6.55_02
|
|
||||||
MM_REVISION = 65502
|
|
||||||
|
|
||||||
# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
|
|
||||||
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
|
|
||||||
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
|
|
||||||
# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
|
|
||||||
MAKE = make
|
|
||||||
FULLEXT = Authen/NTLM
|
|
||||||
BASEEXT = NTLM
|
|
||||||
PARENT_NAME = Authen
|
|
||||||
DLBASE = $(BASEEXT)
|
|
||||||
VERSION_FROM = NTLM.pm
|
|
||||||
OBJECT =
|
|
||||||
LDFROM = $(OBJECT)
|
|
||||||
LINKTYPE = dynamic
|
|
||||||
BOOTDEP =
|
|
||||||
|
|
||||||
# Handy lists of source code files:
|
|
||||||
XS_FILES =
|
|
||||||
C_FILES =
|
|
||||||
O_FILES =
|
|
||||||
H_FILES =
|
|
||||||
MAN1PODS =
|
|
||||||
MAN3PODS = NTLM.pm
|
|
||||||
|
|
||||||
# Where is the Config information that we are using/depend on
|
|
||||||
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
|
|
||||||
|
|
||||||
# Where to build things
|
|
||||||
INST_LIBDIR = $(INST_LIB)/Authen
|
|
||||||
INST_ARCHLIBDIR = $(INST_ARCHLIB)/Authen
|
|
||||||
|
|
||||||
INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
|
|
||||||
INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
|
|
||||||
|
|
||||||
INST_STATIC =
|
|
||||||
INST_DYNAMIC =
|
|
||||||
INST_BOOT =
|
|
||||||
|
|
||||||
# Extra linker info
|
|
||||||
EXPORT_LIST =
|
|
||||||
PERL_ARCHIVE =
|
|
||||||
PERL_ARCHIVE_AFTER =
|
|
||||||
|
|
||||||
|
|
||||||
TO_INST_PM = NTLM.pm
|
|
||||||
|
|
||||||
PM_TO_BLIB = NTLM.pm \
|
|
||||||
$(INST_LIB)/Authen/NTLM.pm
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker platform_constants section:
|
|
||||||
MM_Unix_VERSION = 6.55_02
|
|
||||||
PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tool_autosplit section:
|
|
||||||
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
|
|
||||||
AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tool_xsubpp section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker tools_other section:
|
|
||||||
SHELL = /bin/sh
|
|
||||||
CHMOD = chmod
|
|
||||||
CP = cp
|
|
||||||
MV = mv
|
|
||||||
NOOP = $(TRUE)
|
|
||||||
NOECHO = @
|
|
||||||
RM_F = rm -f
|
|
||||||
RM_RF = rm -rf
|
|
||||||
TEST_F = test -f
|
|
||||||
TOUCH = touch
|
|
||||||
UMASK_NULL = umask 0
|
|
||||||
DEV_NULL = > /dev/null 2>&1
|
|
||||||
MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
|
|
||||||
EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
|
|
||||||
FALSE = false
|
|
||||||
TRUE = true
|
|
||||||
ECHO = echo
|
|
||||||
ECHO_N = echo -n
|
|
||||||
UNINST = 0
|
|
||||||
VERBINST = 0
|
|
||||||
MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
|
|
||||||
DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
|
|
||||||
UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
|
|
||||||
WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
|
|
||||||
MACROSTART =
|
|
||||||
MACROEND =
|
|
||||||
USEMAKEFILE = -f
|
|
||||||
FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker makemakerdflt section:
|
|
||||||
makemakerdflt : all
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist section:
|
|
||||||
TAR = tar
|
|
||||||
TARFLAGS = cvf
|
|
||||||
ZIP = zip
|
|
||||||
ZIPFLAGS = -r
|
|
||||||
COMPRESS = gzip --best
|
|
||||||
SUFFIX = .gz
|
|
||||||
SHAR = shar
|
|
||||||
PREOP = $(NOECHO) $(NOOP)
|
|
||||||
POSTOP = $(NOECHO) $(NOOP)
|
|
||||||
TO_UNIX = $(NOECHO) $(NOOP)
|
|
||||||
CI = ci -u
|
|
||||||
RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
|
|
||||||
DIST_CP = best
|
|
||||||
DIST_DEFAULT = tardist
|
|
||||||
DISTNAME = Authen-NTLM
|
|
||||||
DISTVNAME = Authen-NTLM-1.09
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker macro section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker depend section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker cflags section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_loadlibs section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker const_cccmd section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker post_constants section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker pasthru section:
|
|
||||||
|
|
||||||
PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
|
|
||||||
LINKTYPE="$(LINKTYPE)"\
|
|
||||||
PREFIX="$(PREFIX)"
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker special_targets section:
|
|
||||||
.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
|
|
||||||
|
|
||||||
.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker c_o section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker xs_c section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker xs_o section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker top_targets section:
|
|
||||||
all :: pure_all manifypods
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
pure_all :: config pm_to_blib subdirs linkext
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
subdirs :: $(MYEXTLIB)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
config :: $(FIRST_MAKEFILE) blibdirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
help :
|
|
||||||
perldoc ExtUtils::MakeMaker
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker blibdirs section:
|
|
||||||
blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
# Backwards compat with 6.18 through 6.25
|
|
||||||
blibdirs.ts : blibdirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_LIBDIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_AUTODIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_BIN)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_BIN)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_SCRIPT)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
|
|
||||||
$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
|
|
||||||
$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
|
|
||||||
$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker linkext section:
|
|
||||||
|
|
||||||
linkext :: $(LINKTYPE)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dlsyms section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic section:
|
|
||||||
|
|
||||||
dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic_bs section:
|
|
||||||
|
|
||||||
BOOTSTRAP =
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dynamic_lib section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker static section:
|
|
||||||
|
|
||||||
## $(INST_PM) has been moved to the all: target.
|
|
||||||
## It remains here for awhile to allow for old usage: "make static"
|
|
||||||
static :: $(FIRST_MAKEFILE) $(INST_STATIC)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker static_lib section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker manifypods section:
|
|
||||||
|
|
||||||
POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
|
|
||||||
POD2MAN = $(POD2MAN_EXE)
|
|
||||||
|
|
||||||
|
|
||||||
manifypods : pure_all \
|
|
||||||
NTLM.pm
|
|
||||||
$(NOECHO) $(POD2MAN) --section=$(MAN3EXT) --perm_rw=$(PERM_RW) \
|
|
||||||
NTLM.pm $(INST_MAN3DIR)/Authen::NTLM.$(MAN3EXT)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker processPL section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker installbin section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker subdirs section:
|
|
||||||
|
|
||||||
# The default clean, realclean and test targets in this Makefile
|
|
||||||
# have automatically been given entries for each subdir.
|
|
||||||
|
|
||||||
|
|
||||||
subdirs ::
|
|
||||||
$(NOECHO) cd DES && $(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)
|
|
||||||
|
|
||||||
subdirs ::
|
|
||||||
$(NOECHO) cd MD4 && $(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker clean_subdirs section:
|
|
||||||
clean_subdirs :
|
|
||||||
$(ABSPERLRUN) -e 'chdir '\''DES'\''; system '\''$(MAKE) clean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
|
|
||||||
$(ABSPERLRUN) -e 'chdir '\''MD4'\''; system '\''$(MAKE) clean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker clean section:
|
|
||||||
|
|
||||||
# Delete temporary files but do not touch installed files. We don't delete
|
|
||||||
# the Makefile here so a later make realclean still has a makefile to use.
|
|
||||||
|
|
||||||
clean :: clean_subdirs
|
|
||||||
- $(RM_F) \
|
|
||||||
*$(LIB_EXT) core \
|
|
||||||
core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
|
|
||||||
core.[0-9][0-9] $(BASEEXT).bso \
|
|
||||||
pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
|
|
||||||
$(BASEEXT).x $(BOOTSTRAP) \
|
|
||||||
perl$(EXE_EXT) tmon.out \
|
|
||||||
*$(OBJ_EXT) pm_to_blib \
|
|
||||||
$(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
|
|
||||||
core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
|
|
||||||
core.*perl.*.? $(MAKE_APERL_FILE) \
|
|
||||||
$(BASEEXT).def perl \
|
|
||||||
core.[0-9][0-9][0-9] mon.out \
|
|
||||||
lib$(BASEEXT).def perl.exe \
|
|
||||||
perlmain.c so_locations \
|
|
||||||
$(BASEEXT).exp
|
|
||||||
- $(RM_RF) \
|
|
||||||
blib
|
|
||||||
- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker realclean_subdirs section:
|
|
||||||
realclean_subdirs :
|
|
||||||
- $(ABSPERLRUN) -e 'chdir '\''DES'\''; system '\''$(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) realclean'\'' if -f '\''$(MAKEFILE_OLD)'\'';' --
|
|
||||||
- $(ABSPERLRUN) -e 'chdir '\''DES'\''; system '\''$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) realclean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
|
|
||||||
- $(ABSPERLRUN) -e 'chdir '\''MD4'\''; system '\''$(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) realclean'\'' if -f '\''$(MAKEFILE_OLD)'\'';' --
|
|
||||||
- $(ABSPERLRUN) -e 'chdir '\''MD4'\''; system '\''$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) realclean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker realclean section:
|
|
||||||
# Delete temporary files (via clean) and also delete dist files
|
|
||||||
realclean purge :: clean realclean_subdirs
|
|
||||||
- $(RM_F) \
|
|
||||||
$(MAKEFILE_OLD) $(FIRST_MAKEFILE)
|
|
||||||
- $(RM_RF) \
|
|
||||||
$(DISTVNAME)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker metafile section:
|
|
||||||
metafile : create_distdir
|
|
||||||
$(NOECHO) $(ECHO) Generating META.yml
|
|
||||||
$(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'name: Authen-NTLM' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'version: 1.09' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'abstract: ~' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'author:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'distribution_type: module' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'requires:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' Digest::HMAC_MD5: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' MIME::Base64: 0' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' directory:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - t' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' - inc' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.55_02' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
|
|
||||||
$(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
|
|
||||||
-$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker signature section:
|
|
||||||
signature :
|
|
||||||
cpansign -s
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist_basics section:
|
|
||||||
distclean :: realclean distcheck
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
distcheck :
|
|
||||||
$(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
|
|
||||||
|
|
||||||
skipcheck :
|
|
||||||
$(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
|
|
||||||
|
|
||||||
manifest :
|
|
||||||
$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
|
|
||||||
|
|
||||||
veryclean : realclean
|
|
||||||
$(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist_core section:
|
|
||||||
|
|
||||||
dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
|
|
||||||
$(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
|
|
||||||
-e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
|
|
||||||
|
|
||||||
tardist : $(DISTVNAME).tar$(SUFFIX)
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
uutardist : $(DISTVNAME).tar$(SUFFIX)
|
|
||||||
uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
|
|
||||||
|
|
||||||
$(DISTVNAME).tar$(SUFFIX) : distdir
|
|
||||||
$(PREOP)
|
|
||||||
$(TO_UNIX)
|
|
||||||
$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
|
|
||||||
$(RM_RF) $(DISTVNAME)
|
|
||||||
$(COMPRESS) $(DISTVNAME).tar
|
|
||||||
$(POSTOP)
|
|
||||||
|
|
||||||
zipdist : $(DISTVNAME).zip
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
$(DISTVNAME).zip : distdir
|
|
||||||
$(PREOP)
|
|
||||||
$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
|
|
||||||
$(RM_RF) $(DISTVNAME)
|
|
||||||
$(POSTOP)
|
|
||||||
|
|
||||||
shdist : distdir
|
|
||||||
$(PREOP)
|
|
||||||
$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
|
|
||||||
$(RM_RF) $(DISTVNAME)
|
|
||||||
$(POSTOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker distdir section:
|
|
||||||
create_distdir :
|
|
||||||
$(RM_RF) $(DISTVNAME)
|
|
||||||
$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
|
|
||||||
-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
|
|
||||||
|
|
||||||
distdir : create_distdir distmeta
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist_test section:
|
|
||||||
disttest : distdir
|
|
||||||
cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
|
|
||||||
cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
|
|
||||||
cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker dist_ci section:
|
|
||||||
|
|
||||||
ci :
|
|
||||||
$(PERLRUN) "-MExtUtils::Manifest=maniread" \
|
|
||||||
-e "@all = keys %{ maniread() };" \
|
|
||||||
-e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
|
|
||||||
-e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker distmeta section:
|
|
||||||
distmeta : create_distdir metafile
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
|
|
||||||
-e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker distsignature section:
|
|
||||||
distsignature : create_distdir
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
|
|
||||||
-e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
|
|
||||||
$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
|
|
||||||
cd $(DISTVNAME) && cpansign -s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker install section:
|
|
||||||
|
|
||||||
install :: pure_install doc_install
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
install_perl :: pure_perl_install doc_perl_install
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
install_site :: pure_site_install doc_site_install
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
install_vendor :: pure_vendor_install doc_vendor_install
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
pure_install :: pure_$(INSTALLDIRS)_install
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
doc_install :: doc_$(INSTALLDIRS)_install
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
pure__install : pure_site_install
|
|
||||||
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
|
|
||||||
|
|
||||||
doc__install : doc_site_install
|
|
||||||
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
|
|
||||||
|
|
||||||
pure_perl_install :: all
|
|
||||||
$(NOECHO) umask 022; $(MOD_INSTALL) \
|
|
||||||
$(INST_LIB) $(DESTINSTALLPRIVLIB) \
|
|
||||||
$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
|
|
||||||
$(INST_BIN) $(DESTINSTALLBIN) \
|
|
||||||
$(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
|
|
||||||
$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
|
|
||||||
$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
|
|
||||||
$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
|
|
||||||
$(SITEARCHEXP)/auto/$(FULLEXT)
|
|
||||||
|
|
||||||
|
|
||||||
pure_site_install :: all
|
|
||||||
$(NOECHO) umask 02; $(MOD_INSTALL) \
|
|
||||||
read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
|
|
||||||
write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
|
|
||||||
$(INST_LIB) $(DESTINSTALLSITELIB) \
|
|
||||||
$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
|
|
||||||
$(INST_BIN) $(DESTINSTALLSITEBIN) \
|
|
||||||
$(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
|
|
||||||
$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
|
|
||||||
$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
|
|
||||||
$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
|
|
||||||
$(PERL_ARCHLIB)/auto/$(FULLEXT)
|
|
||||||
|
|
||||||
pure_vendor_install :: all
|
|
||||||
$(NOECHO) umask 022; $(MOD_INSTALL) \
|
|
||||||
$(INST_LIB) $(DESTINSTALLVENDORLIB) \
|
|
||||||
$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
|
|
||||||
$(INST_BIN) $(DESTINSTALLVENDORBIN) \
|
|
||||||
$(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
|
|
||||||
$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
|
|
||||||
$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
|
|
||||||
|
|
||||||
doc_perl_install :: all
|
|
||||||
|
|
||||||
doc_site_install :: all
|
|
||||||
$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
|
|
||||||
-$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
|
|
||||||
-$(NOECHO) umask 02; $(DOC_INSTALL) \
|
|
||||||
"Module" "$(NAME)" \
|
|
||||||
"installed into" "$(INSTALLSITELIB)" \
|
|
||||||
LINKTYPE "$(LINKTYPE)" \
|
|
||||||
VERSION "$(VERSION)" \
|
|
||||||
EXE_FILES "$(EXE_FILES)" \
|
|
||||||
>> $(DESTINSTALLSITEARCH)/perllocal.pod
|
|
||||||
|
|
||||||
doc_vendor_install :: all
|
|
||||||
|
|
||||||
|
|
||||||
uninstall :: uninstall_from_$(INSTALLDIRS)dirs
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
uninstall_from_perldirs ::
|
|
||||||
|
|
||||||
uninstall_from_sitedirs ::
|
|
||||||
$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
|
|
||||||
|
|
||||||
uninstall_from_vendordirs ::
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker force section:
|
|
||||||
# Phony target to force checking subdirectories.
|
|
||||||
FORCE :
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker perldepend section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker makefile section:
|
|
||||||
# We take a very conservative approach here, but it's worth it.
|
|
||||||
# We move Makefile to Makefile.old here to avoid gnu make looping.
|
|
||||||
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
|
|
||||||
$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
|
|
||||||
$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
|
|
||||||
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
|
|
||||||
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
|
|
||||||
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
|
|
||||||
$(PERLRUN) Makefile.PL
|
|
||||||
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
|
|
||||||
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
|
|
||||||
$(FALSE)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker staticmake section:
|
|
||||||
|
|
||||||
# --- MakeMaker makeaperl section ---
|
|
||||||
MAP_TARGET = perl
|
|
||||||
FULLPERL = /usr/bin/perl
|
|
||||||
|
|
||||||
$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
|
|
||||||
$(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
|
|
||||||
|
|
||||||
$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
|
|
||||||
$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
|
|
||||||
$(NOECHO) $(PERLRUNINST) \
|
|
||||||
Makefile.PL DIR=DES:MD4 \
|
|
||||||
MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
|
|
||||||
MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker test section:
|
|
||||||
|
|
||||||
TEST_VERBOSE=0
|
|
||||||
TEST_TYPE=test_$(LINKTYPE)
|
|
||||||
TEST_FILE = test.pl
|
|
||||||
TEST_FILES = t/*.t
|
|
||||||
TESTDB_SW = -d
|
|
||||||
|
|
||||||
testdb :: testdb_$(LINKTYPE)
|
|
||||||
|
|
||||||
test :: $(TEST_TYPE) subdirs-test
|
|
||||||
|
|
||||||
subdirs-test ::
|
|
||||||
$(NOECHO) $(NOOP)
|
|
||||||
|
|
||||||
subdirs-test ::
|
|
||||||
$(NOECHO) cd DES && $(MAKE) test $(PASTHRU)
|
|
||||||
|
|
||||||
subdirs-test ::
|
|
||||||
$(NOECHO) cd MD4 && $(MAKE) test $(PASTHRU)
|
|
||||||
|
|
||||||
|
|
||||||
test_dynamic :: pure_all
|
|
||||||
PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
|
|
||||||
|
|
||||||
testdb_dynamic :: pure_all
|
|
||||||
PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
|
|
||||||
|
|
||||||
test_ : test_dynamic
|
|
||||||
|
|
||||||
test_static :: test_dynamic
|
|
||||||
testdb_static :: testdb_dynamic
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker ppd section:
|
|
||||||
# Creates a PPD (Perl Package Description) for a binary distribution.
|
|
||||||
ppd :
|
|
||||||
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1.09">' > $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <AUTHOR>David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk></AUTHOR>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <REQUIRE NAME="Digest::HMAC_MD5" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <REQUIRE NAME="MIME::Base64" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i486-linux-gnu-thread-multi-5.10" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
|
|
||||||
$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker pm_to_blib section:
|
|
||||||
|
|
||||||
pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
|
|
||||||
$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
|
|
||||||
NTLM.pm $(INST_LIB)/Authen/NTLM.pm
|
|
||||||
$(NOECHO) $(TOUCH) pm_to_blib
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker selfdocument section:
|
|
||||||
|
|
||||||
|
|
||||||
# --- MakeMaker postamble section:
|
|
||||||
|
|
||||||
|
|
||||||
# End.
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
use ExtUtils::MakeMaker;
|
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
WriteMakefile(
|
|
||||||
'NAME' => 'Authen::NTLM',
|
|
||||||
'DIR' => ['DES', 'MD4'],
|
|
||||||
'VERSION_FROM' => 'NTLM.pm',
|
|
||||||
'PREREQ_PM' => { 'MIME::Base64' => 0, 'Digest::HMAC_MD5' => 0 },
|
|
||||||
($] >= 5.005 ? ## Add these new keywords supported since 5.005
|
|
||||||
('AUTHOR' => 'David (Buzz) Bussenschutt <davidbuzz@gmail.com>, Mark Bush <Mark.Bush@bushnet.demon.co.uk>') : ()),
|
|
||||||
);
|
|
|
@ -1,511 +0,0 @@
|
||||||
#!/usr/local/bin/perl
|
|
||||||
|
|
||||||
package Authen::NTLM;
|
|
||||||
use strict;
|
|
||||||
use Authen::NTLM::DES;
|
|
||||||
use Authen::NTLM::MD4;
|
|
||||||
use MIME::Base64;
|
|
||||||
use Digest::HMAC_MD5;
|
|
||||||
|
|
||||||
use vars qw($VERSION @ISA @EXPORT);
|
|
||||||
require Exporter;
|
|
||||||
|
|
||||||
=head1 NAME
|
|
||||||
|
|
||||||
Authen::NTLM - An NTLM authentication module
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
|
||||||
|
|
||||||
use Mail::IMAPClient;
|
|
||||||
use Authen::NTLM;
|
|
||||||
my $imap = Mail::IMAPClient->new(Server=>'imaphost');
|
|
||||||
ntlm_user($username);
|
|
||||||
ntlm_password($password);
|
|
||||||
$imap->authenticate("NTLM", Authen::NTLM::ntlm);
|
|
||||||
:
|
|
||||||
$imap->logout;
|
|
||||||
ntlm_reset;
|
|
||||||
:
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
ntlmv2(1);
|
|
||||||
ntlm_user($username);
|
|
||||||
ntlm_host($host);
|
|
||||||
ntlm_password($password);
|
|
||||||
:
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
my $ntlm = Authen::NTLM-> new(
|
|
||||||
host => $host,
|
|
||||||
user => $username,
|
|
||||||
domain => $domain,
|
|
||||||
password => $password,
|
|
||||||
version => 1,
|
|
||||||
);
|
|
||||||
$ntlm-> challenge;
|
|
||||||
:
|
|
||||||
$ntlm-> challenge($challenge);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
This module provides methods to use NTLM authentication. It can
|
|
||||||
be used as an authenticate method with the Mail::IMAPClient module
|
|
||||||
to perform the challenge/response mechanism for NTLM connections
|
|
||||||
or it can be used on its own for NTLM authentication with other
|
|
||||||
protocols (eg. HTTP).
|
|
||||||
|
|
||||||
The implementation is a direct port of the code from F<fetchmail>
|
|
||||||
which, itself, has based its NTLM implementation on F<samba>. As
|
|
||||||
such, this code is not especially efficient, however it will still
|
|
||||||
take a fraction of a second to negotiate a login on a PII which is
|
|
||||||
likely to be good enough for most situations.
|
|
||||||
|
|
||||||
=head2 FUNCTIONS
|
|
||||||
|
|
||||||
=over 4
|
|
||||||
|
|
||||||
=item ntlm_domain()
|
|
||||||
|
|
||||||
Set the domain to use in the NTLM authentication messages.
|
|
||||||
Returns the new domain. Without an argument, this function
|
|
||||||
returns the current domain entry.
|
|
||||||
|
|
||||||
=item ntlm_user()
|
|
||||||
|
|
||||||
Set the username to use in the NTLM authentication messages.
|
|
||||||
Returns the new username. Without an argument, this function
|
|
||||||
returns the current username entry.
|
|
||||||
|
|
||||||
=item ntlm_password()
|
|
||||||
|
|
||||||
Set the password to use in the NTLM authentication messages.
|
|
||||||
Returns the new password. Without an argument, this function
|
|
||||||
returns the current password entry.
|
|
||||||
|
|
||||||
=item ntlm_reset()
|
|
||||||
|
|
||||||
Resets the NTLM challenge/response state machine so that the next
|
|
||||||
call to C<ntlm()> will produce an initial connect message.
|
|
||||||
|
|
||||||
=item ntlm()
|
|
||||||
|
|
||||||
Generate a reply to a challenge. The NTLM protocol involves an
|
|
||||||
initial empty challenge from the server requiring a message
|
|
||||||
response containing the username and domain (which may be empty).
|
|
||||||
The first call to C<ntlm()> generates this first message ignoring
|
|
||||||
any arguments.
|
|
||||||
|
|
||||||
The second time it is called, it is assumed that the argument is
|
|
||||||
the challenge string sent from the server. This will contain 8
|
|
||||||
bytes of data which are used in the DES functions to generate the
|
|
||||||
response authentication strings. The result of the call is the
|
|
||||||
final authentication string.
|
|
||||||
|
|
||||||
If C<ntlm_reset()> is called, then the next call to C<ntlm()> will
|
|
||||||
start the process again allowing multiple authentications within
|
|
||||||
an application.
|
|
||||||
|
|
||||||
=item ntlmv2()
|
|
||||||
|
|
||||||
Use NTLM v2 authentication.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head2 OBJECT API
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item new %options
|
|
||||||
|
|
||||||
Creates an object that accepts the following options: C<user>, C<host>,
|
|
||||||
C<domain>, C<password>, C<version>.
|
|
||||||
|
|
||||||
=item challenge [$challenge]
|
|
||||||
|
|
||||||
If C<$challenge> is not supplied, first-stage challenge string is generated.
|
|
||||||
Otherwise, the third-stage challenge is generated, where C<$challenge> is
|
|
||||||
assumed to be extracted from the second stage of NTLM exchange. The result of
|
|
||||||
the call is the final authentication string.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
|
||||||
|
|
||||||
David (Buzz) Bussenschutt <davidbuzz@gmail.com> - current maintainer
|
|
||||||
Dmitry Karasik <dmitry@karasik.eu.org> - nice ntlmv2 patch, OO extensions.
|
|
||||||
Andrew Hobson <ahobson@infloop.com> - initial ntlmv2 code
|
|
||||||
Mark Bush <Mark.Bush@bushnet.demon.co.uk> - perl port
|
|
||||||
Eric S. Raymond - author of fetchmail
|
|
||||||
Andrew Tridgell and Jeremy Allison for SMB/Netbios code
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
|
||||||
|
|
||||||
L<perl>, L<Mail::IMAPClient>, L<LWP::Authen::Ntlm>
|
|
||||||
|
|
||||||
=head1 HISTORY
|
|
||||||
|
|
||||||
1.09 - fix CPAN ticket # 70703
|
|
||||||
1.08 - fix CPAN ticket # 39925
|
|
||||||
1.07 - not publicly released
|
|
||||||
1.06 - relicense as GPL+ or Artistic
|
|
||||||
1.05 - add OO interface by Dmitry Karasik
|
|
||||||
1.04 - implementation of NTLMv2 by Andrew Hobson/Dmitry Karasik
|
|
||||||
1.03 - fixes long-standing 1 line bug L<http://rt.cpan.org/Public/Bug/Display.html?id=9521> - released by David Bussenschutt 9th Aug 2007
|
|
||||||
1.02 - released by Mark Bush 29th Oct 2001
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
$VERSION = "1.09";
|
|
||||||
@ISA = qw(Exporter);
|
|
||||||
@EXPORT = qw(ntlm ntlm_domain ntlm_user ntlm_password ntlm_reset ntlm_host ntlmv2);
|
|
||||||
|
|
||||||
my $domain = "";
|
|
||||||
my $user = "";
|
|
||||||
my $password = "";
|
|
||||||
|
|
||||||
my $str_hdr = "vvV";
|
|
||||||
my $hdr_len = 8;
|
|
||||||
my $ident = "NTLMSSP";
|
|
||||||
|
|
||||||
my $msg1_f = 0x0000b207;
|
|
||||||
my $msg1 = "Z8VV";
|
|
||||||
my $msg1_hlen = 16 + ($hdr_len*2);
|
|
||||||
|
|
||||||
my $msg2 = "Z8Va${hdr_len}Va8a8a${hdr_len}";
|
|
||||||
my $msg2_hlen = 12 + $hdr_len + 20 + $hdr_len;
|
|
||||||
|
|
||||||
my $msg3 = "Z8V";
|
|
||||||
my $msg3_tl = "V";
|
|
||||||
my $msg3_hlen = 12 + ($hdr_len*6) + 4;
|
|
||||||
|
|
||||||
my $state = 0;
|
|
||||||
|
|
||||||
my $host = "";
|
|
||||||
my $ntlm_v2 = 0;
|
|
||||||
my $ntlm_v2_msg3_flags = 0x88205;
|
|
||||||
|
|
||||||
|
|
||||||
# Domain Name supplied on negotiate
|
|
||||||
use constant NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED => 0x00001000;
|
|
||||||
# Workstation Name supplied on negotiate
|
|
||||||
use constant NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED => 0x00002000;
|
|
||||||
# Try to use NTLMv2
|
|
||||||
use constant NTLMSSP_NEGOTIATE_NTLM2 => 0x00080000;
|
|
||||||
|
|
||||||
|
|
||||||
# Object API
|
|
||||||
|
|
||||||
sub new
|
|
||||||
{
|
|
||||||
my ( $class, %opt) = @_;
|
|
||||||
for (qw(domain user password host)) {
|
|
||||||
$opt{$_} = "" unless defined $opt{$_};
|
|
||||||
}
|
|
||||||
$opt{version} ||= 1;
|
|
||||||
return bless { %opt }, $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub challenge
|
|
||||||
{
|
|
||||||
my ( $self, $challenge) = @_;
|
|
||||||
$state = defined $challenge;
|
|
||||||
($user,$domain,$password,$host) = @{$self}{qw(user domain password host)};
|
|
||||||
$ntlm_v2 = ($self-> {version} eq '2') ? 1 : 0;
|
|
||||||
return ntlm($challenge);
|
|
||||||
}
|
|
||||||
|
|
||||||
eval "sub $_ { \$#_ ? \$_[0]->{$_} = \$_[1] : \$_[0]->{$_} }"
|
|
||||||
for qw(user domain password host version);
|
|
||||||
|
|
||||||
# Function API
|
|
||||||
|
|
||||||
sub ntlm_domain
|
|
||||||
{
|
|
||||||
if (@_)
|
|
||||||
{
|
|
||||||
$domain = shift;
|
|
||||||
}
|
|
||||||
return $domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_user
|
|
||||||
{
|
|
||||||
if (@_)
|
|
||||||
{
|
|
||||||
$user = shift;
|
|
||||||
}
|
|
||||||
return $user;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_password
|
|
||||||
{
|
|
||||||
if (@_)
|
|
||||||
{
|
|
||||||
$password = shift;
|
|
||||||
}
|
|
||||||
return $password;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_reset
|
|
||||||
{
|
|
||||||
$state = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlmv2
|
|
||||||
{
|
|
||||||
if (@_) {
|
|
||||||
$ntlm_v2 = shift;
|
|
||||||
}
|
|
||||||
return $ntlm_v2;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_host {
|
|
||||||
if (@_) {
|
|
||||||
$host = shift;
|
|
||||||
}
|
|
||||||
return $host;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm
|
|
||||||
{
|
|
||||||
my ($challenge) = @_;
|
|
||||||
|
|
||||||
my ($flags, $user_hdr, $domain_hdr,
|
|
||||||
$u_off, $d_off, $c_info, $lmResp, $ntResp, $lm_hdr,
|
|
||||||
$nt_hdr, $wks_hdr, $session_hdr, $lm_off, $nt_off,
|
|
||||||
$wks_off, $s_off, $u_user, $msg1_host, $host_hdr, $u_host);
|
|
||||||
my $response;
|
|
||||||
if ($state)
|
|
||||||
{
|
|
||||||
|
|
||||||
$challenge =~ s/^\s*//;
|
|
||||||
$challenge = decode_base64($challenge);
|
|
||||||
$c_info = &decode_challenge($challenge);
|
|
||||||
$u_user = &unicode($user);
|
|
||||||
if (!$ntlm_v2) {
|
|
||||||
$domain = substr($challenge, $c_info->{domain}{offset}, $c_info->{domain}{len});
|
|
||||||
$lmResp = &lmEncrypt($c_info->{data});
|
|
||||||
$ntResp = &ntEncrypt($c_info->{data});
|
|
||||||
$flags = pack($msg3_tl, $c_info->{flags});
|
|
||||||
}
|
|
||||||
elsif ($ntlm_v2 eq '1') {
|
|
||||||
$lmResp = &lmv2Encrypt($c_info->{data});
|
|
||||||
$ntResp = &ntv2Encrypt($c_info->{data}, $c_info->{target_data});
|
|
||||||
$flags = pack($msg3_tl, $ntlm_v2_msg3_flags);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$domain = &unicode($domain);#substr($challenge, $c_info->{domain}{offset}, $c_info->{domain}{len});
|
|
||||||
$lmResp = &lmEncrypt($c_info->{data});
|
|
||||||
$ntResp = &ntEncrypt($c_info->{data});
|
|
||||||
$flags = pack($msg3_tl, $c_info->{flags});
|
|
||||||
}
|
|
||||||
$u_host = &unicode(($host ? $host : $user));
|
|
||||||
$response = pack($msg3, $ident, 3);
|
|
||||||
|
|
||||||
$lm_off = $msg3_hlen;
|
|
||||||
$nt_off = $lm_off + length($lmResp);
|
|
||||||
$d_off = $nt_off + length($ntResp);
|
|
||||||
$u_off = $d_off + length($domain);
|
|
||||||
$wks_off = $u_off + length($u_user);
|
|
||||||
$s_off = $wks_off + length($u_host);
|
|
||||||
$lm_hdr = &hdr($lmResp, $msg3_hlen, $lm_off);
|
|
||||||
$nt_hdr = &hdr($ntResp, $msg3_hlen, $nt_off);
|
|
||||||
$domain_hdr = &hdr($domain, $msg3_hlen, $d_off);
|
|
||||||
$user_hdr = &hdr($u_user, $msg3_hlen, $u_off);
|
|
||||||
$wks_hdr = &hdr($u_host, $msg3_hlen, $wks_off);
|
|
||||||
$session_hdr = &hdr("", $msg3_hlen, $s_off);
|
|
||||||
$response .= $lm_hdr . $nt_hdr . $domain_hdr . $user_hdr .
|
|
||||||
$wks_hdr . $session_hdr . $flags .
|
|
||||||
$lmResp . $ntResp . $domain . $u_user . $u_host;
|
|
||||||
}
|
|
||||||
else # first response;
|
|
||||||
{
|
|
||||||
my $f = $msg1_f;
|
|
||||||
if (!length $domain) {
|
|
||||||
$f &= ~NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED;
|
|
||||||
}
|
|
||||||
$msg1_host = $user;
|
|
||||||
if ($ntlm_v2 and $ntlm_v2 eq '1') {
|
|
||||||
$f &= ~NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED;
|
|
||||||
$f |= NTLMSSP_NEGOTIATE_NTLM2;
|
|
||||||
$msg1_host = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = pack($msg1, $ident, 1, $f);
|
|
||||||
$u_off = $msg1_hlen;
|
|
||||||
$d_off = $u_off + length($msg1_host);
|
|
||||||
$host_hdr = &hdr($msg1_host, $msg1_hlen, $u_off);
|
|
||||||
$domain_hdr = &hdr($domain, $msg1_hlen, $d_off);
|
|
||||||
$response .= $host_hdr . $domain_hdr . $msg1_host . $domain;
|
|
||||||
$state = 1;
|
|
||||||
}
|
|
||||||
return encode_base64($response, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
sub hdr
|
|
||||||
{
|
|
||||||
my ($string, $h_len, $offset) = @_;
|
|
||||||
|
|
||||||
my ($res, $len);
|
|
||||||
$len = length($string);
|
|
||||||
if ($string)
|
|
||||||
{
|
|
||||||
$res = pack($str_hdr, $len, $len, $offset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$res = pack($str_hdr, 0, 0, $offset - $h_len);
|
|
||||||
}
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub decode_challenge
|
|
||||||
{
|
|
||||||
my ($challenge) = @_;
|
|
||||||
|
|
||||||
my $res;
|
|
||||||
my (@res, @hdr);
|
|
||||||
my $original = $challenge;
|
|
||||||
|
|
||||||
$res->{buffer} = $msg2_hlen < length $challenge
|
|
||||||
? substr($challenge, $msg2_hlen) : '';
|
|
||||||
$challenge = substr($challenge, 0, $msg2_hlen);
|
|
||||||
@res = unpack($msg2, $challenge);
|
|
||||||
$res->{ident} = $res[0];
|
|
||||||
$res->{type} = $res[1];
|
|
||||||
@hdr = unpack($str_hdr, $res[2]);
|
|
||||||
$res->{domain}{len} = $hdr[0];
|
|
||||||
$res->{domain}{maxlen} = $hdr[1];
|
|
||||||
$res->{domain}{offset} = $hdr[2];
|
|
||||||
$res->{flags} = $res[3];
|
|
||||||
$res->{data} = $res[4];
|
|
||||||
$res->{reserved} = $res[5];
|
|
||||||
$res->{empty_hdr} = $res[6];
|
|
||||||
@hdr = unpack($str_hdr, $res[6]);
|
|
||||||
$res->{target}{len} = $hdr[0];
|
|
||||||
$res->{target}{maxlen} = $hdr[1];
|
|
||||||
$res->{target}{offset} = $hdr[2];
|
|
||||||
$res->{target_data} = substr($original, $hdr[2], $hdr[1]);
|
|
||||||
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub unicode
|
|
||||||
{
|
|
||||||
my ($string) = @_;
|
|
||||||
my ($reply, $c, $z) = ('');
|
|
||||||
|
|
||||||
$z = sprintf "%c", 0;
|
|
||||||
foreach $c (split //, $string)
|
|
||||||
{
|
|
||||||
$reply .= $c . $z;
|
|
||||||
}
|
|
||||||
return $reply;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub NTunicode
|
|
||||||
{
|
|
||||||
my ($string) = @_;
|
|
||||||
my ($reply, $c);
|
|
||||||
|
|
||||||
foreach $c (map {ord($_)} split(//, $string))
|
|
||||||
{
|
|
||||||
$reply .= pack("v", $c);
|
|
||||||
}
|
|
||||||
return $reply;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lmEncrypt
|
|
||||||
{
|
|
||||||
my ($data) = @_;
|
|
||||||
|
|
||||||
my $p14 = substr($password, 0, 14);
|
|
||||||
$p14 =~ tr/a-z/A-Z/;
|
|
||||||
$p14 .= "\0"x(14-length($p14));
|
|
||||||
my $p21 = E_P16($p14);
|
|
||||||
$p21 .= "\0"x(21-length($p21));
|
|
||||||
my $p24 = E_P24($p21, $data);
|
|
||||||
return $p24;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntEncrypt
|
|
||||||
{
|
|
||||||
my ($data) = @_;
|
|
||||||
|
|
||||||
my $p21 = &E_md4hash;
|
|
||||||
$p21 .= "\0"x(21-length($p21));
|
|
||||||
my $p24 = E_P24($p21, $data);
|
|
||||||
return $p24;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub E_md4hash
|
|
||||||
{
|
|
||||||
my $wpwd = &NTunicode($password);
|
|
||||||
my $p16 = mdfour($wpwd);
|
|
||||||
return $p16;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lmv2Encrypt {
|
|
||||||
my ($data) = @_;
|
|
||||||
|
|
||||||
my $u_pass = &unicode($password);
|
|
||||||
my $ntlm_hash = mdfour($u_pass);
|
|
||||||
|
|
||||||
my $u_user = &unicode("\U$user\E");
|
|
||||||
my $u_domain = &unicode("$domain");
|
|
||||||
my $concat = $u_user . $u_domain;
|
|
||||||
|
|
||||||
my $hmac = Digest::HMAC_MD5->new($ntlm_hash);
|
|
||||||
$hmac->add($concat);
|
|
||||||
my $ntlm_v2_hash = $hmac->digest;
|
|
||||||
|
|
||||||
# Firefox seems to use this as its random challenge
|
|
||||||
my $random_challenge = "\0" x 8;
|
|
||||||
|
|
||||||
my $concat2 = $data . $random_challenge;
|
|
||||||
|
|
||||||
$hmac = Digest::HMAC_MD5->new($ntlm_v2_hash);
|
|
||||||
$hmac->add(substr($data, 0, 8) . $random_challenge);
|
|
||||||
my $r = $hmac->digest . $random_challenge;
|
|
||||||
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntv2Encrypt {
|
|
||||||
my ($data, $target) = @_;
|
|
||||||
|
|
||||||
my $u_pass = &unicode($password);
|
|
||||||
my $ntlm_hash = mdfour($u_pass);
|
|
||||||
|
|
||||||
my $u_user = &unicode("\U$user\E");
|
|
||||||
my $u_domain = &unicode("$domain");
|
|
||||||
my $concat = $u_user . $u_domain;
|
|
||||||
|
|
||||||
my $hmac = Digest::HMAC_MD5->new($ntlm_hash);
|
|
||||||
$hmac->add($concat);
|
|
||||||
my $ntlm_v2_hash = $hmac->digest;
|
|
||||||
|
|
||||||
my $zero_long = "\000" x 4;
|
|
||||||
my $sig = pack("H8", "01010000");
|
|
||||||
my $time = pack("VV", (time + 11644473600) + 10000000);
|
|
||||||
my $rand = "\0" x 8;
|
|
||||||
my $blob = $sig . $zero_long . $time . $rand . $zero_long .
|
|
||||||
$target . $zero_long;
|
|
||||||
|
|
||||||
$concat = $data . $blob;
|
|
||||||
|
|
||||||
$hmac = Digest::HMAC_MD5->new($ntlm_v2_hash);
|
|
||||||
$hmac->add($concat);
|
|
||||||
|
|
||||||
my $d = $hmac->digest;
|
|
||||||
|
|
||||||
my $r = $d . $blob;
|
|
||||||
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
|
@ -1,104 +0,0 @@
|
||||||
NTLM Authentication Scheme
|
|
||||||
==========================
|
|
||||||
|
|
||||||
This module implements the NTLM authentication mechanism. It can be
|
|
||||||
used to perform NTLM style authentication for any desired protocol.
|
|
||||||
|
|
||||||
The module works well with the Mail::IMAPClient module in the
|
|
||||||
"authenticate" method, however I had to make a change to that method
|
|
||||||
for it to work. The following line (2511 in version 2.1.4):
|
|
||||||
|
|
||||||
($code) = $o->[DATA] =~ /^\+ (.*)$/ ;
|
|
||||||
|
|
||||||
needed to be changed to:
|
|
||||||
|
|
||||||
($code) = $o->[DATA] =~ /^\+(.*)$/ ;
|
|
||||||
|
|
||||||
as the initial NTLM challenge is empty.
|
|
||||||
|
|
||||||
This module also works well with LWP::Authen::Ntlm , allowing LWP::UserAgent
|
|
||||||
and/or WWW::Mechanise to automate/browse/fetch/etc remote Microsoft Windows
|
|
||||||
servers running NTLM authentication.
|
|
||||||
Example use is like this(note the fact that NTLM.pm is NOT explicitly used!):
|
|
||||||
|
|
||||||
use WWW::Mechanize;
|
|
||||||
$mech = WWW::Mechanize->new(keep_alive=>1);
|
|
||||||
$mech->no_proxy('my.server');
|
|
||||||
$mech->credentials('my.server:80', '', "my_domain\\my_user", my_pass);
|
|
||||||
$response = $mech->get( $url );
|
|
||||||
|
|
||||||
|
|
||||||
INSTALLATION
|
|
||||||
|
|
||||||
To install this application:
|
|
||||||
|
|
||||||
perl Makefile.PL
|
|
||||||
make
|
|
||||||
make test
|
|
||||||
make install
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
|
|
||||||
This module requires the MIME::Base64 module, and Digest::HMAC_MD5
|
|
||||||
|
|
||||||
COPYRIGHT AND LICENSE
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of either:
|
|
||||||
|
|
||||||
a) the GNU General Public License as published by the Free
|
|
||||||
Software Foundation; either version 1, or (at your option) any
|
|
||||||
later version, or
|
|
||||||
|
|
||||||
b) the "Artistic License" which comes with this Kit.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
|
|
||||||
the GNU General Public License or the Artistic License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the Artistic License with this
|
|
||||||
Kit, in the file named "COPYING-Artistic". If not, I'll be glad to provide one.
|
|
||||||
|
|
||||||
You should also have received a copy of the GNU General Public License version 1
|
|
||||||
along with this program in the file named "COPYING-GPL". If not, write to the
|
|
||||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
Boston, MA 02110-1301, USA or visit their web page on the internet at
|
|
||||||
http://www.gnu.org/copyleft/gpl.html.
|
|
||||||
|
|
||||||
For those of you that choose to use the GNU General Public License,
|
|
||||||
my interpretation of the GNU General Public License is that no Perl
|
|
||||||
script falls under the terms of the GPL unless you explicitly put
|
|
||||||
said script under the terms of the GPL yourself. Furthermore, any
|
|
||||||
object code linked with perl does not automatically fall under the
|
|
||||||
terms of the GPL, provided such object code only adds definitions
|
|
||||||
of subroutines and variables, and does not otherwise impair the
|
|
||||||
resulting interpreter from executing any standard Perl script. I
|
|
||||||
consider linking in C subroutines in this manner to be the moral
|
|
||||||
equivalent of defining subroutines in the Perl language itself. You
|
|
||||||
may sell such an object file as proprietary provided that you provide
|
|
||||||
or offer to provide the Perl source, as specified by the GNU General
|
|
||||||
Public License. (This is merely an alternate way of specifying input
|
|
||||||
to the program.) You may also sell a binary produced by the dumping of
|
|
||||||
a running Perl script that belongs to you, provided that you provide or
|
|
||||||
offer to provide the Perl source as specified by the GPL. (The
|
|
||||||
fact that a Perl interpreter and your code are in the same binary file
|
|
||||||
is, in this case, a form of mere aggregation.) This is my interpretation
|
|
||||||
of the GPL. If you still have concerns or difficulties understanding
|
|
||||||
my intent, feel free to contact me. Of course, the Artistic License
|
|
||||||
spells all this out for your protection, so you may prefer to use that.
|
|
||||||
|
|
||||||
License clarified by Nick Bebout per email from David Bussenschutt.
|
|
||||||
<nb@fedoraproject.org>
|
|
||||||
|
|
||||||
Parts of this code Copyright (C) 2007 David (Buzz) Bussenschutt.
|
|
||||||
<davidbuzz@gmail.com>
|
|
||||||
|
|
||||||
Perl port of this code is Copyright (C) 2001 Mark Bush.
|
|
||||||
<Mark.Bush@bushnet.demon.co.uk>
|
|
||||||
|
|
||||||
The code is originally based on fetchmail code which is Copyright (C) 1997 Eric
|
|
||||||
S. Raymond.
|
|
||||||
|
|
||||||
Fetchmail uses SMB/Netbios code from samba which is Copyright (C)
|
|
||||||
Andrew Tridgell 1992-1998 with modifications from Jeremy Allison.
|
|
|
@ -1,511 +0,0 @@
|
||||||
#!/usr/local/bin/perl
|
|
||||||
|
|
||||||
package Authen::NTLM;
|
|
||||||
use strict;
|
|
||||||
use Authen::NTLM::DES;
|
|
||||||
use Authen::NTLM::MD4;
|
|
||||||
use MIME::Base64;
|
|
||||||
use Digest::HMAC_MD5;
|
|
||||||
|
|
||||||
use vars qw($VERSION @ISA @EXPORT);
|
|
||||||
require Exporter;
|
|
||||||
|
|
||||||
=head1 NAME
|
|
||||||
|
|
||||||
Authen::NTLM - An NTLM authentication module
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
|
||||||
|
|
||||||
use Mail::IMAPClient;
|
|
||||||
use Authen::NTLM;
|
|
||||||
my $imap = Mail::IMAPClient->new(Server=>'imaphost');
|
|
||||||
ntlm_user($username);
|
|
||||||
ntlm_password($password);
|
|
||||||
$imap->authenticate("NTLM", Authen::NTLM::ntlm);
|
|
||||||
:
|
|
||||||
$imap->logout;
|
|
||||||
ntlm_reset;
|
|
||||||
:
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
ntlmv2(1);
|
|
||||||
ntlm_user($username);
|
|
||||||
ntlm_host($host);
|
|
||||||
ntlm_password($password);
|
|
||||||
:
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
my $ntlm = Authen::NTLM-> new(
|
|
||||||
host => $host,
|
|
||||||
user => $username,
|
|
||||||
domain => $domain,
|
|
||||||
password => $password,
|
|
||||||
version => 1,
|
|
||||||
);
|
|
||||||
$ntlm-> challenge;
|
|
||||||
:
|
|
||||||
$ntlm-> challenge($challenge);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
This module provides methods to use NTLM authentication. It can
|
|
||||||
be used as an authenticate method with the Mail::IMAPClient module
|
|
||||||
to perform the challenge/response mechanism for NTLM connections
|
|
||||||
or it can be used on its own for NTLM authentication with other
|
|
||||||
protocols (eg. HTTP).
|
|
||||||
|
|
||||||
The implementation is a direct port of the code from F<fetchmail>
|
|
||||||
which, itself, has based its NTLM implementation on F<samba>. As
|
|
||||||
such, this code is not especially efficient, however it will still
|
|
||||||
take a fraction of a second to negotiate a login on a PII which is
|
|
||||||
likely to be good enough for most situations.
|
|
||||||
|
|
||||||
=head2 FUNCTIONS
|
|
||||||
|
|
||||||
=over 4
|
|
||||||
|
|
||||||
=item ntlm_domain()
|
|
||||||
|
|
||||||
Set the domain to use in the NTLM authentication messages.
|
|
||||||
Returns the new domain. Without an argument, this function
|
|
||||||
returns the current domain entry.
|
|
||||||
|
|
||||||
=item ntlm_user()
|
|
||||||
|
|
||||||
Set the username to use in the NTLM authentication messages.
|
|
||||||
Returns the new username. Without an argument, this function
|
|
||||||
returns the current username entry.
|
|
||||||
|
|
||||||
=item ntlm_password()
|
|
||||||
|
|
||||||
Set the password to use in the NTLM authentication messages.
|
|
||||||
Returns the new password. Without an argument, this function
|
|
||||||
returns the current password entry.
|
|
||||||
|
|
||||||
=item ntlm_reset()
|
|
||||||
|
|
||||||
Resets the NTLM challenge/response state machine so that the next
|
|
||||||
call to C<ntlm()> will produce an initial connect message.
|
|
||||||
|
|
||||||
=item ntlm()
|
|
||||||
|
|
||||||
Generate a reply to a challenge. The NTLM protocol involves an
|
|
||||||
initial empty challenge from the server requiring a message
|
|
||||||
response containing the username and domain (which may be empty).
|
|
||||||
The first call to C<ntlm()> generates this first message ignoring
|
|
||||||
any arguments.
|
|
||||||
|
|
||||||
The second time it is called, it is assumed that the argument is
|
|
||||||
the challenge string sent from the server. This will contain 8
|
|
||||||
bytes of data which are used in the DES functions to generate the
|
|
||||||
response authentication strings. The result of the call is the
|
|
||||||
final authentication string.
|
|
||||||
|
|
||||||
If C<ntlm_reset()> is called, then the next call to C<ntlm()> will
|
|
||||||
start the process again allowing multiple authentications within
|
|
||||||
an application.
|
|
||||||
|
|
||||||
=item ntlmv2()
|
|
||||||
|
|
||||||
Use NTLM v2 authentication.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head2 OBJECT API
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item new %options
|
|
||||||
|
|
||||||
Creates an object that accepts the following options: C<user>, C<host>,
|
|
||||||
C<domain>, C<password>, C<version>.
|
|
||||||
|
|
||||||
=item challenge [$challenge]
|
|
||||||
|
|
||||||
If C<$challenge> is not supplied, first-stage challenge string is generated.
|
|
||||||
Otherwise, the third-stage challenge is generated, where C<$challenge> is
|
|
||||||
assumed to be extracted from the second stage of NTLM exchange. The result of
|
|
||||||
the call is the final authentication string.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
|
||||||
|
|
||||||
David (Buzz) Bussenschutt <davidbuzz@gmail.com> - current maintainer
|
|
||||||
Dmitry Karasik <dmitry@karasik.eu.org> - nice ntlmv2 patch, OO extensions.
|
|
||||||
Andrew Hobson <ahobson@infloop.com> - initial ntlmv2 code
|
|
||||||
Mark Bush <Mark.Bush@bushnet.demon.co.uk> - perl port
|
|
||||||
Eric S. Raymond - author of fetchmail
|
|
||||||
Andrew Tridgell and Jeremy Allison for SMB/Netbios code
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
|
||||||
|
|
||||||
L<perl>, L<Mail::IMAPClient>, L<LWP::Authen::Ntlm>
|
|
||||||
|
|
||||||
=head1 HISTORY
|
|
||||||
|
|
||||||
1.09 - fix CPAN ticket # 70703
|
|
||||||
1.08 - fix CPAN ticket # 39925
|
|
||||||
1.07 - not publicly released
|
|
||||||
1.06 - relicense as GPL+ or Artistic
|
|
||||||
1.05 - add OO interface by Dmitry Karasik
|
|
||||||
1.04 - implementation of NTLMv2 by Andrew Hobson/Dmitry Karasik
|
|
||||||
1.03 - fixes long-standing 1 line bug L<http://rt.cpan.org/Public/Bug/Display.html?id=9521> - released by David Bussenschutt 9th Aug 2007
|
|
||||||
1.02 - released by Mark Bush 29th Oct 2001
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
$VERSION = "1.09";
|
|
||||||
@ISA = qw(Exporter);
|
|
||||||
@EXPORT = qw(ntlm ntlm_domain ntlm_user ntlm_password ntlm_reset ntlm_host ntlmv2);
|
|
||||||
|
|
||||||
my $domain = "";
|
|
||||||
my $user = "";
|
|
||||||
my $password = "";
|
|
||||||
|
|
||||||
my $str_hdr = "vvV";
|
|
||||||
my $hdr_len = 8;
|
|
||||||
my $ident = "NTLMSSP";
|
|
||||||
|
|
||||||
my $msg1_f = 0x0000b207;
|
|
||||||
my $msg1 = "Z8VV";
|
|
||||||
my $msg1_hlen = 16 + ($hdr_len*2);
|
|
||||||
|
|
||||||
my $msg2 = "Z8Va${hdr_len}Va8a8a${hdr_len}";
|
|
||||||
my $msg2_hlen = 12 + $hdr_len + 20 + $hdr_len;
|
|
||||||
|
|
||||||
my $msg3 = "Z8V";
|
|
||||||
my $msg3_tl = "V";
|
|
||||||
my $msg3_hlen = 12 + ($hdr_len*6) + 4;
|
|
||||||
|
|
||||||
my $state = 0;
|
|
||||||
|
|
||||||
my $host = "";
|
|
||||||
my $ntlm_v2 = 0;
|
|
||||||
my $ntlm_v2_msg3_flags = 0x88205;
|
|
||||||
|
|
||||||
|
|
||||||
# Domain Name supplied on negotiate
|
|
||||||
use constant NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED => 0x00001000;
|
|
||||||
# Workstation Name supplied on negotiate
|
|
||||||
use constant NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED => 0x00002000;
|
|
||||||
# Try to use NTLMv2
|
|
||||||
use constant NTLMSSP_NEGOTIATE_NTLM2 => 0x00080000;
|
|
||||||
|
|
||||||
|
|
||||||
# Object API
|
|
||||||
|
|
||||||
sub new
|
|
||||||
{
|
|
||||||
my ( $class, %opt) = @_;
|
|
||||||
for (qw(domain user password host)) {
|
|
||||||
$opt{$_} = "" unless defined $opt{$_};
|
|
||||||
}
|
|
||||||
$opt{version} ||= 1;
|
|
||||||
return bless { %opt }, $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub challenge
|
|
||||||
{
|
|
||||||
my ( $self, $challenge) = @_;
|
|
||||||
$state = defined $challenge;
|
|
||||||
($user,$domain,$password,$host) = @{$self}{qw(user domain password host)};
|
|
||||||
$ntlm_v2 = ($self-> {version} eq '2') ? 1 : 0;
|
|
||||||
return ntlm($challenge);
|
|
||||||
}
|
|
||||||
|
|
||||||
eval "sub $_ { \$#_ ? \$_[0]->{$_} = \$_[1] : \$_[0]->{$_} }"
|
|
||||||
for qw(user domain password host version);
|
|
||||||
|
|
||||||
# Function API
|
|
||||||
|
|
||||||
sub ntlm_domain
|
|
||||||
{
|
|
||||||
if (@_)
|
|
||||||
{
|
|
||||||
$domain = shift;
|
|
||||||
}
|
|
||||||
return $domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_user
|
|
||||||
{
|
|
||||||
if (@_)
|
|
||||||
{
|
|
||||||
$user = shift;
|
|
||||||
}
|
|
||||||
return $user;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_password
|
|
||||||
{
|
|
||||||
if (@_)
|
|
||||||
{
|
|
||||||
$password = shift;
|
|
||||||
}
|
|
||||||
return $password;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_reset
|
|
||||||
{
|
|
||||||
$state = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlmv2
|
|
||||||
{
|
|
||||||
if (@_) {
|
|
||||||
$ntlm_v2 = shift;
|
|
||||||
}
|
|
||||||
return $ntlm_v2;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm_host {
|
|
||||||
if (@_) {
|
|
||||||
$host = shift;
|
|
||||||
}
|
|
||||||
return $host;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntlm
|
|
||||||
{
|
|
||||||
my ($challenge) = @_;
|
|
||||||
|
|
||||||
my ($flags, $user_hdr, $domain_hdr,
|
|
||||||
$u_off, $d_off, $c_info, $lmResp, $ntResp, $lm_hdr,
|
|
||||||
$nt_hdr, $wks_hdr, $session_hdr, $lm_off, $nt_off,
|
|
||||||
$wks_off, $s_off, $u_user, $msg1_host, $host_hdr, $u_host);
|
|
||||||
my $response;
|
|
||||||
if ($state)
|
|
||||||
{
|
|
||||||
|
|
||||||
$challenge =~ s/^\s*//;
|
|
||||||
$challenge = decode_base64($challenge);
|
|
||||||
$c_info = &decode_challenge($challenge);
|
|
||||||
$u_user = &unicode($user);
|
|
||||||
if (!$ntlm_v2) {
|
|
||||||
$domain = substr($challenge, $c_info->{domain}{offset}, $c_info->{domain}{len});
|
|
||||||
$lmResp = &lmEncrypt($c_info->{data});
|
|
||||||
$ntResp = &ntEncrypt($c_info->{data});
|
|
||||||
$flags = pack($msg3_tl, $c_info->{flags});
|
|
||||||
}
|
|
||||||
elsif ($ntlm_v2 eq '1') {
|
|
||||||
$lmResp = &lmv2Encrypt($c_info->{data});
|
|
||||||
$ntResp = &ntv2Encrypt($c_info->{data}, $c_info->{target_data});
|
|
||||||
$flags = pack($msg3_tl, $ntlm_v2_msg3_flags);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$domain = &unicode($domain);#substr($challenge, $c_info->{domain}{offset}, $c_info->{domain}{len});
|
|
||||||
$lmResp = &lmEncrypt($c_info->{data});
|
|
||||||
$ntResp = &ntEncrypt($c_info->{data});
|
|
||||||
$flags = pack($msg3_tl, $c_info->{flags});
|
|
||||||
}
|
|
||||||
$u_host = &unicode(($host ? $host : $user));
|
|
||||||
$response = pack($msg3, $ident, 3);
|
|
||||||
|
|
||||||
$lm_off = $msg3_hlen;
|
|
||||||
$nt_off = $lm_off + length($lmResp);
|
|
||||||
$d_off = $nt_off + length($ntResp);
|
|
||||||
$u_off = $d_off + length($domain);
|
|
||||||
$wks_off = $u_off + length($u_user);
|
|
||||||
$s_off = $wks_off + length($u_host);
|
|
||||||
$lm_hdr = &hdr($lmResp, $msg3_hlen, $lm_off);
|
|
||||||
$nt_hdr = &hdr($ntResp, $msg3_hlen, $nt_off);
|
|
||||||
$domain_hdr = &hdr($domain, $msg3_hlen, $d_off);
|
|
||||||
$user_hdr = &hdr($u_user, $msg3_hlen, $u_off);
|
|
||||||
$wks_hdr = &hdr($u_host, $msg3_hlen, $wks_off);
|
|
||||||
$session_hdr = &hdr("", $msg3_hlen, $s_off);
|
|
||||||
$response .= $lm_hdr . $nt_hdr . $domain_hdr . $user_hdr .
|
|
||||||
$wks_hdr . $session_hdr . $flags .
|
|
||||||
$lmResp . $ntResp . $domain . $u_user . $u_host;
|
|
||||||
}
|
|
||||||
else # first response;
|
|
||||||
{
|
|
||||||
my $f = $msg1_f;
|
|
||||||
if (!length $domain) {
|
|
||||||
$f &= ~NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED;
|
|
||||||
}
|
|
||||||
$msg1_host = $user;
|
|
||||||
if ($ntlm_v2 and $ntlm_v2 eq '1') {
|
|
||||||
$f &= ~NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED;
|
|
||||||
$f |= NTLMSSP_NEGOTIATE_NTLM2;
|
|
||||||
$msg1_host = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = pack($msg1, $ident, 1, $f);
|
|
||||||
$u_off = $msg1_hlen;
|
|
||||||
$d_off = $u_off + length($msg1_host);
|
|
||||||
$host_hdr = &hdr($msg1_host, $msg1_hlen, $u_off);
|
|
||||||
$domain_hdr = &hdr($domain, $msg1_hlen, $d_off);
|
|
||||||
$response .= $host_hdr . $domain_hdr . $msg1_host . $domain;
|
|
||||||
$state = 1;
|
|
||||||
}
|
|
||||||
return encode_base64($response, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
sub hdr
|
|
||||||
{
|
|
||||||
my ($string, $h_len, $offset) = @_;
|
|
||||||
|
|
||||||
my ($res, $len);
|
|
||||||
$len = length($string);
|
|
||||||
if ($string)
|
|
||||||
{
|
|
||||||
$res = pack($str_hdr, $len, $len, $offset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$res = pack($str_hdr, 0, 0, $offset - $h_len);
|
|
||||||
}
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub decode_challenge
|
|
||||||
{
|
|
||||||
my ($challenge) = @_;
|
|
||||||
|
|
||||||
my $res;
|
|
||||||
my (@res, @hdr);
|
|
||||||
my $original = $challenge;
|
|
||||||
|
|
||||||
$res->{buffer} = $msg2_hlen < length $challenge
|
|
||||||
? substr($challenge, $msg2_hlen) : '';
|
|
||||||
$challenge = substr($challenge, 0, $msg2_hlen);
|
|
||||||
@res = unpack($msg2, $challenge);
|
|
||||||
$res->{ident} = $res[0];
|
|
||||||
$res->{type} = $res[1];
|
|
||||||
@hdr = unpack($str_hdr, $res[2]);
|
|
||||||
$res->{domain}{len} = $hdr[0];
|
|
||||||
$res->{domain}{maxlen} = $hdr[1];
|
|
||||||
$res->{domain}{offset} = $hdr[2];
|
|
||||||
$res->{flags} = $res[3];
|
|
||||||
$res->{data} = $res[4];
|
|
||||||
$res->{reserved} = $res[5];
|
|
||||||
$res->{empty_hdr} = $res[6];
|
|
||||||
@hdr = unpack($str_hdr, $res[6]);
|
|
||||||
$res->{target}{len} = $hdr[0];
|
|
||||||
$res->{target}{maxlen} = $hdr[1];
|
|
||||||
$res->{target}{offset} = $hdr[2];
|
|
||||||
$res->{target_data} = substr($original, $hdr[2], $hdr[1]);
|
|
||||||
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub unicode
|
|
||||||
{
|
|
||||||
my ($string) = @_;
|
|
||||||
my ($reply, $c, $z) = ('');
|
|
||||||
|
|
||||||
$z = sprintf "%c", 0;
|
|
||||||
foreach $c (split //, $string)
|
|
||||||
{
|
|
||||||
$reply .= $c . $z;
|
|
||||||
}
|
|
||||||
return $reply;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub NTunicode
|
|
||||||
{
|
|
||||||
my ($string) = @_;
|
|
||||||
my ($reply, $c);
|
|
||||||
|
|
||||||
foreach $c (map {ord($_)} split(//, $string))
|
|
||||||
{
|
|
||||||
$reply .= pack("v", $c);
|
|
||||||
}
|
|
||||||
return $reply;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lmEncrypt
|
|
||||||
{
|
|
||||||
my ($data) = @_;
|
|
||||||
|
|
||||||
my $p14 = substr($password, 0, 14);
|
|
||||||
$p14 =~ tr/a-z/A-Z/;
|
|
||||||
$p14 .= "\0"x(14-length($p14));
|
|
||||||
my $p21 = E_P16($p14);
|
|
||||||
$p21 .= "\0"x(21-length($p21));
|
|
||||||
my $p24 = E_P24($p21, $data);
|
|
||||||
return $p24;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntEncrypt
|
|
||||||
{
|
|
||||||
my ($data) = @_;
|
|
||||||
|
|
||||||
my $p21 = &E_md4hash;
|
|
||||||
$p21 .= "\0"x(21-length($p21));
|
|
||||||
my $p24 = E_P24($p21, $data);
|
|
||||||
return $p24;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub E_md4hash
|
|
||||||
{
|
|
||||||
my $wpwd = &NTunicode($password);
|
|
||||||
my $p16 = mdfour($wpwd);
|
|
||||||
return $p16;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lmv2Encrypt {
|
|
||||||
my ($data) = @_;
|
|
||||||
|
|
||||||
my $u_pass = &unicode($password);
|
|
||||||
my $ntlm_hash = mdfour($u_pass);
|
|
||||||
|
|
||||||
my $u_user = &unicode("\U$user\E");
|
|
||||||
my $u_domain = &unicode("$domain");
|
|
||||||
my $concat = $u_user . $u_domain;
|
|
||||||
|
|
||||||
my $hmac = Digest::HMAC_MD5->new($ntlm_hash);
|
|
||||||
$hmac->add($concat);
|
|
||||||
my $ntlm_v2_hash = $hmac->digest;
|
|
||||||
|
|
||||||
# Firefox seems to use this as its random challenge
|
|
||||||
my $random_challenge = "\0" x 8;
|
|
||||||
|
|
||||||
my $concat2 = $data . $random_challenge;
|
|
||||||
|
|
||||||
$hmac = Digest::HMAC_MD5->new($ntlm_v2_hash);
|
|
||||||
$hmac->add(substr($data, 0, 8) . $random_challenge);
|
|
||||||
my $r = $hmac->digest . $random_challenge;
|
|
||||||
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ntv2Encrypt {
|
|
||||||
my ($data, $target) = @_;
|
|
||||||
|
|
||||||
my $u_pass = &unicode($password);
|
|
||||||
my $ntlm_hash = mdfour($u_pass);
|
|
||||||
|
|
||||||
my $u_user = &unicode("\U$user\E");
|
|
||||||
my $u_domain = &unicode("$domain");
|
|
||||||
my $concat = $u_user . $u_domain;
|
|
||||||
|
|
||||||
my $hmac = Digest::HMAC_MD5->new($ntlm_hash);
|
|
||||||
$hmac->add($concat);
|
|
||||||
my $ntlm_v2_hash = $hmac->digest;
|
|
||||||
|
|
||||||
my $zero_long = "\000" x 4;
|
|
||||||
my $sig = pack("H8", "01010000");
|
|
||||||
my $time = pack("VV", (time + 11644473600) + 10000000);
|
|
||||||
my $rand = "\0" x 8;
|
|
||||||
my $blob = $sig . $zero_long . $time . $rand . $zero_long .
|
|
||||||
$target . $zero_long;
|
|
||||||
|
|
||||||
$concat = $data . $blob;
|
|
||||||
|
|
||||||
$hmac = Digest::HMAC_MD5->new($ntlm_v2_hash);
|
|
||||||
$hmac->add($concat);
|
|
||||||
|
|
||||||
my $d = $hmac->digest;
|
|
||||||
|
|
||||||
my $r = $d . $blob;
|
|
||||||
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
|
@ -1,294 +0,0 @@
|
||||||
#!/usr/local/bin/perl
|
|
||||||
#
|
|
||||||
# This is an implementation of part of the DES specification. According
|
|
||||||
# to the code this is ported from, this code does NOT enable 2-way
|
|
||||||
# encryption and is, hence, not a cypher and does not appear to come
|
|
||||||
# under any export restrictions on such.
|
|
||||||
#
|
|
||||||
package Authen::NTLM::DES;
|
|
||||||
|
|
||||||
use vars qw($VERSION @ISA @EXPORT);
|
|
||||||
require Exporter;
|
|
||||||
|
|
||||||
$VERSION = "1.02";
|
|
||||||
@ISA = qw(Exporter);
|
|
||||||
@EXPORT = qw(E_P16 E_P24);
|
|
||||||
|
|
||||||
my ($loop, $loop2);
|
|
||||||
$loop = 0;
|
|
||||||
$loop2 = 0;
|
|
||||||
|
|
||||||
my $perm1 = [57, 49, 41, 33, 25, 17, 9,
|
|
||||||
1, 58, 50, 42, 34, 26, 18,
|
|
||||||
10, 2, 59, 51, 43, 35, 27,
|
|
||||||
19, 11, 3, 60, 52, 44, 36,
|
|
||||||
63, 55, 47, 39, 31, 23, 15,
|
|
||||||
7, 62, 54, 46, 38, 30, 22,
|
|
||||||
14, 6, 61, 53, 45, 37, 29,
|
|
||||||
21, 13, 5, 28, 20, 12, 4];
|
|
||||||
my $perm2 = [14, 17, 11, 24, 1, 5,
|
|
||||||
3, 28, 15, 6, 21, 10,
|
|
||||||
23, 19, 12, 4, 26, 8,
|
|
||||||
16, 7, 27, 20, 13, 2,
|
|
||||||
41, 52, 31, 37, 47, 55,
|
|
||||||
30, 40, 51, 45, 33, 48,
|
|
||||||
44, 49, 39, 56, 34, 53,
|
|
||||||
46, 42, 50, 36, 29, 32];
|
|
||||||
my $perm3 = [58, 50, 42, 34, 26, 18, 10, 2,
|
|
||||||
60, 52, 44, 36, 28, 20, 12, 4,
|
|
||||||
62, 54, 46, 38, 30, 22, 14, 6,
|
|
||||||
64, 56, 48, 40, 32, 24, 16, 8,
|
|
||||||
57, 49, 41, 33, 25, 17, 9, 1,
|
|
||||||
59, 51, 43, 35, 27, 19, 11, 3,
|
|
||||||
61, 53, 45, 37, 29, 21, 13, 5,
|
|
||||||
63, 55, 47, 39, 31, 23, 15, 7];
|
|
||||||
my $perm4 = [32, 1, 2, 3, 4, 5,
|
|
||||||
4, 5, 6, 7, 8, 9,
|
|
||||||
8, 9, 10, 11, 12, 13,
|
|
||||||
12, 13, 14, 15, 16, 17,
|
|
||||||
16, 17, 18, 19, 20, 21,
|
|
||||||
20, 21, 22, 23, 24, 25,
|
|
||||||
24, 25, 26, 27, 28, 29,
|
|
||||||
28, 29, 30, 31, 32, 1];
|
|
||||||
my $perm5 = [16, 7, 20, 21, 29, 12, 28, 17,
|
|
||||||
1, 15, 23, 26, 5, 18, 31, 10,
|
|
||||||
2, 8, 24, 14, 32, 27, 3, 9,
|
|
||||||
19, 13, 30, 6, 22, 11, 4, 25];
|
|
||||||
my $perm6 = [40, 8, 48, 16, 56, 24, 64, 32,
|
|
||||||
39, 7, 47, 15, 55, 23, 63, 31,
|
|
||||||
38, 6, 46, 14, 54, 22, 62, 30,
|
|
||||||
37, 5, 45, 13, 53, 21, 61, 29,
|
|
||||||
36, 4, 44, 12, 52, 20, 60, 28,
|
|
||||||
35, 3, 43, 11, 51, 19, 59, 27,
|
|
||||||
34, 2, 42, 10, 50, 18, 58, 26,
|
|
||||||
33, 1, 41, 9, 49, 17, 57, 25];
|
|
||||||
my $sc = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1];
|
|
||||||
my $sbox = [
|
|
||||||
[
|
|
||||||
[14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7],
|
|
||||||
[0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8],
|
|
||||||
[4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0],
|
|
||||||
[15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10],
|
|
||||||
[3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5],
|
|
||||||
[0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15],
|
|
||||||
[13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8],
|
|
||||||
[13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1],
|
|
||||||
[13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7],
|
|
||||||
[1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15],
|
|
||||||
[13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9],
|
|
||||||
[10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4],
|
|
||||||
[3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[2,12,4,1,7,10,11,6,8,5,3,15,13,0,14,9],
|
|
||||||
[14,11,2,12,4,7,13,1,5,0,15,10,3,9,8,6],
|
|
||||||
[4,2,1,11,10,13,7,8,15,9,12,5,6,3,0,14],
|
|
||||||
[11,8,12,7,1,14,2,13,6,15,0,9,10,4,5,3]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[12,1,10,15,9,2,6,8,0,13,3,4,14,7,5,11],
|
|
||||||
[10,15,4,2,7,12,9,5,6,1,13,14,0,11,3,8],
|
|
||||||
[9,14,15,5,2,8,12,3,7,0,4,10,1,13,11,6],
|
|
||||||
[4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1],
|
|
||||||
[13,0,11,7,4,9,1,10,14,3,5,12,2,15,8,6],
|
|
||||||
[1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2],
|
|
||||||
[6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7],
|
|
||||||
[1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2],
|
|
||||||
[7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8],
|
|
||||||
[2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
sub E_P16
|
|
||||||
{
|
|
||||||
my ($p14) = @_;
|
|
||||||
my $sp8 = [0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25];
|
|
||||||
|
|
||||||
my $p7 = substr($p14, 0, 7);
|
|
||||||
my $p16 = smbhash($sp8, $p7);
|
|
||||||
$p7 = substr($p14, 7, 7);
|
|
||||||
$p16 .= smbhash($sp8, $p7);
|
|
||||||
return $p16;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub E_P24
|
|
||||||
{
|
|
||||||
my ($p21, $c8_str) = @_;
|
|
||||||
my @c8 = map {ord($_)} split(//, $c8_str);
|
|
||||||
my $p24 = smbhash(\@c8, substr($p21, 0, 7));
|
|
||||||
$p24 .= smbhash(\@c8, substr($p21, 7, 7));
|
|
||||||
$p24 .= smbhash(\@c8, substr($p21, 14, 7));
|
|
||||||
}
|
|
||||||
|
|
||||||
sub permute
|
|
||||||
{
|
|
||||||
my ($out, $in, $p, $n) = @_;
|
|
||||||
my $i;
|
|
||||||
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$out->[$i] = $in->[$p->[$i]-1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lshift
|
|
||||||
{
|
|
||||||
my ($d, $count, $n) = @_;
|
|
||||||
my (@out, $i);
|
|
||||||
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$out[$i] = $d->[($i+$count)%$n];
|
|
||||||
}
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$d->[$i] = $out[$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub xor
|
|
||||||
{
|
|
||||||
my ($out, $in1, $in2, $n) = @_;
|
|
||||||
my $i;
|
|
||||||
|
|
||||||
foreach $i (0..($n-1))
|
|
||||||
{
|
|
||||||
$out->[$i] = $in1->[$i]^$in2->[$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub dohash
|
|
||||||
{
|
|
||||||
my ($out, $in, $key) = @_;
|
|
||||||
my ($i, $j, $k, @pk1, @c, @d, @cd,
|
|
||||||
@ki, @pd1, @l, @r, @rl);
|
|
||||||
|
|
||||||
&permute(\@pk1, $key, $perm1, 56);
|
|
||||||
|
|
||||||
foreach $i (0..27)
|
|
||||||
{
|
|
||||||
$c[$i] = $pk1[$i];
|
|
||||||
$d[$i] = $pk1[$i+28];
|
|
||||||
}
|
|
||||||
foreach $i (0..15)
|
|
||||||
{
|
|
||||||
my @array;
|
|
||||||
&lshift(\@c, $sc->[$i], 28);
|
|
||||||
&lshift(\@d, $sc->[$i], 28);
|
|
||||||
@cd = (@c, @d);
|
|
||||||
&permute(\@array, \@cd, $perm2, 48);
|
|
||||||
$ki[$i] = \@array;
|
|
||||||
}
|
|
||||||
&permute(\@pd1, $in, $perm3, 64);
|
|
||||||
|
|
||||||
foreach $j (0..31)
|
|
||||||
{
|
|
||||||
$l[$j] = $pd1[$j];
|
|
||||||
$r[$j] = $pd1[$j+32];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach $i (0..15)
|
|
||||||
{
|
|
||||||
local (@er, @erk, @b, @cb, @pcb, @r2);
|
|
||||||
permute(\@er, \@r, $perm4, 48);
|
|
||||||
&xor(\@erk, \@er, $ki[$i], 48);
|
|
||||||
foreach $j (0..7)
|
|
||||||
{
|
|
||||||
foreach $k (0..5)
|
|
||||||
{
|
|
||||||
$b[$j][$k] = $erk[$j*6+$k];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach $j (0..7)
|
|
||||||
{
|
|
||||||
local ($m, $n);
|
|
||||||
$m = ($b[$j][0]<<1) | $b[$j][5];
|
|
||||||
$n = ($b[$j][1]<<3) | ($b[$j][2]<<2) | ($b[$j][3]<<1) | $b[$j][4];
|
|
||||||
foreach $k (0..3)
|
|
||||||
{
|
|
||||||
$b[$j][$k] = ($sbox->[$j][$m][$n] & (1<<(3-$k)))? 1: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach $j (0..7)
|
|
||||||
{
|
|
||||||
foreach $k (0..3)
|
|
||||||
{
|
|
||||||
$cb[$j*4+$k] = $b[$j][$k];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&permute(\@pcb, \@cb, $perm5, 32);
|
|
||||||
&xor(\@r2, \@l, \@pcb, 32);
|
|
||||||
foreach $j (0..31)
|
|
||||||
{
|
|
||||||
$l[$j] = $r[$j];
|
|
||||||
$r[$j] = $r2[$j];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@rl = (@r, @l);
|
|
||||||
&permute($out, \@rl, $perm6, 64);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub str_to_key
|
|
||||||
{
|
|
||||||
my ($str) = @_;
|
|
||||||
my $i;
|
|
||||||
my @key;
|
|
||||||
my $out;
|
|
||||||
my @str = map {ord($_)} split(//, $str);
|
|
||||||
$key[0] = $str[0]>>1;
|
|
||||||
$key[1] = (($str[0]&0x01)<<6) | ($str[1]>>2);
|
|
||||||
$key[2] = (($str[1]&0x03)<<5) | ($str[2]>>3);
|
|
||||||
$key[3] = (($str[2]&0x07)<<4) | ($str[3]>>4);
|
|
||||||
$key[4] = (($str[3]&0x0f)<<3) | ($str[4]>>5);
|
|
||||||
$key[5] = (($str[4]&0x1f)<<2) | ($str[5]>>6);
|
|
||||||
$key[6] = (($str[5]&0x3f)<<1) | ($str[6]>>7);
|
|
||||||
$key[7] = $str[6]&0x7f;
|
|
||||||
foreach $i (0..7)
|
|
||||||
{
|
|
||||||
$key[$i] = 0xff&($key[$i]<<1);
|
|
||||||
}
|
|
||||||
return \@key;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub smbhash
|
|
||||||
{
|
|
||||||
my ($in, $key) = @_;
|
|
||||||
|
|
||||||
my $key2 = &str_to_key($key);
|
|
||||||
my ($i, $div, $mod, @in, @outb, @inb, @keyb, @out);
|
|
||||||
foreach $i (0..63)
|
|
||||||
{
|
|
||||||
$div = int($i/8); $mod = $i%8;
|
|
||||||
$inb[$i] = ($in->[$div] & (1<<(7-($mod))))? 1: 0;
|
|
||||||
$keyb[$i] = ($key2->[$div] & (1<<(7-($mod))))? 1: 0;
|
|
||||||
$outb[$i] = 0;
|
|
||||||
}
|
|
||||||
&dohash(\@outb, \@inb, \@keyb);
|
|
||||||
foreach $i (0..7)
|
|
||||||
{
|
|
||||||
$out[$i] = 0;
|
|
||||||
}
|
|
||||||
foreach $i (0..63)
|
|
||||||
{
|
|
||||||
$out[int($i/8)] |= (1<<(7-($i%8))) if ($outb[$i]);
|
|
||||||
}
|
|
||||||
my $out = pack("C8", @out);
|
|
||||||
return $out;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
|
@ -1,197 +0,0 @@
|
||||||
#!/usr/local/bin/perl
|
|
||||||
#
|
|
||||||
# This is a partial implentation of the MD4 checksum code.
|
|
||||||
#
|
|
||||||
# NOTE
|
|
||||||
#
|
|
||||||
# The function &add() in this module is required as we need to be
|
|
||||||
# able to add 32bit integers ignoring overflow. The C code this is
|
|
||||||
# based on does this because it uses the underlying hardware to
|
|
||||||
# perform the required addition however we need to be more careful
|
|
||||||
# as Perl will overflow an int and produce a result of 0xffffffff
|
|
||||||
# which is not very useful. The &add() function splits its arguments
|
|
||||||
# into two shorts and adds these carrying overflow from the low short
|
|
||||||
# to the high short and ignoring carry from the high short. Not
|
|
||||||
# exactly efficient, but it works and is fast enough for the purposes
|
|
||||||
# of this implementation
|
|
||||||
#
|
|
||||||
|
|
||||||
package Authen::NTLM::MD4;
|
|
||||||
|
|
||||||
use vars qw($VERSION @ISA @EXPORT);
|
|
||||||
require Exporter;
|
|
||||||
|
|
||||||
$VERSION = "1.02";
|
|
||||||
@ISA = qw(Exporter);
|
|
||||||
@EXPORT = qw(mdfour);
|
|
||||||
|
|
||||||
my ($A, $B, $C, $D);
|
|
||||||
my (@X, $M);
|
|
||||||
|
|
||||||
sub mdfour
|
|
||||||
{
|
|
||||||
my ($in) = @_;
|
|
||||||
|
|
||||||
my ($i, $pos);
|
|
||||||
my $len = length($in);
|
|
||||||
my $b = $len * 8;
|
|
||||||
$in .= "\0"x128;
|
|
||||||
$A = 0x67452301;
|
|
||||||
$B = 0xefcdab89;
|
|
||||||
$C = 0x98badcfe;
|
|
||||||
$D = 0x10325476;
|
|
||||||
$pos = 0;
|
|
||||||
while ($len > 64)
|
|
||||||
{
|
|
||||||
©64(substr($in, $pos, 64));
|
|
||||||
&mdfour64;
|
|
||||||
$pos += 64;
|
|
||||||
$len -= 64;
|
|
||||||
}
|
|
||||||
my $buf = substr($in, $pos, $len);
|
|
||||||
$buf .= sprintf "%c", 0x80;
|
|
||||||
if ($len <= 55)
|
|
||||||
{
|
|
||||||
$buf .= "\0"x(55-$len);
|
|
||||||
$buf .= pack("V", $b);
|
|
||||||
$buf .= "\0"x4;
|
|
||||||
©64($buf);
|
|
||||||
&mdfour64;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$buf .= "\0"x(120-$len);
|
|
||||||
$buf .= pack("V", $b);
|
|
||||||
$buf .= "\0"x4;
|
|
||||||
©64(substr($buf, 0, 64));
|
|
||||||
&mdfour64;
|
|
||||||
©64(substr($buf, 64, 64));
|
|
||||||
&mdfour64;
|
|
||||||
}
|
|
||||||
my $out = pack("VVVV", $A, $B, $C, $D);
|
|
||||||
return $out;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub F
|
|
||||||
{
|
|
||||||
my ($X, $Y, $Z) = @_;
|
|
||||||
my $res = ($X&$Y) | ((~$X)&$Z);
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub G
|
|
||||||
{
|
|
||||||
my ($X, $Y, $Z) = @_;
|
|
||||||
|
|
||||||
return ($X&$Y) | ($X&$Z) | ($Y&$Z);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub H
|
|
||||||
{
|
|
||||||
my ($X, $Y, $Z) = @_;
|
|
||||||
|
|
||||||
return $X^$Y^$Z;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lshift
|
|
||||||
{
|
|
||||||
my ($x, $s) = @_;
|
|
||||||
|
|
||||||
$x &= 0xffffffff;
|
|
||||||
return (($x<<$s)&0xffffffff) | ($x>>(32-$s));
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ROUND1
|
|
||||||
{
|
|
||||||
my ($a, $b, $c, $d, $k, $s) = @_;
|
|
||||||
my $e = &add($a, &F($b, $c, $d), $X[$k]);
|
|
||||||
return &lshift($e, $s);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ROUND2
|
|
||||||
{
|
|
||||||
my ($a, $b, $c, $d, $k, $s) = @_;
|
|
||||||
|
|
||||||
my $e = &add($a, &G($b, $c, $d), $X[$k], 0x5a827999);
|
|
||||||
return &lshift($e, $s);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ROUND3
|
|
||||||
{
|
|
||||||
my ($a, $b, $c, $d, $k, $s) = @_;
|
|
||||||
|
|
||||||
my $e = &add($a, &H($b, $c, $d), $X[$k], 0x6ed9eba1);
|
|
||||||
return &lshift($e, $s);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub mdfour64
|
|
||||||
{
|
|
||||||
my ($i, $AA, $BB, $CC, $DD);
|
|
||||||
@X = unpack("N16", $M);
|
|
||||||
$AA = $A;
|
|
||||||
$BB = $B;
|
|
||||||
$CC = $C;
|
|
||||||
$DD = $D;
|
|
||||||
|
|
||||||
$A = &ROUND1($A,$B,$C,$D, 0, 3); $D = &ROUND1($D,$A,$B,$C, 1, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B, 2,11); $B = &ROUND1($B,$C,$D,$A, 3,19);
|
|
||||||
$A = &ROUND1($A,$B,$C,$D, 4, 3); $D = &ROUND1($D,$A,$B,$C, 5, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B, 6,11); $B = &ROUND1($B,$C,$D,$A, 7,19);
|
|
||||||
$A = &ROUND1($A,$B,$C,$D, 8, 3); $D = &ROUND1($D,$A,$B,$C, 9, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B,10,11); $B = &ROUND1($B,$C,$D,$A,11,19);
|
|
||||||
$A = &ROUND1($A,$B,$C,$D,12, 3); $D = &ROUND1($D,$A,$B,$C,13, 7);
|
|
||||||
$C = &ROUND1($C,$D,$A,$B,14,11); $B = &ROUND1($B,$C,$D,$A,15,19);
|
|
||||||
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 0, 3); $D = &ROUND2($D,$A,$B,$C, 4, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B, 8, 9); $B = &ROUND2($B,$C,$D,$A,12,13);
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 1, 3); $D = &ROUND2($D,$A,$B,$C, 5, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B, 9, 9); $B = &ROUND2($B,$C,$D,$A,13,13);
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 2, 3); $D = &ROUND2($D,$A,$B,$C, 6, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B,10, 9); $B = &ROUND2($B,$C,$D,$A,14,13);
|
|
||||||
$A = &ROUND2($A,$B,$C,$D, 3, 3); $D = &ROUND2($D,$A,$B,$C, 7, 5);
|
|
||||||
$C = &ROUND2($C,$D,$A,$B,11, 9); $B = &ROUND2($B,$C,$D,$A,15,13);
|
|
||||||
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 0, 3); $D = &ROUND3($D,$A,$B,$C, 8, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 4,11); $B = &ROUND3($B,$C,$D,$A,12,15);
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 2, 3); $D = &ROUND3($D,$A,$B,$C,10, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 6,11); $B = &ROUND3($B,$C,$D,$A,14,15);
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 1, 3); $D = &ROUND3($D,$A,$B,$C, 9, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 5,11); $B = &ROUND3($B,$C,$D,$A,13,15);
|
|
||||||
$A = &ROUND3($A,$B,$C,$D, 3, 3); $D = &ROUND3($D,$A,$B,$C,11, 9);
|
|
||||||
$C = &ROUND3($C,$D,$A,$B, 7,11); $B = &ROUND3($B,$C,$D,$A,15,15);
|
|
||||||
|
|
||||||
$A = &add($A, $AA); $B = &add($B, $BB);
|
|
||||||
$C = &add($C, $CC); $D = &add($D, $DD);
|
|
||||||
$A &= 0xffffffff; $B &= 0xffffffff;
|
|
||||||
$C &= 0xffffffff; $D &= 0xffffffff;
|
|
||||||
map {$_ = 0} @X;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub copy64
|
|
||||||
{
|
|
||||||
my ($in) = @_;
|
|
||||||
|
|
||||||
$M = pack("V16", unpack("N16", $in));
|
|
||||||
}
|
|
||||||
|
|
||||||
# see note at top of this file about this function
|
|
||||||
sub add
|
|
||||||
{
|
|
||||||
my (@nums) = @_;
|
|
||||||
my ($r_low, $r_high, $n_low, $l_high);
|
|
||||||
my $num;
|
|
||||||
$r_low = $r_high = 0;
|
|
||||||
foreach $num (@nums)
|
|
||||||
{
|
|
||||||
$n_low = $num & 0xffff;
|
|
||||||
$n_high = ($num&0xffff0000)>>16;
|
|
||||||
$r_low += $n_low;
|
|
||||||
($r_low&0xf0000) && $r_high++;
|
|
||||||
$r_low &= 0xffff;
|
|
||||||
$r_high += $n_high;
|
|
||||||
$r_high &= 0xffff;
|
|
||||||
}
|
|
||||||
return ($r_high<<16)|$r_low;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
|
@ -1,278 +0,0 @@
|
||||||
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
|
|
||||||
.\"
|
|
||||||
.\" Standard preamble:
|
|
||||||
.\" ========================================================================
|
|
||||||
.de Sp \" Vertical space (when we can't use .PP)
|
|
||||||
.if t .sp .5v
|
|
||||||
.if n .sp
|
|
||||||
..
|
|
||||||
.de Vb \" Begin verbatim text
|
|
||||||
.ft CW
|
|
||||||
.nf
|
|
||||||
.ne \\$1
|
|
||||||
..
|
|
||||||
.de Ve \" End verbatim text
|
|
||||||
.ft R
|
|
||||||
.fi
|
|
||||||
..
|
|
||||||
.\" Set up some character translations and predefined strings. \*(-- will
|
|
||||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
|
||||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
|
||||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
|
||||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
|
||||||
.\" nothing in troff, for use with C<>.
|
|
||||||
.tr \(*W-
|
|
||||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
|
||||||
.ie n \{\
|
|
||||||
. ds -- \(*W-
|
|
||||||
. ds PI pi
|
|
||||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
|
||||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
|
||||||
. ds L" ""
|
|
||||||
. ds R" ""
|
|
||||||
. ds C` ""
|
|
||||||
. ds C' ""
|
|
||||||
'br\}
|
|
||||||
.el\{\
|
|
||||||
. ds -- \|\(em\|
|
|
||||||
. ds PI \(*p
|
|
||||||
. ds L" ``
|
|
||||||
. ds R" ''
|
|
||||||
'br\}
|
|
||||||
.\"
|
|
||||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
|
||||||
.ie \n(.g .ds Aq \(aq
|
|
||||||
.el .ds Aq '
|
|
||||||
.\"
|
|
||||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
|
||||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
|
||||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
|
||||||
.\" output yourself in some meaningful fashion.
|
|
||||||
.ie \nF \{\
|
|
||||||
. de IX
|
|
||||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
||||||
..
|
|
||||||
. nr % 0
|
|
||||||
. rr F
|
|
||||||
.\}
|
|
||||||
.el \{\
|
|
||||||
. de IX
|
|
||||||
..
|
|
||||||
.\}
|
|
||||||
.\"
|
|
||||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
|
||||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
|
||||||
. \" fudge factors for nroff and troff
|
|
||||||
.if n \{\
|
|
||||||
. ds #H 0
|
|
||||||
. ds #V .8m
|
|
||||||
. ds #F .3m
|
|
||||||
. ds #[ \f1
|
|
||||||
. ds #] \fP
|
|
||||||
.\}
|
|
||||||
.if t \{\
|
|
||||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
||||||
. ds #V .6m
|
|
||||||
. ds #F 0
|
|
||||||
. ds #[ \&
|
|
||||||
. ds #] \&
|
|
||||||
.\}
|
|
||||||
. \" simple accents for nroff and troff
|
|
||||||
.if n \{\
|
|
||||||
. ds ' \&
|
|
||||||
. ds ` \&
|
|
||||||
. ds ^ \&
|
|
||||||
. ds , \&
|
|
||||||
. ds ~ ~
|
|
||||||
. ds /
|
|
||||||
.\}
|
|
||||||
.if t \{\
|
|
||||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
|
||||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
|
||||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
|
||||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
|
||||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
|
||||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
|
||||||
.\}
|
|
||||||
. \" troff and (daisy-wheel) nroff accents
|
|
||||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
||||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
||||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
||||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
||||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
||||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
||||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
||||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
||||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
|
||||||
. \" corrections for vroff
|
|
||||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
||||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
|
||||||
. \" for low resolution devices (crt and lpr)
|
|
||||||
.if \n(.H>23 .if \n(.V>19 \
|
|
||||||
\{\
|
|
||||||
. ds : e
|
|
||||||
. ds 8 ss
|
|
||||||
. ds o a
|
|
||||||
. ds d- d\h'-1'\(ga
|
|
||||||
. ds D- D\h'-1'\(hy
|
|
||||||
. ds th \o'bp'
|
|
||||||
. ds Th \o'LP'
|
|
||||||
. ds ae ae
|
|
||||||
. ds Ae AE
|
|
||||||
.\}
|
|
||||||
.rm #[ #] #H #V #F C
|
|
||||||
.\" ========================================================================
|
|
||||||
.\"
|
|
||||||
.IX Title "NTLM 3pm"
|
|
||||||
.TH NTLM 3pm "2011-09-09" "perl v5.10.1" "User Contributed Perl Documentation"
|
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
|
||||||
.\" way too many mistakes in technical documents.
|
|
||||||
.if n .ad l
|
|
||||||
.nh
|
|
||||||
.SH "NAME"
|
|
||||||
Authen::NTLM \- An NTLM authentication module
|
|
||||||
.SH "SYNOPSIS"
|
|
||||||
.IX Header "SYNOPSIS"
|
|
||||||
.Vb 10
|
|
||||||
\& use Mail::IMAPClient;
|
|
||||||
\& use Authen::NTLM;
|
|
||||||
\& my $imap = Mail::IMAPClient\->new(Server=>\*(Aqimaphost\*(Aq);
|
|
||||||
\& ntlm_user($username);
|
|
||||||
\& ntlm_password($password);
|
|
||||||
\& $imap\->authenticate("NTLM", Authen::NTLM::ntlm);
|
|
||||||
\& :
|
|
||||||
\& $imap\->logout;
|
|
||||||
\& ntlm_reset;
|
|
||||||
\& :
|
|
||||||
.Ve
|
|
||||||
.PP
|
|
||||||
or
|
|
||||||
.PP
|
|
||||||
.Vb 5
|
|
||||||
\& ntlmv2(1);
|
|
||||||
\& ntlm_user($username);
|
|
||||||
\& ntlm_host($host);
|
|
||||||
\& ntlm_password($password);
|
|
||||||
\& :
|
|
||||||
.Ve
|
|
||||||
.PP
|
|
||||||
or
|
|
||||||
.PP
|
|
||||||
.Vb 10
|
|
||||||
\& my $ntlm = Authen::NTLM\-> new(
|
|
||||||
\& host => $host,
|
|
||||||
\& user => $username,
|
|
||||||
\& domain => $domain,
|
|
||||||
\& password => $password,
|
|
||||||
\& version => 1,
|
|
||||||
\& );
|
|
||||||
\& $ntlm\-> challenge;
|
|
||||||
\& :
|
|
||||||
\& $ntlm\-> challenge($challenge);
|
|
||||||
.Ve
|
|
||||||
.SH "DESCRIPTION"
|
|
||||||
.IX Header "DESCRIPTION"
|
|
||||||
.Vb 5
|
|
||||||
\& This module provides methods to use NTLM authentication. It can
|
|
||||||
\& be used as an authenticate method with the Mail::IMAPClient module
|
|
||||||
\& to perform the challenge/response mechanism for NTLM connections
|
|
||||||
\& or it can be used on its own for NTLM authentication with other
|
|
||||||
\& protocols (eg. HTTP).
|
|
||||||
\&
|
|
||||||
\& The implementation is a direct port of the code from F<fetchmail>
|
|
||||||
\& which, itself, has based its NTLM implementation on F<samba>. As
|
|
||||||
\& such, this code is not especially efficient, however it will still
|
|
||||||
\& take a fraction of a second to negotiate a login on a PII which is
|
|
||||||
\& likely to be good enough for most situations.
|
|
||||||
.Ve
|
|
||||||
.SS "\s-1FUNCTIONS\s0"
|
|
||||||
.IX Subsection "FUNCTIONS"
|
|
||||||
.IP "\fIntlm_domain()\fR" 4
|
|
||||||
.IX Item "ntlm_domain()"
|
|
||||||
.Vb 3
|
|
||||||
\& Set the domain to use in the NTLM authentication messages.
|
|
||||||
\& Returns the new domain. Without an argument, this function
|
|
||||||
\& returns the current domain entry.
|
|
||||||
.Ve
|
|
||||||
.IP "\fIntlm_user()\fR" 4
|
|
||||||
.IX Item "ntlm_user()"
|
|
||||||
.Vb 3
|
|
||||||
\& Set the username to use in the NTLM authentication messages.
|
|
||||||
\& Returns the new username. Without an argument, this function
|
|
||||||
\& returns the current username entry.
|
|
||||||
.Ve
|
|
||||||
.IP "\fIntlm_password()\fR" 4
|
|
||||||
.IX Item "ntlm_password()"
|
|
||||||
.Vb 3
|
|
||||||
\& Set the password to use in the NTLM authentication messages.
|
|
||||||
\& Returns the new password. Without an argument, this function
|
|
||||||
\& returns the current password entry.
|
|
||||||
.Ve
|
|
||||||
.IP "\fIntlm_reset()\fR" 4
|
|
||||||
.IX Item "ntlm_reset()"
|
|
||||||
.Vb 2
|
|
||||||
\& Resets the NTLM challenge/response state machine so that the next
|
|
||||||
\& call to C<ntlm()> will produce an initial connect message.
|
|
||||||
.Ve
|
|
||||||
.IP "\fIntlm()\fR" 4
|
|
||||||
.IX Item "ntlm()"
|
|
||||||
.Vb 5
|
|
||||||
\& Generate a reply to a challenge. The NTLM protocol involves an
|
|
||||||
\& initial empty challenge from the server requiring a message
|
|
||||||
\& response containing the username and domain (which may be empty).
|
|
||||||
\& The first call to C<ntlm()> generates this first message ignoring
|
|
||||||
\& any arguments.
|
|
||||||
\&
|
|
||||||
\& The second time it is called, it is assumed that the argument is
|
|
||||||
\& the challenge string sent from the server. This will contain 8
|
|
||||||
\& bytes of data which are used in the DES functions to generate the
|
|
||||||
\& response authentication strings. The result of the call is the
|
|
||||||
\& final authentication string.
|
|
||||||
\&
|
|
||||||
\& If C<ntlm_reset()> is called, then the next call to C<ntlm()> will
|
|
||||||
\& start the process again allowing multiple authentications within
|
|
||||||
\& an application.
|
|
||||||
.Ve
|
|
||||||
.IP "\fIntlmv2()\fR" 4
|
|
||||||
.IX Item "ntlmv2()"
|
|
||||||
.Vb 1
|
|
||||||
\& Use NTLM v2 authentication.
|
|
||||||
.Ve
|
|
||||||
.SS "\s-1OBJECT\s0 \s-1API\s0"
|
|
||||||
.IX Subsection "OBJECT API"
|
|
||||||
.ie n .IP "new %options" 4
|
|
||||||
.el .IP "new \f(CW%options\fR" 4
|
|
||||||
.IX Item "new %options"
|
|
||||||
Creates an object that accepts the following options: \f(CW\*(C`user\*(C'\fR, \f(CW\*(C`host\*(C'\fR,
|
|
||||||
\&\f(CW\*(C`domain\*(C'\fR, \f(CW\*(C`password\*(C'\fR, \f(CW\*(C`version\*(C'\fR.
|
|
||||||
.IP "challenge [$challenge]" 4
|
|
||||||
.IX Item "challenge [$challenge]"
|
|
||||||
If \f(CW$challenge\fR is not supplied, first-stage challenge string is generated.
|
|
||||||
Otherwise, the third-stage challenge is generated, where \f(CW$challenge\fR is
|
|
||||||
assumed to be extracted from the second stage of \s-1NTLM\s0 exchange. The result of
|
|
||||||
the call is the final authentication string.
|
|
||||||
.SH "AUTHOR"
|
|
||||||
.IX Header "AUTHOR"
|
|
||||||
.Vb 6
|
|
||||||
\& David (Buzz) Bussenschutt <davidbuzz@gmail.com> \- current maintainer
|
|
||||||
\& Dmitry Karasik <dmitry@karasik.eu.org> \- nice ntlmv2 patch, OO extensions.
|
|
||||||
\& Andrew Hobson <ahobson@infloop.com> \- initial ntlmv2 code
|
|
||||||
\& Mark Bush <Mark.Bush@bushnet.demon.co.uk> \- perl port
|
|
||||||
\& Eric S. Raymond \- author of fetchmail
|
|
||||||
\& Andrew Tridgell and Jeremy Allison for SMB/Netbios code
|
|
||||||
.Ve
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.IX Header "SEE ALSO"
|
|
||||||
perl, Mail::IMAPClient, LWP::Authen::Ntlm
|
|
||||||
.SH "HISTORY"
|
|
||||||
.IX Header "HISTORY"
|
|
||||||
.Vb 8
|
|
||||||
\& 1.09 \- fix CPAN ticket # 70703
|
|
||||||
\& 1.08 \- fix CPAN ticket # 39925
|
|
||||||
\& 1.07 \- not publicly released
|
|
||||||
\& 1.06 \- relicense as GPL+ or Artistic
|
|
||||||
\& 1.05 \- add OO interface by Dmitry Karasik
|
|
||||||
\& 1.04 \- implementation of NTLMv2 by Andrew Hobson/Dmitry Karasik
|
|
||||||
\& 1.03 \- fixes long\-standing 1 line bug L<http://rt.cpan.org/Public/Bug/Display.html?id=9521> \- released by David Bussenschutt 9th Aug 2007
|
|
||||||
\& 1.02 \- released by Mark Bush 29th Oct 2001
|
|
||||||
.Ve
|
|
|
@ -1,9 +0,0 @@
|
||||||
#! /usr/bin/perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
use Test::More tests => 1;
|
|
||||||
|
|
||||||
use_ok('Authen::NTLM');
|
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
#! /usr/bin/perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More tests => 12;
|
|
||||||
|
|
||||||
use Authen::NTLM;
|
|
||||||
use MIME::Base64;
|
|
||||||
|
|
||||||
my $user = "test";
|
|
||||||
my $domain = "test";
|
|
||||||
my $passwd = "test";
|
|
||||||
my $msg1 = "TlRMTVNTUAABAAAAB7IAAAQABAAgAAAABAAEACQAAAB0ZXN0dGVzdA==";
|
|
||||||
my $challenge = "TlRMTVNTUAACAAAABAAEADAAAAAFggEAQUJDREVGR0gAAAAAAAAAAAAAAAAAAAAAdGVzdA==";
|
|
||||||
my $msg2 = "TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAQABABwAAAACAAIAHQAAAAIAAgAfAAAAAAAAABEAAAABYIBAJ7/TlMo4HLg0gOk6iKq4bv2vk35ozHEKKoqG8nTkQ5S82zyqpJzxPDJHUMynnKsBHRlc3R0AGUAcwB0AHQAZQBzAHQA";
|
|
||||||
|
|
||||||
# 2: username
|
|
||||||
|
|
||||||
ok(ntlm_user($user) eq $user, 'ntlm_user');
|
|
||||||
|
|
||||||
# 3: domain
|
|
||||||
|
|
||||||
ok(ntlm_domain($domain) eq $domain, 'ntlm_domain');
|
|
||||||
|
|
||||||
# 4: password
|
|
||||||
|
|
||||||
ok(ntlm_password($passwd) eq $passwd, 'ntlm_password');
|
|
||||||
|
|
||||||
# 5: initial message
|
|
||||||
|
|
||||||
my $reply1 = ntlm();
|
|
||||||
ok($reply1 eq $msg1, 'reply 1');
|
|
||||||
|
|
||||||
# 6-12: decode challenge - not normally user accessed
|
|
||||||
|
|
||||||
my $c = &Authen::NTLM::decode_challenge(decode_base64($challenge));
|
|
||||||
ok($c->{ident} eq "NTLMSSP", 'header');
|
|
||||||
ok($c->{type} == 2, 'type');
|
|
||||||
ok($c->{flags} == 0x00018205, 'flags');
|
|
||||||
ok($c->{data} eq "ABCDEFGH", 'data');
|
|
||||||
ok($c->{domain}{len} == 4, 'domain length');
|
|
||||||
ok($c->{domain}{offset} == 48, 'domain offset');
|
|
||||||
ok($c->{buffer} eq "test", 'contents');
|
|
||||||
|
|
||||||
# 13: challenge response
|
|
||||||
|
|
||||||
my $reply2 = ntlm($challenge);
|
|
||||||
ok($reply2 eq $msg2, 'reply 2');
|
|
|
@ -1,54 +0,0 @@
|
||||||
#! /usr/bin/perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More tests => 12;
|
|
||||||
|
|
||||||
use Authen::NTLM;
|
|
||||||
use MIME::Base64;
|
|
||||||
|
|
||||||
my $user = "test";
|
|
||||||
my $domain = "test";
|
|
||||||
my $passwd = "test";
|
|
||||||
my $msg1 = "TlRMTVNTUAABAAAAB7IAAAQABAAgAAAABAAEACQAAAB0ZXN0dGVzdA==";
|
|
||||||
my $challenge = "TlRMTVNTUAACAAAABAAEADAAAAAFggEAQUJDREVGR0gAAAAAAAAAAAAAAAAAAAAAdGVzdA==";
|
|
||||||
my $msg2 = "TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAQABABwAAAACAAIAHQAAAAIAAgAfAAAAAAAAABEAAAABYIBAJ7/TlMo4HLg0gOk6iKq4bv2vk35ozHEKKoqG8nTkQ5S82zyqpJzxPDJHUMynnKsBHRlc3R0AGUAcwB0AHQAZQBzAHQA";
|
|
||||||
|
|
||||||
my $a = Authen::NTLM-> new(
|
|
||||||
user => $user,
|
|
||||||
domain => $domain,
|
|
||||||
password => $passwd,
|
|
||||||
);
|
|
||||||
|
|
||||||
# 2: username
|
|
||||||
|
|
||||||
ok($a->user eq $user, 'ntlm_user');
|
|
||||||
|
|
||||||
# 3: domain
|
|
||||||
|
|
||||||
ok($a->domain eq $domain, 'ntlm_domain');
|
|
||||||
|
|
||||||
# 4: password
|
|
||||||
|
|
||||||
ok($a->password eq $passwd, 'ntlm_password');
|
|
||||||
|
|
||||||
# 5: initial message
|
|
||||||
|
|
||||||
my $reply1 = $a-> challenge;
|
|
||||||
ok($reply1 eq $msg1, 'reply 1');
|
|
||||||
|
|
||||||
# 6-12: decode challenge - not normally user accessed
|
|
||||||
|
|
||||||
my $c = &Authen::NTLM::decode_challenge(decode_base64($challenge));
|
|
||||||
ok($c->{ident} eq "NTLMSSP", 'header');
|
|
||||||
ok($c->{type} == 2, 'type');
|
|
||||||
ok($c->{flags} == 0x00018205, 'flags');
|
|
||||||
ok($c->{data} eq "ABCDEFGH", 'data');
|
|
||||||
ok($c->{domain}{len} == 4, 'domain length');
|
|
||||||
ok($c->{domain}{offset} == 48, 'domain offset');
|
|
||||||
ok($c->{buffer} eq "test", 'contents');
|
|
||||||
|
|
||||||
# 13: challenge response
|
|
||||||
|
|
||||||
my $reply2 = $a-> challenge($challenge);
|
|
||||||
ok($reply2 eq $msg2, 'reply 2');
|
|
|
@ -1,44 +0,0 @@
|
||||||
#! /usr/bin/perl
|
|
||||||
|
|
||||||
BEGIN { *CORE::GLOBAL::time = sub { CORE::time } };
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More tests => 9;
|
|
||||||
use Authen::NTLM;
|
|
||||||
use MIME::Base64;
|
|
||||||
|
|
||||||
my $user = "test";
|
|
||||||
my $domain = "test";
|
|
||||||
my $passwd = "test";
|
|
||||||
my $msg1 = "TlRMTVNTUAABAAAAB5IIAAAAAAAAAAAABAAEACAAAAB0ZXN0";
|
|
||||||
my $challenge = "TlRMTVNTUAACAAAABAAEADgAAAAFgokCQUJDREVGR0gAAAAAAAAAAAQABAA8AAAAdGVzdHRlc3R0ZXN0";
|
|
||||||
my $msg2 = "TlRMTVNTUAADAAAAGAAYAEAAAAAwADAAWAAAAAQABACIAAAACAAIAIwAAAAIAAgAlAAAAAAAAABcAAAABYIIAMAnJRnMkjvahFEZwXRLN9QAAAAAAAAAABmT0B8dzYsVm1/IAPnR5PIBAQAAAAAAAIBgMzwAAAAAAAAAAAAAAAAAAAAAAAAAAHRlc3R0AGUAcwB0AHQAZQBzAHQA";
|
|
||||||
|
|
||||||
my $a = Authen::NTLM-> new(
|
|
||||||
user => $user,
|
|
||||||
domain => $domain,
|
|
||||||
password => $passwd,
|
|
||||||
version => 2,
|
|
||||||
);
|
|
||||||
|
|
||||||
my $reply1 = $a-> challenge;
|
|
||||||
ok($reply1 eq $msg1, 'reply 1');
|
|
||||||
|
|
||||||
# decode challenge - not normally user accessed
|
|
||||||
my $c = &Authen::NTLM::decode_challenge(decode_base64($challenge));
|
|
||||||
ok($c->{ident} eq "NTLMSSP", 'header');
|
|
||||||
ok($c->{type} == 2, 'type');
|
|
||||||
ok($c->{flags} == 0x02898205, 'flags');
|
|
||||||
ok($c->{data} eq "ABCDEFGH", 'data');
|
|
||||||
ok($c->{domain}{len} == 4, 'domain length');
|
|
||||||
ok($c->{domain}{offset} == 56, 'domain offset');
|
|
||||||
ok($c->{buffer} eq "testtesttest", 'contents');
|
|
||||||
|
|
||||||
# 13: v2 challenge-response uses time()
|
|
||||||
{
|
|
||||||
no warnings qw(redefine);
|
|
||||||
local *CORE::GLOBAL::time = sub { 1_000_000_000 };
|
|
||||||
my $reply2 = $a-> challenge($challenge);
|
|
||||||
ok($reply2 eq $msg2, 'reply 2');
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
#! /usr/bin/perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
use Test::More;
|
|
||||||
eval 'use Test::Pod 1.00';
|
|
||||||
plan skip_all => 'Test::Pod 1.00 required for testing POD' if $@;
|
|
||||||
all_pod_files_ok(all_pod_files('blib'));
|
|
23
W/TESTING
Normal file
23
W/TESTING
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
TESTING on Unix
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Tests will break as they are home specific.
|
||||||
|
You need a running imap server on localhost with several accounts
|
||||||
|
toto with a password located in the file $HOME/var/pass/secret.toto
|
||||||
|
titi with a password located in the file $HOME/var/pass/secret.titi
|
||||||
|
tata with a password located in the file $HOME/var/pass/secret.tata
|
||||||
|
|
||||||
|
Of course, you can change the file tests.sh and run tests with:
|
||||||
|
|
||||||
|
sh -x tests.sh
|
||||||
|
|
||||||
|
Specific tests can be run by using them as argument to tests.sh:
|
||||||
|
|
||||||
|
sh -x tests.sh ll_ssl_justconnect ll_bad_host ...
|
||||||
|
|
||||||
|
The tests.sh script break on first failure ("set -e" directive).
|
||||||
|
|
||||||
|
Since I added more tests you also need a remote imap server see the
|
||||||
|
file tests.sh and help yourself. No time to make a universal test
|
||||||
|
file.
|
||||||
|
|
1
W/TIME
1
W/TIME
|
@ -1,3 +1,4 @@
|
||||||
|
Added make git
|
||||||
90 Added XOATH FAQ item, thanks to Eduardo, email feedback, amazon gift.
|
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
|
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.
|
240 Fixed long names in invoices. + january invoices.
|
||||||
|
|
61
W/build_exe.bat
Normal file
61
W/build_exe.bat
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
|
||||||
|
REM $Id: build_exe.bat,v 1.27 2015/03/27 23:35:13 gilles Exp gilles $
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
ECHO Building imapsync.exe
|
||||||
|
|
||||||
|
@REM Allow to be called from anywhere;
|
||||||
|
@REM the following command cd to dirname of the current batch pathname
|
||||||
|
cd /D %~dp0
|
||||||
|
|
||||||
|
CALL .\install_modules.bat
|
||||||
|
|
||||||
|
perl ^
|
||||||
|
-mAuthen::NTLM ^
|
||||||
|
-mData::Dumper ^
|
||||||
|
-mData::Uniqid ^
|
||||||
|
-mDigest::HMAC_MD5 ^
|
||||||
|
-mDigest::HMAC_SHA1 ^
|
||||||
|
-mDigest::MD5 ^
|
||||||
|
-mFile::Copy::Recursive ^
|
||||||
|
-mFile::Spec ^
|
||||||
|
-mIO::Socket ^
|
||||||
|
-mIO::Socket::INET ^
|
||||||
|
-mIO::Socket::IP ^
|
||||||
|
-mIO::Socket::SSL ^
|
||||||
|
-mIO::Tee ^
|
||||||
|
-mMail::IMAPClient ^
|
||||||
|
-mTerm::ReadKey ^
|
||||||
|
-mTime::Local ^
|
||||||
|
-mUnicode::String ^
|
||||||
|
-mURI::Escape ^
|
||||||
|
-e ''
|
||||||
|
|
||||||
|
cd
|
||||||
|
@ECHO ON
|
||||||
|
@REM --link libssl32_.dll
|
||||||
|
pp -o imapsync.exe ^
|
||||||
|
--link libeay32_.dll ^
|
||||||
|
--link zlib1_.dll ^
|
||||||
|
--link ssleay32_.dll ^
|
||||||
|
-M Mail::IMAPClient ^
|
||||||
|
-M IO::Socket ^
|
||||||
|
-M IO::Socket::IP ^
|
||||||
|
-M IO::Socket::SSL ^
|
||||||
|
-M IO::Socket::INET ^
|
||||||
|
-M Digest::MD5 ^
|
||||||
|
-M Digest::HMAC_MD5 ^
|
||||||
|
-M Digest::HMAC_SHA1 ^
|
||||||
|
-M Term::ReadKey ^
|
||||||
|
-M File::Spec ^
|
||||||
|
-M Authen::NTLM ^
|
||||||
|
-M Time::Local ^
|
||||||
|
-M URI::Escape ^
|
||||||
|
-M Data::Uniqid ^
|
||||||
|
-M File::Copy::Recursive ^
|
||||||
|
-M IO::Tee ^
|
||||||
|
-M Unicode::String ^
|
||||||
|
.\imapsync
|
||||||
|
|
||||||
|
echo Done building imapsync.exe
|
||||||
|
|
BIN
W/images/gilles_lamiral_400x400.jpeg
Normal file
BIN
W/images/gilles_lamiral_400x400.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
695
W/imapsync.1
Normal file
695
W/imapsync.1
Normal file
|
@ -0,0 +1,695 @@
|
||||||
|
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||||
|
.\"
|
||||||
|
.\" Standard preamble:
|
||||||
|
.\" ========================================================================
|
||||||
|
.de Sp \" Vertical space (when we can't use .PP)
|
||||||
|
.if t .sp .5v
|
||||||
|
.if n .sp
|
||||||
|
..
|
||||||
|
.de Vb \" Begin verbatim text
|
||||||
|
.ft CW
|
||||||
|
.nf
|
||||||
|
.ne \\$1
|
||||||
|
..
|
||||||
|
.de Ve \" End verbatim text
|
||||||
|
.ft R
|
||||||
|
.fi
|
||||||
|
..
|
||||||
|
.\" Set up some character translations and predefined strings. \*(-- will
|
||||||
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||||
|
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||||
|
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||||
|
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||||
|
.\" nothing in troff, for use with C<>.
|
||||||
|
.tr \(*W-
|
||||||
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||||
|
.ie n \{\
|
||||||
|
. ds -- \(*W-
|
||||||
|
. ds PI pi
|
||||||
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||||
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||||
|
. ds L" ""
|
||||||
|
. ds R" ""
|
||||||
|
. ds C` ""
|
||||||
|
. ds C' ""
|
||||||
|
'br\}
|
||||||
|
.el\{\
|
||||||
|
. ds -- \|\(em\|
|
||||||
|
. ds PI \(*p
|
||||||
|
. ds L" ``
|
||||||
|
. ds R" ''
|
||||||
|
'br\}
|
||||||
|
.\"
|
||||||
|
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\"
|
||||||
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||||
|
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||||
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||||
|
.\" output yourself in some meaningful fashion.
|
||||||
|
.ie \nF \{\
|
||||||
|
. de IX
|
||||||
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||||
|
..
|
||||||
|
. nr % 0
|
||||||
|
. rr F
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
. de IX
|
||||||
|
..
|
||||||
|
.\}
|
||||||
|
.\"
|
||||||
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||||
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||||
|
. \" fudge factors for nroff and troff
|
||||||
|
.if n \{\
|
||||||
|
. ds #H 0
|
||||||
|
. ds #V .8m
|
||||||
|
. ds #F .3m
|
||||||
|
. ds #[ \f1
|
||||||
|
. ds #] \fP
|
||||||
|
.\}
|
||||||
|
.if t \{\
|
||||||
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||||
|
. ds #V .6m
|
||||||
|
. ds #F 0
|
||||||
|
. ds #[ \&
|
||||||
|
. ds #] \&
|
||||||
|
.\}
|
||||||
|
. \" simple accents for nroff and troff
|
||||||
|
.if n \{\
|
||||||
|
. ds ' \&
|
||||||
|
. ds ` \&
|
||||||
|
. ds ^ \&
|
||||||
|
. ds , \&
|
||||||
|
. ds ~ ~
|
||||||
|
. ds /
|
||||||
|
.\}
|
||||||
|
.if t \{\
|
||||||
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||||
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||||
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||||
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||||
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||||
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||||
|
.\}
|
||||||
|
. \" troff and (daisy-wheel) nroff accents
|
||||||
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||||
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||||
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||||
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||||
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||||
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||||
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||||
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||||
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||||
|
. \" corrections for vroff
|
||||||
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||||
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||||
|
. \" for low resolution devices (crt and lpr)
|
||||||
|
.if \n(.H>23 .if \n(.V>19 \
|
||||||
|
\{\
|
||||||
|
. ds : e
|
||||||
|
. ds 8 ss
|
||||||
|
. ds o a
|
||||||
|
. ds d- d\h'-1'\(ga
|
||||||
|
. ds D- D\h'-1'\(hy
|
||||||
|
. ds th \o'bp'
|
||||||
|
. ds Th \o'LP'
|
||||||
|
. ds ae ae
|
||||||
|
. ds Ae AE
|
||||||
|
.\}
|
||||||
|
.rm #[ #] #H #V #F C
|
||||||
|
.\" ========================================================================
|
||||||
|
.\"
|
||||||
|
.IX Title "IMAPSYNC 1"
|
||||||
|
.TH IMAPSYNC 1 "2015-04-01" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||||
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
|
.\" way too many mistakes in technical documents.
|
||||||
|
.if n .ad l
|
||||||
|
.nh
|
||||||
|
.SH "NAME"
|
||||||
|
imapsync \- IMAP synchronisation, sync, copy or migration tool.
|
||||||
|
Synchronises mailboxes between two imap servers.
|
||||||
|
Good at IMAP migration. More than 52 different IMAP server softwares
|
||||||
|
supported with success, few failures.
|
||||||
|
.PP
|
||||||
|
$Revision: 1.637 $
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.IX Header "SYNOPSIS"
|
||||||
|
To synchronize imap account \*(L"foo\*(R" on \*(L"imap.truc.org\*(R"
|
||||||
|
to imap account \*(L"bar\*(R" on \*(L"imap.trac.org\*(R"
|
||||||
|
with foo password \*(L"secret1\*(R"
|
||||||
|
and bar password \*(L"secret2\*(R":
|
||||||
|
.PP
|
||||||
|
.Vb 3
|
||||||
|
\& imapsync \e
|
||||||
|
\& \-\-host1 imap.truc.org \-\-user1 foo \-\-password1 secret1 \e
|
||||||
|
\& \-\-host2 imap.trac.org \-\-user2 bar \-\-password2 secret2
|
||||||
|
.Ve
|
||||||
|
.SH "INSTALL"
|
||||||
|
.IX Header "INSTALL"
|
||||||
|
.Vb 4
|
||||||
|
\& imapsync works fine under any Unix OS with perl.
|
||||||
|
\& imapsync works fine under Windows (2000, XP, Vista, Seven)
|
||||||
|
\& with Strawberry Perl (5.10, 5.12 or higher)
|
||||||
|
\& or as a standalone binary software imapsync.exe
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
imapsync can be available directly on the following distributions:
|
||||||
|
FreeBSD, Debian, Ubuntu, Gentoo, Fedora,
|
||||||
|
NetBSD, Darwin, Mandriva and OpenBSD.
|
||||||
|
See http://oswatershed.org/pkg/imapsync
|
||||||
|
.PP
|
||||||
|
.Vb 2
|
||||||
|
\& Purchase latest imapsync at
|
||||||
|
\& http://imapsync.lamiral.info/
|
||||||
|
\&
|
||||||
|
\& You\*(Aqll receive a link to a compressed tarball called imapsync\-x.xx.tgz
|
||||||
|
\& where x.xx is the version number. Untar the tarball where
|
||||||
|
\& you want (on Unix):
|
||||||
|
\&
|
||||||
|
\& tar xzvf imapsync\-x.xx.tgz
|
||||||
|
\&
|
||||||
|
\& Go into the directory imapsync\-x.xx and read the INSTALL file.
|
||||||
|
\& The INSTALL file can be found at
|
||||||
|
\& http://imapsync.lamiral.info/INSTALL
|
||||||
|
\& It is now split in several files for each system
|
||||||
|
\& http://imapsync.lamiral.info/INSTALL.d/
|
||||||
|
\&
|
||||||
|
\& The frozen freecode (was freshmeat) record is at
|
||||||
|
\& http://freecode.com/projects/imapsync
|
||||||
|
.Ve
|
||||||
|
.SH "USAGE"
|
||||||
|
.IX Header "USAGE"
|
||||||
|
.Vb 1
|
||||||
|
\& imapsync [options]
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
To get a description of each option just run imapsync like this:
|
||||||
|
.PP
|
||||||
|
.Vb 1
|
||||||
|
\& imapsync \-\-help
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
or simply
|
||||||
|
.PP
|
||||||
|
.Vb 1
|
||||||
|
\& imapsync
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
This description of all options is available at
|
||||||
|
http://imapsync.lamiral.info/OPTIONS
|
||||||
|
.PP
|
||||||
|
The option list:
|
||||||
|
.PP
|
||||||
|
.Vb 10
|
||||||
|
\& imapsync [\-\-host1 server1] [\-\-port1 <num>]
|
||||||
|
\& [\-\-user1 <string>] [\-\-passfile1 <string>]
|
||||||
|
\& [\-\-host2 server2] [\-\-port2 <num>]
|
||||||
|
\& [\-\-user2 <string>] [\-\-passfile2 <string>]
|
||||||
|
\& [\-\-ssl1] [\-\-ssl2]
|
||||||
|
\& [\-\-tls1] [\-\-tls2]
|
||||||
|
\& [\-\-authmech1 <string>] [\-\-authmech2 <string>]
|
||||||
|
\& [\-\-proxyauth1] [\-\-proxyauth2]
|
||||||
|
\& [\-\-domain1] [\-\-domain2]
|
||||||
|
\& [\-\-authmd51] [\-\-authmd52]
|
||||||
|
\& [\-\-folder <string> \-\-folder <string> ...]
|
||||||
|
\& [\-\-folderrec <string> \-\-folderrec <string> ...]
|
||||||
|
\& [\-\-include <regex>] [\-\-exclude <regex>]
|
||||||
|
\& [\-\-prefix2 <string>] [\-\-prefix1 <string>]
|
||||||
|
\& [\-\-regextrans2 <regex> \-\-regextrans2 <regex> ...]
|
||||||
|
\& [\-\-sep1 <char>]
|
||||||
|
\& [\-\-sep2 <char>]
|
||||||
|
\& [\-\-justfolders] [\-\-justfoldersizes] [\-\-justconnect] [\-\-justbanner]
|
||||||
|
\& [\-\-syncinternaldates]
|
||||||
|
\& [\-\-idatefromheader]
|
||||||
|
\& [\-\-syncacls]
|
||||||
|
\& [\-\-regexmess <regex>] [\-\-regexmess <regex>]
|
||||||
|
\& [\-\-skipmess <regex>] [\-\-skipmess <regex>]
|
||||||
|
\& [\-\-maxsize <int>]
|
||||||
|
\& [\-\-minsize <int>]
|
||||||
|
\& [\-\-maxage <int>]
|
||||||
|
\& [\-\-minage <int>]
|
||||||
|
\& [\-\-search <string>]
|
||||||
|
\& [\-\-search1 <string>]
|
||||||
|
\& [\-\-search2 <string>]
|
||||||
|
\& [\-\-useheader <string>] [\-\-useheader <string>]
|
||||||
|
\& [\-\-nouid1] [\-\-nouid2]
|
||||||
|
\& [\-\-usecache]
|
||||||
|
\& [\-\-noskipsize]
|
||||||
|
\& [\-\-delete]
|
||||||
|
\& [\-\-delete2] [\-\-delete2duplicates]
|
||||||
|
\& [\-\-expunge] [\-\-expunge1] [\-\-expunge2] [\-\-uidexpunge2]
|
||||||
|
\& [\-\-delete2folders] [\-\-delete2foldersonly] [\-\-delete2foldersbutnot]
|
||||||
|
\& [\-\-subscribed] [\-\-subscribe] [\-\-subscribeall]
|
||||||
|
\& [\-\-nofoldersizes] [\-\-nofoldersizesatend]
|
||||||
|
\& [\-\-dry]
|
||||||
|
\& [\-\-debug] [\-\-debugimap][\-\-debugimap1][\-\-debugimap2] [\-\-debugcontent]
|
||||||
|
\& [\-\-timeout <int>]
|
||||||
|
\& [\-\-noreleasecheck]
|
||||||
|
\& [\-\-releasecheck]
|
||||||
|
\& [\-\-pidfile <filepath>] [\-\-pidfilelocking]
|
||||||
|
\& [\-\-tmpdir <dirpath>]
|
||||||
|
\& [\-\-nolog]
|
||||||
|
\& [\-\-logfile <filepath>]
|
||||||
|
\& [\-\-version] [\-\-help]
|
||||||
|
\& [\-\-tests] [\-\-testsdebug] [\-\-testslive]
|
||||||
|
.Ve
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.IX Header "DESCRIPTION"
|
||||||
|
Imapsync command is a tool allowing incremental and
|
||||||
|
recursive imap transfers from one mailbox to another.
|
||||||
|
.PP
|
||||||
|
By default all folders are transferred, recursively, all
|
||||||
|
possible flags (\eSeen \eAnswered \eFlagged etc.) are synced too.
|
||||||
|
.PP
|
||||||
|
We sometimes need to transfer mailboxes from one imap server to
|
||||||
|
another. This is called migration.
|
||||||
|
.PP
|
||||||
|
Imapsync reduces the amount
|
||||||
|
of data transferred by not transferring a given message
|
||||||
|
if it resides already on both sides. Same specific headers
|
||||||
|
and the transfer is done only once; taken into account are by default
|
||||||
|
Message-Id and Received header lines.
|
||||||
|
All flags are
|
||||||
|
preserved, unread will stay unread, read will stay read,
|
||||||
|
deleted will stay deleted. You can stop the transfer at any
|
||||||
|
time and restart it later, imapsync works well with bad
|
||||||
|
connections and interruptions.
|
||||||
|
.PP
|
||||||
|
You can decide to delete the messages from the source mailbox
|
||||||
|
after a successful transfer, it can be a good feature when migrating
|
||||||
|
live mailboxes since messages will be only on one side.
|
||||||
|
In that case, use the \-\-delete option. Option \-\-delete implies
|
||||||
|
also option \-\-expunge so all messages marked deleted on host1
|
||||||
|
will be really deleted.
|
||||||
|
(you can use \-\-noexpunge to avoid this but I don't see any
|
||||||
|
good real world scenario for the combination \-\-delete \-\-noexpunge).
|
||||||
|
.PP
|
||||||
|
A different scenario is synchronizing a mailbox B from another mailbox A
|
||||||
|
in case you just want to keep a \*(L"live\*(R" copy of A in B.
|
||||||
|
In that case \-\-delete2 has to be used, it deletes messages in host2
|
||||||
|
folder B that are not in host1 folder A. If you also need to destroy
|
||||||
|
host2 folders that are not in host1 then use \-\-delete2folders (see also
|
||||||
|
\&\-\-delete2foldersonly and \-\-delete2foldersbutnot).
|
||||||
|
.PP
|
||||||
|
Imapsync is not adequate for maintaining two active imap accounts
|
||||||
|
in synchronization when the user plays independently on both sides.
|
||||||
|
Use offlineimap (written by John Goerzen) or mbsync (written by
|
||||||
|
Michael R. Elkins) for 2 ways synchronizations.
|
||||||
|
.SH "OPTIONS"
|
||||||
|
.IX Header "OPTIONS"
|
||||||
|
To get a description of each option just invoke:
|
||||||
|
.PP
|
||||||
|
.Vb 1
|
||||||
|
\& imapsync
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
or read http://imapsync.lamiral.info/OPTIONS
|
||||||
|
.SH "HISTORY"
|
||||||
|
.IX Header "HISTORY"
|
||||||
|
I wrote imapsync because an enterprise (basystemes) paid me to install
|
||||||
|
a new imap server without losing huge old mailboxes located on a far
|
||||||
|
away remote imap server accessible by a low bandwidth link. The tool
|
||||||
|
imapcp (written in python) could not help me because I had to verify
|
||||||
|
every mailbox was well transferred and delete it after a good
|
||||||
|
transfer. imapsync started its life as a copy_folder.pl patch.
|
||||||
|
The tool copy_folder.pl comes from the Mail\-IMAPClient\-2.1.3 perl
|
||||||
|
module tarball source (in the examples/ directory of the tarball).
|
||||||
|
.SH "EXAMPLE"
|
||||||
|
.IX Header "EXAMPLE"
|
||||||
|
While working on imapsync parameters please run imapsync in
|
||||||
|
dry mode (no modification induced) with the \-\-dry
|
||||||
|
option. Nothing bad can be done this way.
|
||||||
|
.PP
|
||||||
|
To synchronize the imap account \*(L"buddy\*(R" (with password \*(L"secret1\*(R")
|
||||||
|
on host \*(L"imap.src.fr\*(R" to the imap account \*(L"max\*(R" (with password \*(L"secret2\*(R")
|
||||||
|
on host \*(L"imap.dest.fr\*(R":
|
||||||
|
.PP
|
||||||
|
.Vb 2
|
||||||
|
\& imapsync \-\-host1 imap.src.fr \-\-user1 buddy \-\-password1 secret1 \e
|
||||||
|
\& \-\-host2 imap.dest.fr \-\-user2 max \-\-password2 secret2
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
Then you will have max's mailbox updated from buddy's
|
||||||
|
mailbox.
|
||||||
|
.SH "SECURITY"
|
||||||
|
.IX Header "SECURITY"
|
||||||
|
You can use \-\-passfile1 instead of \-\-password1 to give the
|
||||||
|
password since it is safer. With \-\-password1 option any user
|
||||||
|
on your host can see the password by using the 'ps auxwwww'
|
||||||
|
command. Using a variable (like \f(CW$PASSWORD1\fR) is also
|
||||||
|
dangerous because of the 'ps auxwwwwe' command. So, saving
|
||||||
|
the password in a well protected file (600 or rw\-\-\-\-\-\-\-) is
|
||||||
|
the best solution.
|
||||||
|
.PP
|
||||||
|
imasync is not totally protected against sniffers on the
|
||||||
|
network since passwords may be transferred in plain text
|
||||||
|
if \s-1CRAM\-MD5\s0 is not supported by your imap servers. Use
|
||||||
|
\&\-\-ssl1 (or \-\-tls1) and \-\-ssl2 (or \-\-tls2) to enable
|
||||||
|
encryption on host1 and host2.
|
||||||
|
.PP
|
||||||
|
You may authenticate as one user (typically an admin user),
|
||||||
|
but be authorized as someone else, which means you don't
|
||||||
|
need to know every user's personal password. Specify
|
||||||
|
\&\-\-authuser1 \*(L"adminuser\*(R" to enable this on host1. In this
|
||||||
|
case, \-\-authmech1 \s-1PLAIN\s0 will be used by default since it
|
||||||
|
is the only way to go for now. So don't use \-\-authmech1 \s-1SOMETHING\s0
|
||||||
|
with \-\-authuser1 \*(L"adminuser\*(R", it will not work.
|
||||||
|
Same behavior with the \-\-authuser2 option.
|
||||||
|
Authenticate with an admin account must be supported by your
|
||||||
|
imap server to work with imapsync.
|
||||||
|
.PP
|
||||||
|
When working on Sun/iPlanet/Netscape \s-1IMAP\s0 servers you must use
|
||||||
|
\&\-\-proxyauth1 to enable administrative user to masquerade as another user.
|
||||||
|
Can also be used on destination server with \-\-proxyauth2
|
||||||
|
.PP
|
||||||
|
You can authenticate with \s-1OAUTH\s0 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.
|
||||||
|
.SH "EXIT STATUS"
|
||||||
|
.IX Header "EXIT STATUS"
|
||||||
|
imapsync will exit with a 0 status (return code) if everything went good.
|
||||||
|
Otherwise, it exits with a non-zero status.
|
||||||
|
.PP
|
||||||
|
So if you have an unreliable internet connection, you can use this loop
|
||||||
|
in a Bourne shell:
|
||||||
|
.PP
|
||||||
|
.Vb 3
|
||||||
|
\& while ! imapsync ...; do
|
||||||
|
\& echo imapsync not complete
|
||||||
|
\& done
|
||||||
|
.Ve
|
||||||
|
.SH "LICENSE"
|
||||||
|
.IX Header "LICENSE"
|
||||||
|
imapsync is free, open, public but not always gratis software
|
||||||
|
cover by the \s-1NOLIMIT\s0 Public License.
|
||||||
|
See the \s-1LICENSE\s0 file included in the distribution or just read this
|
||||||
|
simple sentence as it is the licence text:
|
||||||
|
No limit to do anything with this work and this license.
|
||||||
|
.SH "MAILING-LIST"
|
||||||
|
.IX Header "MAILING-LIST"
|
||||||
|
The public mailing-list may be the best way to get free support.
|
||||||
|
.PP
|
||||||
|
To write on the mailing-list, the address is:
|
||||||
|
<imapsync@linux\-france.org>
|
||||||
|
.PP
|
||||||
|
To subscribe, send any message (even empty) to:
|
||||||
|
<imapsync\-subscribe@listes.linux\-france.org>
|
||||||
|
then just reply to the confirmation message.
|
||||||
|
.PP
|
||||||
|
To unsubscribe, send a message to:
|
||||||
|
<imapsync\-unsubscribe@listes.linux\-france.org>
|
||||||
|
.PP
|
||||||
|
To contact the person in charge for the list:
|
||||||
|
<imapsync\-request@listes.linux\-france.org>
|
||||||
|
.PP
|
||||||
|
The list archives are available at:
|
||||||
|
http://www.linux\-france.org/prj/imapsync_list/
|
||||||
|
So consider that the list is public, anyone
|
||||||
|
can see your post. Use a pseudonym or do not
|
||||||
|
post to this list if you want to stay private.
|
||||||
|
.PP
|
||||||
|
Thank you for your participation.
|
||||||
|
.SH "AUTHOR"
|
||||||
|
.IX Header "AUTHOR"
|
||||||
|
Gilles \s-1LAMIRAL\s0 <gilles.lamiral@laposte.net>
|
||||||
|
.PP
|
||||||
|
Feedback good or bad is very often welcome.
|
||||||
|
.PP
|
||||||
|
Gilles \s-1LAMIRAL\s0 earns his living by writing, installing,
|
||||||
|
configuring and teaching free, open and often gratis
|
||||||
|
softwares. It used to be \*(L"always gratis\*(R" but now it is
|
||||||
|
\&\*(L"often\*(R" because imapsync is sold by its author, a good
|
||||||
|
way to stay maintening and supporting free open public
|
||||||
|
softwares (see the license) over decades.
|
||||||
|
.SH "BUG REPORT GUIDELINES"
|
||||||
|
.IX Header "BUG REPORT GUIDELINES"
|
||||||
|
Help me to help you: follow the following guidelines.
|
||||||
|
.PP
|
||||||
|
Report any bugs or feature requests to the public mailing-list
|
||||||
|
or to the author.
|
||||||
|
.PP
|
||||||
|
Before reporting bugs, read the \s-1FAQ\s0, the \s-1README\s0 and the
|
||||||
|
\&\s-1TODO\s0 files. http://imapsync.lamiral.info/
|
||||||
|
.PP
|
||||||
|
Upgrade to last imapsync release, maybe the bug
|
||||||
|
is already fixed.
|
||||||
|
.PP
|
||||||
|
Upgrade to last Mail-IMAPClient Perl module.
|
||||||
|
http://search.cpan.org/dist/Mail\-IMAPClient/
|
||||||
|
maybe the bug is already fixed there.
|
||||||
|
.PP
|
||||||
|
Make a good title with word \*(L"imapsync\*(R" in it (my spam filters won't filter it),
|
||||||
|
Try to write an email title with more words than just \*(L"imapsync\*(R" or \*(L"problem\*(R",
|
||||||
|
a good title is made of keywords summary, but not too long (one visible line).
|
||||||
|
.PP
|
||||||
|
Help us to help you: in your report, please include:
|
||||||
|
.PP
|
||||||
|
.Vb 1
|
||||||
|
\& \- imapsync version.
|
||||||
|
\&
|
||||||
|
\& \- output near the first failures, a few lines before is good to get the context
|
||||||
|
\& of the issue. First failures messages are often more significant than
|
||||||
|
\& the last ones.
|
||||||
|
\&
|
||||||
|
\& \- if the issue is always related to the same messages, include the output
|
||||||
|
\& with \-\-debug \-\-debugimap, near the failure point. For example,
|
||||||
|
\& Isolate a buggy message or two in a folder \*(AqBUG\*(Aq and use
|
||||||
|
\&
|
||||||
|
\& imapsync ... \-\-folder \*(AqBUG\*(Aq \-\-debug \-\-debugimap
|
||||||
|
\&
|
||||||
|
\& \- imap server softwares on both sides and their version number.
|
||||||
|
\&
|
||||||
|
\& \- imapsync with all the options you use, the full command line
|
||||||
|
\& you use (except the passwords of course).
|
||||||
|
\&
|
||||||
|
\& \- IMAPClient.pm version.
|
||||||
|
\&
|
||||||
|
\& \- the run context. Do you run imapsync.exe, a unix binary
|
||||||
|
\& or the perl script imapsync.
|
||||||
|
\&
|
||||||
|
\& \- operating system running imapsync.
|
||||||
|
\&
|
||||||
|
\& \- virtual software context (vmware, xen etc.)
|
||||||
|
\&
|
||||||
|
\& \- operating systems on both sides and the third side in case
|
||||||
|
\& you run imapsync on a foreign host from the both.
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
Most of those values can be found as a copy/paste at the begining of the output,
|
||||||
|
so a carbon copy of the output is a very easy and very good debug report for me.
|
||||||
|
.PP
|
||||||
|
One time in your life, read the paper
|
||||||
|
\&\*(L"How To Ask Questions The Smart Way\*(R"
|
||||||
|
http://www.catb.org/~esr/faqs/smart\-questions.html
|
||||||
|
and then forget it.
|
||||||
|
.SH "IMAP SERVERS"
|
||||||
|
.IX Header "IMAP SERVERS"
|
||||||
|
Failure stories reported in the past with the following 6 imap servers.
|
||||||
|
Maybe last imapsync release can run successfully with them.
|
||||||
|
Don't hesitate to have a try, It's been a long time since last failure occured,
|
||||||
|
I will help you and make efforts to switch them to the success list,
|
||||||
|
that's my job.
|
||||||
|
.PP
|
||||||
|
.Vb 9
|
||||||
|
\& \- MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
|
||||||
|
\& \- 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.
|
||||||
|
\& \- Hotmail since hotmail.com does not provide IMAP access
|
||||||
|
\& \- Outlook.com since outlook.com does not provide IMAP access
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
Success stories reported with the following 62 imap servers
|
||||||
|
(software names are in alphabetic order):
|
||||||
|
.PP
|
||||||
|
.Vb 10
|
||||||
|
\& \- 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1]
|
||||||
|
\& \- a1.net imap.a1.net IMAP4 Ready [host1]
|
||||||
|
\& \- Apple Server 10.6 Snow Leopard [host1]
|
||||||
|
\& \- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
|
||||||
|
\& (OSL 3.0) http://www.archiveopteryx.org/
|
||||||
|
\& \- Atmail 6.x [host1]
|
||||||
|
\& \- Axigen Mail Server Version 8.0.0
|
||||||
|
\& \- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
|
||||||
|
\& \- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
|
||||||
|
\& \- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
|
||||||
|
\& (http://www.courier\-mta.org/)
|
||||||
|
\& \- Critical Path (7.0.020)
|
||||||
|
\& \- Cyrus IMAP 1.5, 1.6,
|
||||||
|
\& 2.1, 2.1.15, 2.1.16, 2.1.18
|
||||||
|
\& 2.2.1, 2.2.2\-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
|
||||||
|
\& 2.3\-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
|
||||||
|
\& (http://asg.web.cmu.edu/cyrus/)
|
||||||
|
\& \- David Tobit V8 (proprietary Message system).
|
||||||
|
\& \- Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic\-mailserver/)
|
||||||
|
\& \- DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/).
|
||||||
|
\& 2.0.7 seems buggy.
|
||||||
|
\& \- DBOX 2.41 System [host1] (http://www.dbox.handshake.de/).
|
||||||
|
\& \- Deerfield VisNetic MailServer 5.8.6 [host1]
|
||||||
|
\& \- dkimap4 [host1]
|
||||||
|
\& \- Domino (Notes) 4.61 [host1], 6.5 [host1], 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1,
|
||||||
|
\& 7.0.1 [host1], 8.0.1 [host1], 8.5.2 [host2], 8.5.3 [host1]
|
||||||
|
\& \- Dovecot 0.99.10.4, 0.99.14, 0.99.14\-8.fc4, 1.0\-0.beta2.7,
|
||||||
|
\& 1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/)
|
||||||
|
\& \- Eudora WorldMail v2
|
||||||
|
\& \- FirtClass 9 [host1] Read the FAQ! (http://www.firstclass.com/)
|
||||||
|
\& \- FTGate (http://www.ftgate.com/)
|
||||||
|
\& \- Fusemail imap.fusemail.net:143 (https://www.fusemail.com/).
|
||||||
|
\& \- Gimap (Gmail imap)
|
||||||
|
\& \- GMX IMAP4 StreamProxy.
|
||||||
|
\& \- Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
|
||||||
|
\& \- hMailServer 5.40\-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1] (see FAQ)
|
||||||
|
\& \- IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/)
|
||||||
|
\& \- iPlanet Messaging server 4.15, 5.1, 5.2
|
||||||
|
\& \- IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1]
|
||||||
|
\& \- Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1]
|
||||||
|
\& \- 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),
|
||||||
|
\& 9.6.5 [host1], 12 [host2], 12.0.3 [host1], 12.5.5 [host1],
|
||||||
|
\& 13.5 [host2], 14.5 [host2]
|
||||||
|
\& \- 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),
|
||||||
|
\& Exchange2007\-EP\-SP2,
|
||||||
|
\& Exchange 2010 RTM (Release to Manufacturing) [host2],
|
||||||
|
\& Exchange 2010 SP1 RU2[host2],
|
||||||
|
\& \- Mirapoint, 4.1.9\-GA [host1]
|
||||||
|
\& \- Netscape Mail Server 3.6 (Wintel !)
|
||||||
|
\& \- Netscape Messaging Server 4.15 Patch 7
|
||||||
|
\& \- Office 365 [host1] [host2]
|
||||||
|
\& \- OpenMail IMAP server B.07.00.k0 (Samsung Contact ?)
|
||||||
|
\& \- OpenWave
|
||||||
|
\& \- Oracle Beehive [host1]
|
||||||
|
\& \- Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/)
|
||||||
|
\& \- Qualcomm Worldmail (NT)
|
||||||
|
\& \- QQMail IMAP4Server [host1] [host2] https://en.mail.qq.com/
|
||||||
|
\& \- RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/
|
||||||
|
\& \- Rockliffe Mailsite 5.3.11, 4.5.6
|
||||||
|
\& \- Samsung Contact IMAP server 8.5.0
|
||||||
|
\& \- Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6
|
||||||
|
\& \- Sendmail Mail Store IMAP4rev1 (5.5.6/mstore\-5\-5\-build\-1874 [host1].
|
||||||
|
\& \- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1],
|
||||||
|
\& SmarterMail Professional 10.2 [host1], Smarter Mail 11.7 [host1][host2].
|
||||||
|
\& \- 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, 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/)
|
||||||
|
\& \- UW \- QMail v2.1
|
||||||
|
\& \- VMS, Imap part of TCP/IP suite of VMS 7.3.2
|
||||||
|
\& \- Yahoo [host1]
|
||||||
|
\& \- Zarafa 6,40,0,20653 [host1] (http://www.zarafa.com/)
|
||||||
|
\& \- Zarafa ZCP 7.1.4 IMAP Gateway [host2]
|
||||||
|
\& \- Zimbra\-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
|
||||||
|
\& Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
Please report to the author any success or bad story with
|
||||||
|
imapsync and do not forget to mention the \s-1IMAP\s0 server
|
||||||
|
software names and version on both sides. This will help
|
||||||
|
future users. To help the author maintaining this section
|
||||||
|
report the two lines at the begining of the output if they
|
||||||
|
are useful to know the softwares. Example:
|
||||||
|
.PP
|
||||||
|
.Vb 2
|
||||||
|
\& Host1 software:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
|
||||||
|
\& Host2 software:* OK Courier\-IMAP ready
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
You can use option \-\-justconnect to get those lines.
|
||||||
|
Example:
|
||||||
|
.PP
|
||||||
|
.Vb 1
|
||||||
|
\& imapsync \-\-host1 imap.troc.org \-\-host2 imap.trac.org \-\-justconnect
|
||||||
|
.Ve
|
||||||
|
.SH "HUGE MIGRATION"
|
||||||
|
.IX Header "HUGE MIGRATION"
|
||||||
|
Pay special attention to options
|
||||||
|
\&\-\-subscribed
|
||||||
|
\&\-\-subscribe
|
||||||
|
\&\-\-delete
|
||||||
|
\&\-\-delete2
|
||||||
|
\&\-\-delete2folders
|
||||||
|
\&\-\-maxage
|
||||||
|
\&\-\-minage
|
||||||
|
\&\-\-maxsize
|
||||||
|
\&\-\-useuid
|
||||||
|
\&\-\-usecache
|
||||||
|
.PP
|
||||||
|
If you have many mailboxes to migrate think about a little
|
||||||
|
shell program. Write a file called file.txt (for example)
|
||||||
|
containing users and passwords.
|
||||||
|
The separator used in this example is ';'
|
||||||
|
.PP
|
||||||
|
The file.txt file contains:
|
||||||
|
.PP
|
||||||
|
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
|
||||||
|
\&...
|
||||||
|
.PP
|
||||||
|
On Unix the shell program can be:
|
||||||
|
.PP
|
||||||
|
.Vb 4
|
||||||
|
\& { while IFS=\*(Aq;\*(Aq read u1 p1 u2 p2; do
|
||||||
|
\& imapsync \-\-host1 imap.side1.org \-\-user1 "$u1" \-\-password1 "$p1" \e
|
||||||
|
\& \-\-host2 imap.side2.org \-\-user2 "$u2" \-\-password2 "$p2" ...
|
||||||
|
\& done ; } < file.txt
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
On Windows the batch program can be:
|
||||||
|
.PP
|
||||||
|
.Vb 3
|
||||||
|
\& FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) DO imapsync ^
|
||||||
|
\& \-\-host1 imap.side1.org \-\-user1 %%G \-\-password1 %%H ^
|
||||||
|
\& \-\-host2 imap.side2.org \-\-user2 %%I \-\-password2 %%J ...
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
The ... have to be replaced by nothing or any imapsync option.
|
||||||
|
Welcome in shell programming !
|
||||||
|
.PP
|
||||||
|
You will find already written scripts at
|
||||||
|
http://imapsync.lamiral.info/examples/
|
||||||
|
.SH "Hacking"
|
||||||
|
.IX Header "Hacking"
|
||||||
|
Feel free to hack imapsync as the \s-1NOLIMIT\s0 license permits it.
|
||||||
|
.SH "Links"
|
||||||
|
.IX Header "Links"
|
||||||
|
Entries for imapsync:
|
||||||
|
https://web.archive.org/web/20070202005121/http://www.imap.org/products/showall.php
|
||||||
|
.SH "SIMILAR SOFTWARES"
|
||||||
|
.IX Header "SIMILAR SOFTWARES"
|
||||||
|
.Vb 10
|
||||||
|
\& imap_tools : http://www.athensfbc.com/imap_tools
|
||||||
|
\& offlineimap : https://github.com/nicolas33/offlineimap
|
||||||
|
\& mbsync : http://isync.sourceforge.net/
|
||||||
|
\& mailsync : http://mailsync.sourceforge.net/
|
||||||
|
\& mailutil : http://www.washington.edu/imap/
|
||||||
|
\& part of the UW IMAP tookit.
|
||||||
|
\& imaprepl : http://www.bl0rg.net/software/
|
||||||
|
\& http://freecode.com/projects/imap\-repl/
|
||||||
|
\& imapcopy : http://home.arcor.de/armin.diehl/imapcopy/imapcopy.html
|
||||||
|
\& migrationtool : http://sourceforge.net/projects/migrationtool/
|
||||||
|
\& imapmigrate : http://sourceforge.net/projects/cyrus\-utils/
|
||||||
|
\& wonko_imapsync: http://wonko.com/article/554
|
||||||
|
\& see also file W/tools/wonko_ruby_imapsync
|
||||||
|
\& exchange\-away : http://exchange\-away.sourceforge.net/
|
||||||
|
\& pop2imap : http://www.linux\-france.org/prj/pop2imap/
|
||||||
|
.Ve
|
||||||
|
.PP
|
||||||
|
Feedback (good or bad) will often be welcome.
|
||||||
|
.PP
|
||||||
|
\&\f(CW$Id:\fR imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
REM $Id: install_modules.bat,v 1.13 2014/11/14 17:10:17 gilles Exp gilles $
|
REM $Id: install_modules.bat,v 1.15 2015/03/03 11:23:12 gilles Exp gilles $
|
||||||
|
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
|
@ -12,24 +12,27 @@ IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://stra
|
||||||
|
|
||||||
REM perl is there
|
REM perl is there
|
||||||
|
|
||||||
FOR %%M in ( Mail::IMAPClient ^
|
FOR %%M in ( ^
|
||||||
Unicode::String ^
|
Authen::NTLM ^
|
||||||
|
Crypt::SSLeay ^
|
||||||
|
Data::Uniqid ^
|
||||||
|
Digest::HMAC_MD5 ^
|
||||||
|
Digest::HMAC_SHA1 ^
|
||||||
|
Digest::MD5 ^
|
||||||
File::Copy::Recursive ^
|
File::Copy::Recursive ^
|
||||||
Getopt::ArgvFile ^
|
Getopt::ArgvFile ^
|
||||||
Module::ScanDeps ^
|
|
||||||
PAR::Packer ^
|
|
||||||
Test::Pod ^
|
|
||||||
IO::Socket::IP ^
|
|
||||||
IO::Socket::INET ^
|
IO::Socket::INET ^
|
||||||
IO::Socket::INET6 ^
|
IO::Socket::INET6 ^
|
||||||
Net::SSLeay ^
|
IO::Socket::SSL ^
|
||||||
Crypt::SSLeay ^
|
|
||||||
Net::SSL IO::Socket::SSL ^
|
|
||||||
Digest::MD5 ^
|
|
||||||
Digest::HMAC_MD5 ^
|
|
||||||
Data::Uniqid URI::Escape ^
|
|
||||||
Authen::NTLM ^
|
|
||||||
IO::Tee ^
|
IO::Tee ^
|
||||||
|
Mail::IMAPClient ^
|
||||||
|
Module::ScanDeps ^
|
||||||
|
Net::SSL ^
|
||||||
|
Net::SSLeay ^
|
||||||
|
PAR::Packer ^
|
||||||
|
Test::Pod ^
|
||||||
|
Unicode::String ^
|
||||||
|
URI::Escape ^
|
||||||
) DO ECHO Updating %%M ^
|
) DO ECHO Updating %%M ^
|
||||||
& perl -MCPAN -e "install %%M"
|
& perl -MCPAN -e "install %%M"
|
||||||
|
|
21
W/learn/ipc_open2
Executable file
21
W/learn/ipc_open2
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use strict ;
|
||||||
|
use IO::Handle ;
|
||||||
|
use IPC::Open2 ;
|
||||||
|
|
||||||
|
my( $chld_out, $chld_in ) = ( IO::Handle->new, IO::Handle->new ) ;
|
||||||
|
my $pid = open2( $chld_out, $chld_in, 'cat -n' ) ;
|
||||||
|
print $chld_in "LALALA\n" x 50000 ;
|
||||||
|
print $chld_in "LALALA\n" ;
|
||||||
|
print $chld_in "LALALA\n" ;
|
||||||
|
|
||||||
|
$chld_in->close ;
|
||||||
|
my @out = <$chld_out> ;
|
||||||
|
|
||||||
|
waitpid( $pid, 0 );
|
||||||
|
my $child_exit_status = $? >> 8;
|
||||||
|
|
||||||
|
print @out ;
|
17
W/learn/pipemess
Executable file
17
W/learn/pipemess
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# $Id: $
|
||||||
|
|
||||||
|
use strict ;
|
||||||
|
|
||||||
|
|
||||||
|
open( READCMD, "cat -n /etc/passwd |" ) ;
|
||||||
|
|
||||||
|
my @out = <READCMD> ;
|
||||||
|
|
||||||
|
close( READCMD ) ;
|
||||||
|
|
||||||
|
print @out ;
|
||||||
|
|
||||||
|
exit ;
|
||||||
|
|
143
W/memo
143
W/memo
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: memo,v 1.45 2013/11/11 19:32:19 gilles Exp gilles $
|
# $Id: memo,v 1.51 2015/01/19 01:26:51 gilles Exp gilles $
|
||||||
|
|
||||||
count_nice() {
|
count_nice() {
|
||||||
|
|
||||||
|
@ -102,11 +102,44 @@ statistics_VERSION_getstats() {
|
||||||
|
|
||||||
echo "statistics_VERSION_monthly_ip 02 2012 # long"
|
echo "statistics_VERSION_monthly_ip 02 2012 # long"
|
||||||
statistics_VERSION_monthly_ip() {
|
statistics_VERSION_monthly_ip() {
|
||||||
|
statistics_VERSION_getstats
|
||||||
month=${1:-`date '+%m'`}
|
month=${1:-`date '+%m'`}
|
||||||
year=${2:-`date '+%Y'`}
|
year=${2:-`date '+%Y'`}
|
||||||
|
ls linux-france.org.??-${month}-${year}.imapsync_VERSION || return 1
|
||||||
cut -d ' ' -f 1,12,13,18,19 linux-france.org.??-${month}-${year}.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_${year}_${month}.ip
|
cut -d ' ' -f 1,12,13,18,19 linux-france.org.??-${month}-${year}.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_${year}_${month}.ip
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "verify_month_year 02 2015"
|
||||||
|
verify_month_year() {
|
||||||
|
month=${1:-`date '+%m'`}
|
||||||
|
year=${2:-`date '+%Y'`}
|
||||||
|
(
|
||||||
|
cd $HOME/imapsync_stats
|
||||||
|
fmy="stats_imapsync_${year}_${month}.ip"
|
||||||
|
test -f "$fmy" || { echo "No $fmy" ; statistics_VERSION_monthly_ip ${month} ${year} ; }
|
||||||
|
test -f "$fmy" || { echo "No $fmy" ; return 1 ; }
|
||||||
|
fmy_YYYYmm=`date -r "$fmy" +%Y%m`
|
||||||
|
diff_month=`expr $fmy_YYYYmm - ${year}${month}`
|
||||||
|
echo -n $diff_month
|
||||||
|
test "$diff_month" -ge 1 && echo " is enough" && return 0
|
||||||
|
echo " is not enough"
|
||||||
|
statistics_VERSION_monthly_ip $month $year
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "verify_year 2015"
|
||||||
|
verify_year() {
|
||||||
|
year=${1:-`date '+%Y'`}
|
||||||
|
now_yearmonth=`date '+%Y%m'`
|
||||||
|
for month in `count_nice 01 12`; do
|
||||||
|
test "$now_yearmonth" -ge "$year$month" && \
|
||||||
|
verify_month_year $month $year
|
||||||
|
done
|
||||||
|
statistics_VERSION_yearly_ip $year
|
||||||
|
statistics_VERSION_synthesis
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "statistics_VERSION_monthly_ip_wc 02 2012 # short"
|
echo "statistics_VERSION_monthly_ip_wc 02 2012 # short"
|
||||||
statistics_VERSION_monthly_ip_wc() {
|
statistics_VERSION_monthly_ip_wc() {
|
||||||
month=${1:-`date '+%m'`}
|
month=${1:-`date '+%m'`}
|
||||||
|
@ -177,7 +210,6 @@ statistics_VERSION_yearly_runs() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "statistics_VERSION_synthesis 2012 # short"
|
echo "statistics_VERSION_synthesis 2012 # short"
|
||||||
statistics_VERSION_synthesis() {
|
statistics_VERSION_synthesis() {
|
||||||
year=${1:-`date '+%Y'`}
|
year=${1:-`date '+%Y'`}
|
||||||
|
@ -225,14 +257,46 @@ statistics_VERSION_getstats() {
|
||||||
|
|
||||||
echo "statistics_VERSION_monthly_ip 02 2012 # long"
|
echo "statistics_VERSION_monthly_ip 02 2012 # long"
|
||||||
statistics_VERSION_monthly_ip() {
|
statistics_VERSION_monthly_ip() {
|
||||||
|
statistics_VERSION_getstats
|
||||||
month=${1:-`date '+%m'`}
|
month=${1:-`date '+%m'`}
|
||||||
year=${2:-`date '+%Y'`}
|
year=${2:-`date '+%Y'`}
|
||||||
(
|
(
|
||||||
cd $HOME/imapsync_stats
|
cd $HOME/imapsync_stats
|
||||||
|
ls access.log_${year}${month}??.imapsync_VERSION || return 1
|
||||||
cut -d ' ' -f 1,12,13,18,19 access.log_${year}${month}??.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_${year}_${month}.ip
|
cut -d ' ' -f 1,12,13,18,19 access.log_${year}${month}??.imapsync_VERSION |sort -n |uniq -c|sort -n > stats_imapsync_${year}_${month}.ip
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "verify_month_year 02 2015"
|
||||||
|
verify_month_year() {
|
||||||
|
month=${1:-`date '+%m'`}
|
||||||
|
year=${2:-`date '+%Y'`}
|
||||||
|
(
|
||||||
|
cd $HOME/imapsync_stats
|
||||||
|
fmy="stats_imapsync_${year}_${month}.ip"
|
||||||
|
test -f "$fmy" || { echo "No $fmy" ; statistics_VERSION_monthly_ip ${month} ${year} ; }
|
||||||
|
test -f "$fmy" || { echo "No $fmy" ; return 1 ; }
|
||||||
|
fmy_YYYYmm=`date -r "$fmy" +%Y%m`
|
||||||
|
diff_month=`expr $fmy_YYYYmm - ${year}${month}`
|
||||||
|
echo -n $diff_month
|
||||||
|
test "$diff_month" -ge 1 && echo " is enough" && return 0
|
||||||
|
echo " is not enough"
|
||||||
|
statistics_VERSION_monthly $month $year
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "verify_year 2015"
|
||||||
|
verify_year() {
|
||||||
|
year=${1:-`date '+%Y'`}
|
||||||
|
now_yearmonth=`date '+%Y%m'`
|
||||||
|
for month in `count_nice 01 12`; do
|
||||||
|
test "$now_yearmonth" -ge "$year$month" && \
|
||||||
|
verify_month_year $month $year
|
||||||
|
done
|
||||||
|
statistics_VERSION_yearly_ip $year
|
||||||
|
statistics_VERSION_synthesis
|
||||||
|
}
|
||||||
|
|
||||||
echo "statistics_VERSION_monthly_os 08 2012 # short"
|
echo "statistics_VERSION_monthly_os 08 2012 # short"
|
||||||
statistics_VERSION_monthly_os() {
|
statistics_VERSION_monthly_os() {
|
||||||
month=${1:-`date '+%m'`}
|
month=${1:-`date '+%m'`}
|
||||||
|
@ -245,8 +309,8 @@ statistics_VERSION_monthly_os() {
|
||||||
FreeBSD=`grep -i freebsd stats_imapsync_${year}_${month}.ip | wc -l`
|
FreeBSD=`grep -i freebsd stats_imapsync_${year}_${month}.ip | wc -l`
|
||||||
Solaris=`grep -i solaris stats_imapsync_${year}_${month}.ip | wc -l`
|
Solaris=`grep -i solaris stats_imapsync_${year}_${month}.ip | wc -l`
|
||||||
OpenBSD=`grep -i openbsd stats_imapsync_${year}_${month}.ip | wc -l`
|
OpenBSD=`grep -i openbsd stats_imapsync_${year}_${month}.ip | wc -l`
|
||||||
Other=`egrep -i -v 'linux|MSWin32|darwin|freebsd|solaris|openbsd' stats_imapsync_${year}.ip |wc -l`
|
Other=`egrep -i -v 'linux|MSWin32|darwin|freebsd|solaris|openbsd' stats_imapsync_${year}_${month}.ip |wc -l`
|
||||||
Nb_All=`cat stats_imapsync_${year}.ip | wc -l`
|
Nb_All=`cat stats_imapsync_${year}_${month}.ip | wc -l`
|
||||||
for OS in Linux Win32 Darwin FreeBSD Solaris OpenBSD Other; do
|
for OS in Linux Win32 Darwin FreeBSD Solaris OpenBSD Other; do
|
||||||
#echo $OS `eval "echo \\$$OS"` / $Nb_All
|
#echo $OS `eval "echo \\$$OS"` / $Nb_All
|
||||||
Nb_OS=`eval "echo \\$$OS"`
|
Nb_OS=`eval "echo \\$$OS"`
|
||||||
|
@ -334,35 +398,72 @@ statistics_VERSION_yearly_runs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
statistics_releases_monthly() {
|
||||||
|
month=${1:-`date '+%m'`}
|
||||||
|
year=${2:-`date '+%Y'`}
|
||||||
|
(
|
||||||
|
cd $HOME/imapsync_stats
|
||||||
|
test -f stats_imapsync_${year}_${month}.ip \
|
||||||
|
&& grep -o -P imapsync/'1\.\d{3}' stats_imapsync_${year}_${month}.ip \
|
||||||
|
| grep -o -P '1\.\d{3}' | sort -n | uniq -c | sort -n
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
echo "statistics_VERSION_synthesis 2012 # short"
|
statistics_releases_yearly() {
|
||||||
statistics_VERSION_synthesis() {
|
|
||||||
year=${1:-`date '+%Y'`}
|
year=${1:-`date '+%Y'`}
|
||||||
(
|
(
|
||||||
cd $HOME/imapsync_stats
|
cd $HOME/imapsync_stats
|
||||||
echo Nb users each month
|
test -f stats_imapsync_${year}.ip && grep -o -P imapsync/'1\.\d{3}' stats_imapsync_${year}.ip | grep -o -P '1\.\d{3}' | sort -n | uniq -c | sort -n
|
||||||
wc -l stats_imapsync_${year}_??.ip
|
)
|
||||||
echo Nb runs each month
|
}
|
||||||
tail -n 1 stats_imapsync_${year}_??.runs
|
|
||||||
echo % Operating systems
|
# Disable releasecheck started on 1.584 on github Mar 5, 2014
|
||||||
statistics_VERSION_yearly_os $year
|
# https://github.com/imapsync/imapsync/commits/master/imapsync
|
||||||
echo Biggest users
|
statistics_releases_all_times() {
|
||||||
tail -n 5 stats_imapsync_${year}.ip
|
year=${1:-`date '+%Y'`}
|
||||||
echo Nb users each year
|
(
|
||||||
wc -l stats_imapsync_????.ip
|
cd $HOME/imapsync_stats
|
||||||
echo "Nb runs each year : "
|
grep -o -P imapsync/'1\.\d{3}' stats_imapsync_20??.ip | grep -o -P '1\.\d{3}' | sort -n | uniq -c | sort -n
|
||||||
for yyyy in `count_nice 2011 ${year}`; do
|
|
||||||
echo -n "$yyyy: "
|
|
||||||
statistics_VERSION_yearly_runs $yyyy
|
|
||||||
done
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo "statistics_VERSION_synthesis 2012 # short"
|
||||||
|
statistics_VERSION_synthesis() {
|
||||||
|
year=${1:-`date '+%Y'`}
|
||||||
|
year_now=`date '+%Y'`
|
||||||
|
(
|
||||||
|
cd $HOME/imapsync_stats
|
||||||
|
echo && echo "==== Nb users each month in ${year} "
|
||||||
|
wc -l stats_imapsync_${year}_??.ip
|
||||||
|
echo && echo "==== Nb runs each month in ${year} "
|
||||||
|
for f in stats_imapsync_${year}_??.runs; do
|
||||||
|
test -f $f && echo -n "$f : " && tail -n 1 $f
|
||||||
|
done
|
||||||
|
echo && echo "==== % Operating systems in ${year} "
|
||||||
|
statistics_VERSION_yearly_os $year
|
||||||
|
echo && echo "==== Biggest users in ${year} "
|
||||||
|
tail -n 9 stats_imapsync_${year}.ip
|
||||||
|
echo && echo "==== Most releases used in ${year} "
|
||||||
|
statistics_releases_yearly ${year} | tail -9
|
||||||
|
echo && echo "==== Nb users each year "
|
||||||
|
wc -l stats_imapsync_????.ip
|
||||||
|
echo && echo "==== Nb runs each year : "
|
||||||
|
for yyyy in `count_nice 2011 ${year_now}`; do
|
||||||
|
echo -n "$yyyy: "
|
||||||
|
statistics_VERSION_yearly_runs $yyyy
|
||||||
|
done
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
test X"`hostname`" = Xks2 && statistics_VERSION_ks
|
||||||
|
test X"`hostname`" = Xtuxinette && statistics_VERSION_lfo
|
||||||
|
|
||||||
|
|
||||||
niouzes_compil() {
|
niouzes_compil() {
|
||||||
(
|
(
|
||||||
|
|
145
W/patches/imapsync_1.592.groupwise_auth.diff
Normal file
145
W/patches/imapsync_1.592.groupwise_auth.diff
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
--- imapsync-master/imapsync 2014-08-08 01:10:54.000000000 -0600
|
||||||
|
+++ imapsync-gw/imapsync 2014-11-12 20:21:33.727746150 -0700
|
||||||
|
@@ -601,6 +601,7 @@
|
||||||
|
$host1, $host2, $port1, $port2,
|
||||||
|
$user1, $user2, $domain1, $domain2,
|
||||||
|
$password1, $password2, $passfile1, $passfile2,
|
||||||
|
+ $gwtapp1, $gwtappkey1, $gwtapp2, $gwtappkey2,
|
||||||
|
@folder, @include, @exclude, @folderrec,
|
||||||
|
@folderfirst, @folderlast,
|
||||||
|
$prefix1, $prefix2,
|
||||||
|
@@ -1038,13 +1039,13 @@
|
||||||
|
|
||||||
|
$debugimap1 and print "Host1 connection\n";
|
||||||
|
$imap1 = login_imap($host1, $port1, $user1, $domain1, $password1,
|
||||||
|
- $debugimap1, $timeout, $fastio1, $ssl1, $tls1,
|
||||||
|
+ $debugimap1, $timeout, $fastio1, $gwtapp1, $gwtappkey1, $ssl1, $tls1,
|
||||||
|
$authmech1, $authuser1, $reconnectretry1,
|
||||||
|
$proxyauth1, $uid1, $split1, 'Host1', $ssl1_SSL_version );
|
||||||
|
|
||||||
|
$debugimap2 and print "Host2 connection\n";
|
||||||
|
$imap2 = login_imap($host2, $port2, $user2, $domain2, $password2,
|
||||||
|
- $debugimap2, $timeout, $fastio2, $ssl2, $tls2,
|
||||||
|
+ $debugimap2, $timeout, $fastio2, $gwtapp2, $gwtappkey2, $ssl2, $tls2,
|
||||||
|
$authmech2, $authuser2, $reconnectretry2,
|
||||||
|
$proxyauth2, $uid2, $split2, 'Host2', $ssl2_SSL_version );
|
||||||
|
|
||||||
|
@@ -2062,7 +2063,7 @@
|
||||||
|
$imap1 = relogin_imap(
|
||||||
|
$imap1,
|
||||||
|
$host1, $port1, $user1, $domain1, $password1,
|
||||||
|
- $debugimap1, $timeout, $fastio1, $ssl1, $tls1,
|
||||||
|
+ $debugimap1, $timeout, $fastio1, $gwtapp1, $gwtappkey1, $ssl1, $tls1,
|
||||||
|
$authmech1, $authuser1, $reconnectretry1,
|
||||||
|
$proxyauth1, $uid1, $split1) ;
|
||||||
|
|
||||||
|
@@ -2074,7 +2075,7 @@
|
||||||
|
$imap2 = relogin_imap(
|
||||||
|
$imap2,
|
||||||
|
$host2, $port2, $user2, $domain2, $password2,
|
||||||
|
- $debugimap2, $timeout, $fastio2, $ssl2, $tls2,
|
||||||
|
+ $debugimap2, $timeout, $fastio2, $gwtapp2, $gwtappkey2, $ssl2, $tls2,
|
||||||
|
$authmech2, $authuser2, $reconnectretry2,
|
||||||
|
$proxyauth2, $uid2, $split2) ;
|
||||||
|
|
||||||
|
@@ -2085,7 +2086,7 @@
|
||||||
|
sub relogin_imap {
|
||||||
|
my($imap,
|
||||||
|
$host, $port, $user, $domain, $password,
|
||||||
|
- $mydebugimap, $mytimeout, $fastio,
|
||||||
|
+ $mydebugimap, $mytimeout, $fastio, $gwtapp, $gwtappkey,
|
||||||
|
$ssl, $tls, $authmech, $authuser, $reconnectretry,
|
||||||
|
$proxyauth, $uid, $split) = @_;
|
||||||
|
|
||||||
|
@@ -2093,7 +2094,7 @@
|
||||||
|
$imap->logout( ) ;
|
||||||
|
$imap = login_imap(
|
||||||
|
$host, $port, $user, $domain, $password,
|
||||||
|
- $mydebugimap, $mytimeout, $fastio,
|
||||||
|
+ $mydebugimap, $mytimeout, $fastio, $gwtapp, $gwtappkey,
|
||||||
|
$ssl, $tls, $authmech, $authuser, $reconnectretry,
|
||||||
|
$proxyauth, $uid, $split
|
||||||
|
) ;
|
||||||
|
@@ -2101,17 +2102,17 @@
|
||||||
|
return( $imap ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
sub login_imap {
|
||||||
|
|
||||||
|
my @allargs = @_ ;
|
||||||
|
my($host, $port, $user, $domain, $password,
|
||||||
|
- $mydebugimap, $mytimeout, $fastio,
|
||||||
|
+ $mydebugimap, $mytimeout, $fastio, $gwtapp, $gwtappkey,
|
||||||
|
$ssl, $tls, $authmech, $authuser, $reconnectretry,
|
||||||
|
$proxyauth, $uid, $split, $Side, $SSL_version ) = @allargs ;
|
||||||
|
|
||||||
|
my $side = lc( $Side ) ;
|
||||||
|
my $imap = init_imap( @allargs ) ;
|
||||||
|
+ my $gwtapp_encoded = "";
|
||||||
|
|
||||||
|
$imap->connect()
|
||||||
|
or die_clean("Failure: can not open imap connection on $side [$host] with user [$user]: $@\n");
|
||||||
|
@@ -2120,6 +2121,7 @@
|
||||||
|
$imap->Banner( $banner ) ;
|
||||||
|
print "$Side: ", server_banner($imap);
|
||||||
|
|
||||||
|
+
|
||||||
|
if ( $authmech eq 'PREAUTH' ) {
|
||||||
|
if ( $imap->IsAuthenticated( ) ) {
|
||||||
|
$imap->Socket ;
|
||||||
|
@@ -2135,6 +2137,13 @@
|
||||||
|
or die_clean("Can not go to tls encryption on [$host]:", $imap->LastError, "\n" ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if ( defined($gwtapp) && !($gwtapp eq '') && defined($gwtappkey) && !($gwtappkey eq '')) {
|
||||||
|
+ $gwtapp_encoded = encode_base64(qq/$gwtapp\x00$gwtappkey/,"");
|
||||||
|
+ $imap->tag_and_run("AUTHENTICATE XGWTRUSTEDAPP\nXGWTRUSTEDAPP $gwtapp_encoded\n")
|
||||||
|
+ or die_clean("Failed to log in with GroupWise Trust App.");
|
||||||
|
+ @allargs[4] = "";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
authenticate_imap( $imap, @allargs ) ;
|
||||||
|
|
||||||
|
print "$Side: success login on [$host] with user [$user] auth [$authmech]\n" ;
|
||||||
|
@@ -2146,7 +2155,7 @@
|
||||||
|
|
||||||
|
my($imap,
|
||||||
|
$host, $port, $user, $domain, $password,
|
||||||
|
- $mydebugimap, $mytimeout, $fastio,
|
||||||
|
+ $mydebugimap, $mytimeout, $fastio, $gwtapp, $gwtappkey,
|
||||||
|
$ssl, $tls, $authmech, $authuser, $reconnectretry,
|
||||||
|
$proxyauth, $uid, $split, $Side ) = @_ ;
|
||||||
|
|
||||||
|
@@ -2247,7 +2256,7 @@
|
||||||
|
|
||||||
|
sub init_imap {
|
||||||
|
my($host, $port, $user, $domain, $password,
|
||||||
|
- $mydebugimap, $mytimeout, $fastio,
|
||||||
|
+ $mydebugimap, $mytimeout, $fastio, $gwtapp, $gwtappkey,
|
||||||
|
$ssl, $tls, $authmech, $authuser, $reconnectretry,
|
||||||
|
$proxyauth, $uid, $split, $Side, $SSL_version ) = @_ ;
|
||||||
|
|
||||||
|
@@ -5860,7 +5869,10 @@
|
||||||
|
|
||||||
|
--dry : Makes imapsync doing nothing, just print what would
|
||||||
|
be done without --dry.
|
||||||
|
-
|
||||||
|
+--gwtapp1 <string> : GroupWise Trusted App Name for Source
|
||||||
|
+--gwtappkey1 <string> : GroupWise Trusted App Key for Source
|
||||||
|
+--gwtapp2 <string> : GroupWise Trusted App Key for Destination
|
||||||
|
+--gwtappkey2 <string> : GroupWise Trusted App Key for Destination
|
||||||
|
--host1 <string> : Source or "from" imap server. Mandatory.
|
||||||
|
--port1 <int> : Port to connect on host1. Default is 143.
|
||||||
|
--user1 <string> : User to login on host1. Mandatory.
|
||||||
|
@@ -6251,6 +6263,10 @@
|
||||||
|
"debugcrossduplicates!" => \$debugcrossduplicates,
|
||||||
|
"log!" => \$log,
|
||||||
|
"logfile=s" => \$logfile,
|
||||||
|
+ "gwtapp1=s" => \$gwtapp1,
|
||||||
|
+ "gwtappkey1=s" => \$gwtappkey1,
|
||||||
|
+ "gwtapp2=s" => \$gwtapp2,
|
||||||
|
+ "gwtappkey2=s" => \$gwtappkey2,
|
||||||
|
);
|
||||||
|
|
||||||
|
$debug and print "get options: [$opt_ret]\n";
|
1
W/paypal_reply/page_tva_mois.ps
Symbolic link
1
W/paypal_reply/page_tva_mois.ps
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/gilles/public_html/entrepreneur-howto/50_compta/page_tva_mois.ps
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: paypal_build_invoices,v 1.78 2014/10/22 11:26:06 gilles Exp gilles $
|
# $Id: paypal_build_invoices,v 1.88 2015/03/26 01:56:35 gilles Exp gilles $
|
||||||
|
|
||||||
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
|
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
|
||||||
|
|
||||||
|
@ -57,6 +57,15 @@ 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 3538 /g/paypal/paypal_2014_09_complet.csv
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3538 /g/paypal/paypal_2014_09_complet.csv
|
||||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3614 /g/paypal/virements_2014_10.csv
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3614 /g/paypal/virements_2014_10.csv
|
||||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3618 /g/paypal/paypal_2014_10_complet.csv
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3618 /g/paypal/paypal_2014_10_complet.csv
|
||||||
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3691 /g/paypal/paypal_2014_11_complet.csv
|
||||||
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3750 /g/paypal/paypal_2014_12_complet.csv
|
||||||
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3809 /g/paypal/paypal_2015_01_complet.csv
|
||||||
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3877 /g/paypal/paypal_2015_02_complet.csv
|
||||||
|
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3957 /g/paypal/virements_2015_03.csv
|
||||||
|
|
||||||
|
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3959 /g/paypal/paypal_2015_03_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 147 /g/paypal/paypal_2010_11_complet.csv
|
||||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv
|
||||||
|
@ -108,9 +117,14 @@ 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 3538 /g/paypal/paypal_2014_09_complet.csv
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3538 /g/paypal/paypal_2014_09_complet.csv
|
||||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3614 /g/paypal/virements_2014_10.csv
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3614 /g/paypal/virements_2014_10.csv
|
||||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3618 /g/paypal/paypal_2014_10_complet.csv
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3618 /g/paypal/paypal_2014_10_complet.csv
|
||||||
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3691 /g/paypal/paypal_2014_11_complet.csv
|
||||||
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3750 /g/paypal/paypal_2014_12_complet.csv
|
||||||
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3809 /g/paypal/paypal_2015_01_complet.csv
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3691 /g/paypal/paypal_2014_11_complet.csv
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3877 /g/paypal/paypal_2015_02_complet.csv
|
||||||
|
#: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3957 /g/paypal/virements_2015_03.csv
|
||||||
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3959 /g/paypal/paypal_2015_03_complet.csv
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
# La totale
|
# La totale
|
||||||
|
@ -119,7 +133,8 @@ set +x
|
||||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093
|
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093
|
||||||
1330 1331 1332 1333 1334 1652 1653 2131 2132
|
1330 1331 1332 1333 1334 1652 1653 2131 2132
|
||||||
2295 2296 2297 2298 2625 2626 2970 2971 2972
|
2295 2296 2297 2298 2625 2626 2970 2971 2972
|
||||||
3093 3296 3411 3412 3450 3451 3614 3615 3616 3617' \
|
3093 3296 3411 3412 3450 3451 3614 3615 3616 3617
|
||||||
|
3807 3808 3957 3958' \
|
||||||
/g/paypal/paypal_201?_??_complet.csv
|
/g/paypal/paypal_201?_??_complet.csv
|
||||||
|
|
||||||
#set -v
|
#set -v
|
||||||
|
@ -127,7 +142,8 @@ set +x
|
||||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093
|
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093
|
||||||
1330 1331 1332 1333 1334 1652 1653 2131 2132
|
1330 1331 1332 1333 1334 1652 1653 2131 2132
|
||||||
2295 2296 2297 2298 2625 2626 2970 2971 2972
|
2295 2296 2297 2298 2625 2626 2970 2971 2972
|
||||||
3093 3296 3411 3412 3450 3451 3614 3615 3616 3617' \
|
3093 3296 3411 3412 3450 3451 3614 3615 3616 3617
|
||||||
|
3807 3808 3957 3958' \
|
||||||
/g/paypal/paypal_201?_??_complet.csv
|
/g/paypal/paypal_201?_??_complet.csv
|
||||||
#set +v
|
#set +v
|
||||||
|
|
||||||
|
@ -153,6 +169,12 @@ set +x
|
||||||
/g/paypal/paypal_2013_??_complet.csv
|
/g/paypal/paypal_2013_??_complet.csv
|
||||||
#set +v
|
#set +v
|
||||||
|
|
||||||
|
#echo 2014 : 704 ( from 3094 to 3806 ) EUR 36900.00
|
||||||
|
#set -v
|
||||||
|
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||||
|
--first_in 3093 --avoid_numbers '3093 3296 3411 3412 3450 3451 3614 3615 3616 3617' \
|
||||||
|
/g/paypal/paypal_2014_??_complet.csv
|
||||||
|
#set +v
|
||||||
|
|
||||||
|
|
||||||
echo 'sh paypal_build_invoices /g/var/paypal_invoices/3???'
|
echo 'sh paypal_build_invoices /g/var/paypal_invoices/3???'
|
||||||
|
|
|
@ -38,7 +38,7 @@ paypal_init_petite_dev() {
|
||||||
passfile=/g/var/pass/secret.gilles_mbox
|
passfile=/g/var/pass/secret.gilles_mbox
|
||||||
host=p
|
host=p
|
||||||
tmpdir=/g/var/paypal_reply_dev
|
tmpdir=/g/var/paypal_reply_dev
|
||||||
folder='INBOX.03_imapsync.imapsync_paypal_dev'
|
folder='INBOX.03_imapsync_less.imapsync_paypal_dev'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: paypal_run_laposte,v 1.7 2013/02/08 14:57:43 gilles Exp gilles $
|
# $Id: paypal_run_laposte,v 1.8 2015/03/09 17:48:48 gilles Exp gilles $
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
# Add path to commands at home
|
# Add path to commands at home
|
||||||
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
||||||
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
|
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.35/lib
|
||||||
export PERL5LIB
|
export PERL5LIB
|
||||||
|
|
||||||
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
||||||
|
|
|
@ -8,7 +8,7 @@ set -e
|
||||||
|
|
||||||
# Add path to commands at home
|
# Add path to commands at home
|
||||||
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
||||||
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
|
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.35/lib
|
||||||
export PERL5LIB
|
export PERL5LIB
|
||||||
|
|
||||||
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: paypal_send_invoices,v 1.12 2014/05/27 11:16:15 gilles Exp gilles $
|
# $Id: paypal_send_invoices,v 1.14 2015/02/04 11:36:26 gilles Exp gilles $
|
||||||
|
|
||||||
# usages:
|
# usages:
|
||||||
# sh paypal_send_invoices /g/var/paypal_invoices/147
|
# sh paypal_send_invoices /g/var/paypal_invoices/147
|
||||||
|
@ -38,12 +38,14 @@ send_invoice() {
|
||||||
echo '====== END of message ======'
|
echo '====== END of message ======'
|
||||||
test -f "SENT_TO_$email" || acroread facture_imapsync-${invoice}.pdf&
|
test -f "SENT_TO_$email" || acroread facture_imapsync-${invoice}.pdf&
|
||||||
echo "Send this invoice ${invoice} to $email?"
|
echo "Send this invoice ${invoice} to $email?"
|
||||||
read r < /dev/tty
|
#read r < /dev/tty
|
||||||
|
r=y
|
||||||
mailq
|
mailq
|
||||||
echo SAID "[$r]"
|
echo SAID "[$r]"
|
||||||
test X"$r" = Xy && {
|
test X"$r" = Xy && {
|
||||||
echo | mutt -H facture_message.txt -a facture_imapsync-${invoice}.pdf facture_imapsync-${invoice}.pdf.asc --
|
echo | mutt -H facture_message.txt -a facture_imapsync-${invoice}.pdf facture_imapsync-${invoice}.pdf.asc --
|
||||||
touch SENT_TO_$email
|
touch SENT_TO_$email
|
||||||
|
sleep 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<title>imapsync download</title>
|
<title>imapsync download</title>
|
||||||
<meta name="generator" content="Bluefish 1.0.7"/>
|
<meta name="generator" content="Bluefish 1.0.7"/>
|
||||||
<meta name="author" content="Gilles LAMIRAL"/>
|
<meta name="author" content="Gilles LAMIRAL"/>
|
||||||
<meta name="date" content="2014-10-22T13:13:21+0200"/>
|
<meta name="date" content="2014-11-21T12:07:54+0100"/>
|
||||||
<meta name="copyright" content=""/>
|
<meta name="copyright" content=""/>
|
||||||
<meta name="keywords" content=""/>
|
<meta name="keywords" content=""/>
|
||||||
<meta name="description" content=""/>
|
<meta name="description" content=""/>
|
||||||
|
@ -47,7 +47,7 @@ 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>.
|
<a href="../dist/<!--#exec cmd="cat ../dist/path_last.txt" -->/"><b>download page</b></a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>You will receive an invoice soon, in a couple of weeks at worth.
|
<p>You will receive an invoice soon, in a couple of weeks at the worst.
|
||||||
Ask for it if you need it before.</p>
|
Ask for it if you need it before.</p>
|
||||||
|
|
||||||
<p>Next imapsync releases will be available for lifetime without extra payment.<br/>
|
<p>Next imapsync releases will be available for lifetime without extra payment.<br/>
|
||||||
|
@ -91,9 +91,10 @@ gilles.lamiral@laposte.net</p>
|
||||||
<!--#config timefmt="%D" -->
|
<!--#config timefmt="%D" -->
|
||||||
<!--#config timefmt="%A %B %d, %Y" -->
|
<!--#config timefmt="%A %B %d, %Y" -->
|
||||||
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b><br/>
|
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b><br/>
|
||||||
($Id: paypal_return.shtml,v 1.16 2014/10/22 11:13:36 gilles Exp gilles $)
|
($Id: paypal_return.shtml,v 1.18 2015/02/16 21:15:26 gilles Exp gilles $)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<!-- Google Code for Achat imapsync Conversion Page -->
|
<!-- Google Code for Achat imapsync Conversion Page -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* <![CDATA[ */
|
/* <![CDATA[ */
|
||||||
|
@ -102,17 +103,16 @@ var google_conversion_language = "en";
|
||||||
var google_conversion_format = "2";
|
var google_conversion_format = "2";
|
||||||
var google_conversion_color = "ffffff";
|
var google_conversion_color = "ffffff";
|
||||||
var google_conversion_label = "hVVWCKzApQIQvOe62QM";
|
var google_conversion_label = "hVVWCKzApQIQvOe62QM";
|
||||||
var google_conversion_value = 0;
|
var google_conversion_value = 1.00;
|
||||||
if (30) {
|
var google_conversion_currency = "EUR";
|
||||||
google_conversion_value = 30;
|
var google_remarketing_only = false;
|
||||||
}
|
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
|
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
|
||||||
</script>
|
</script>
|
||||||
<noscript>
|
<noscript>
|
||||||
<div style="display:inline;">
|
<div style="display:inline;">
|
||||||
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/992916412/?value=30&label=hVVWCKzApQIQvOe62QM&guid=ON&script=0"/>
|
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/992916412/?value=1.00&currency_code=EUR&label=hVVWCKzApQIQvOe62QM&guid=ON&script=0"/>
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
|
|
1396
W/perlcritic_2.out
1396
W/perlcritic_2.out
File diff suppressed because it is too large
Load diff
|
@ -1,58 +1,86 @@
|
||||||
Main code has high complexity score (361) at line 1, column 1. Consider refactoring. (Severity: 3)
|
Main code has high complexity score (381) at line 1, column 1. Consider refactoring. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 1143, column 33. See page 236 of PBP. (Severity: 3)
|
Literal line breaks in a string at line 1028, column 1. See pages 60,61 of PBP. (Severity: 3)
|
||||||
Expression form of "map" at line 1145, column 51. See page 169 of PBP. (Severity: 4)
|
Literal line breaks in a string at line 1040, column 1. See pages 60,61 of PBP. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 1153, column 33. See page 236 of PBP. (Severity: 3)
|
Regular expression without "/x" flag at line 1212, column 33. See page 236 of PBP. (Severity: 3)
|
||||||
Expression form of "map" at line 1155, column 51. See page 169 of PBP. (Severity: 4)
|
Regular expression without "/x" flag at line 1221, column 33. See page 236 of PBP. (Severity: 3)
|
||||||
Code structure is deeply nested at line 1598, column 41. Consider refactoring. (Severity: 3)
|
Regular expression without "/x" flag at line 1238, column 18. See page 236 of PBP. (Severity: 3)
|
||||||
Subroutine "foldersizesatend" does not end with "return" at line 1758, column 1. See page 197 of PBP. (Severity: 4)
|
Literal line breaks in a string at line 1312, column 1. See pages 60,61 of PBP. (Severity: 3)
|
||||||
Too many arguments at line 1784, column 1. See page 182 of PBP. (Severity: 3)
|
Literal line breaks in a string at line 1345, column 1. See pages 60,61 of PBP. (Severity: 3)
|
||||||
Too many arguments at line 1802, column 1. See page 182 of PBP. (Severity: 3)
|
Code structure is deeply nested at line 1711, column 41. Consider refactoring. (Severity: 3)
|
||||||
Too many arguments at line 1812, column 1. See page 182 of PBP. (Severity: 3)
|
Literal line breaks in a string at line 1859, column 1. See pages 60,61 of PBP. (Severity: 3)
|
||||||
Too many arguments at line 2049, column 1. See page 182 of PBP. (Severity: 3)
|
Subroutine "errors_incr" does not end with "return" at line 1881, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Too many arguments at line 2110, column 1. See page 182 of PBP. (Severity: 3)
|
Subroutine "tests_live_result" does not end with "return" at line 1906, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Too many arguments at line 2170, column 1. See page 182 of PBP. (Severity: 3)
|
Reused variable name in lexical scope: $nb_errors at line 1907, column 2. Invent unique variable names. (Severity: 3)
|
||||||
Too many arguments at line 2273, column 1. See page 182 of PBP. (Severity: 3)
|
Subroutine "foldersizesatend" does not end with "return" at line 1915, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Subroutine "is_valid_directory" does not end with "return" at line 2409, column 1. See page 197 of PBP. (Severity: 4)
|
Too many arguments at line 1941, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
"die" used instead of "croak" at line 2450, column 2. See page 283 of PBP. (Severity: 3)
|
Too many arguments at line 1959, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Always unpack @_ first at line 2544, column 1. See page 178 of PBP. (Severity: 4)
|
Too many arguments at line 1969, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2551, column 15. See page 236 of PBP. (Severity: 3)
|
Too many arguments at line 2216, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2552, column 15. See page 236 of PBP. (Severity: 3)
|
Too many arguments at line 2277, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2553, column 15. See page 236 of PBP. (Severity: 3)
|
Subroutine "authenticate_imap" with high complexity score (21) at line 2338, column 1. Consider refactoring. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2554, column 15. See page 236 of PBP. (Severity: 3)
|
Too many arguments at line 2338, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2581, column 31. See page 236 of PBP. (Severity: 3)
|
Too many arguments at line 2442, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Reused variable name in lexical scope: $imap2 at line 2638, column 9. Invent unique variable names. (Severity: 3)
|
Regular expression without "/x" flag at line 2515, column 51. See page 236 of PBP. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2657, column 25. See page 236 of PBP. (Severity: 3)
|
Backtick operator used at line 2523, column 12. Use IPC::Open3 instead. (Severity: 3)
|
||||||
Regular expression without "/x" flag at line 2660, column 20. See page 236 of PBP. (Severity: 3)
|
Subroutine "is_valid_directory" does not end with "return" at line 2653, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Mixed high and low-precedence booleans at line 2661, column 13. See page 70 of PBP. (Severity: 4)
|
Close filehandles as soon as possible after opening them at line 2673, column 2. See page 209 of PBP. (Severity: 4)
|
||||||
Expression form of "eval" at line 3098, column 13. See page 161 of PBP. (Severity: 5)
|
Subroutine "remove_tmp_files" does not end with "return" at line 2684, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Expression form of "eval" at line 3322, column 13. See page 161 of PBP. (Severity: 5)
|
"die" used instead of "croak" at line 2698, column 2. See page 283 of PBP. (Severity: 3)
|
||||||
Subroutine "select_msgs" does not end with "return" at line 3463, column 1. See page 197 of PBP. (Severity: 4)
|
Always unpack @_ first at line 2799, column 1. See page 178 of PBP. (Severity: 4)
|
||||||
Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3602, column 1. See page 197 of PBP. (Severity: 4)
|
Regular expression without "/x" flag at line 2806, column 15. See page 236 of PBP. (Severity: 3)
|
||||||
Subroutine "copy_message" with high complexity score (30) at line 3679, column 1. Consider refactoring. (Severity: 3)
|
Regular expression without "/x" flag at line 2807, column 15. See page 236 of PBP. (Severity: 3)
|
||||||
Too many arguments at line 3679, column 1. See page 182 of PBP. (Severity: 3)
|
Regular expression without "/x" flag at line 2808, column 15. See page 236 of PBP. (Severity: 3)
|
||||||
Too many arguments at line 3770, column 1. See page 182 of PBP. (Severity: 3)
|
Regular expression without "/x" flag at line 2834, column 31. See page 236 of PBP. (Severity: 3)
|
||||||
Subroutine "tests_subject" does not end with "return" at line 3864, column 1. See page 197 of PBP. (Severity: 4)
|
Reused variable name in lexical scope: $imap2 at line 2894, column 9. Invent unique variable names. (Severity: 3)
|
||||||
Too many arguments at line 3927, column 1. See page 182 of PBP. (Severity: 3)
|
Regular expression without "/x" flag at line 2913, column 25. See page 236 of PBP. (Severity: 3)
|
||||||
Subroutine "sleep_if_needed" does not end with "return" at line 3986, column 1. See page 197 of PBP. (Severity: 4)
|
Regular expression without "/x" flag at line 2916, column 20. See page 236 of PBP. (Severity: 3)
|
||||||
Reused variable name in lexical scope: $total_bytes_transferred at line 3987, column 2. Invent unique variable names. (Severity: 3)
|
Mixed high and low-precedence booleans at line 2917, column 13. See page 70 of PBP. (Severity: 4)
|
||||||
Reused variable name in lexical scope: $nb_msg_transferred at line 3987, column 2. Invent unique variable names. (Severity: 3)
|
Expression form of "eval" at line 3356, column 13. See page 161 of PBP. (Severity: 5)
|
||||||
Reused variable name in lexical scope: $nb_msg_transferred at line 3999, column 9. Invent unique variable names. (Severity: 3)
|
Expression form of "eval" at line 3581, column 13. See page 161 of PBP. (Severity: 5)
|
||||||
Reused variable name in lexical scope: $maxmessagespersecond at line 3999, column 9. Invent unique variable names. (Severity: 3)
|
Subroutine "select_msgs" does not end with "return" at line 3722, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Reused variable name in lexical scope: $total_bytes_transferred at line 4020, column 9. Invent unique variable names. (Severity: 3)
|
Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3861, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Reused variable name in lexical scope: $maxbytespersecond at line 4020, column 9. Invent unique variable names. (Severity: 3)
|
Subroutine "copy_message" with high complexity score (25) at line 3938, column 1. Consider refactoring. (Severity: 3)
|
||||||
Mismatched operator at line 4508, column 75. Numeric/string operators and operands should match. (Severity: 3)
|
Too many arguments at line 3938, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Hard tabs used at line 4592, column 10. See page 20 of PBP. (Severity: 3)
|
Too many arguments at line 4016, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Expression form of "eval" at line 4866, column 13. See page 161 of PBP. (Severity: 5)
|
Too many arguments at line 4050, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Too many arguments at line 5022, column 1. See page 182 of PBP. (Severity: 3)
|
Subroutine "tests_subject" does not end with "return" at line 4177, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Backtick operator used at line 5335, column 12. Use IPC::Open3 instead. (Severity: 3)
|
Too many arguments at line 4240, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
Backtick operator used at line 5355, column 11. Use IPC::Open3 instead. (Severity: 3)
|
Subroutine "sleep_if_needed" does not end with "return" at line 4299, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
Expression form of "eval" at line 5656, column 43. See page 161 of PBP. (Severity: 5)
|
Reused variable name in lexical scope: $total_bytes_transferred at line 4300, column 2. Invent unique variable names. (Severity: 3)
|
||||||
Expression form of "eval" at line 5660, column 45. See page 161 of PBP. (Severity: 5)
|
Reused variable name in lexical scope: $nb_msg_transferred at line 4300, column 2. Invent unique variable names. (Severity: 3)
|
||||||
"$i" is declared but not used at line 5924, column 9. Unused variables clutter code and make it harder to read. (Severity: 3)
|
Reused variable name in lexical scope: $nb_msg_transferred at line 4312, column 9. Invent unique variable names. (Severity: 3)
|
||||||
Reused variable name in lexical scope: $logfile at line 5976, column 2. Invent unique variable names. (Severity: 3)
|
Reused variable name in lexical scope: $maxmessagespersecond at line 4312, column 9. Invent unique variable names. (Severity: 3)
|
||||||
Subroutine "teelaunch" does not end with "return" at line 5983, column 1. See page 197 of PBP. (Severity: 4)
|
Reused variable name in lexical scope: $total_bytes_transferred at line 4333, column 9. Invent unique variable names. (Severity: 3)
|
||||||
Reused variable name in lexical scope: $logfile at line 5984, column 2. Invent unique variable names. (Severity: 3)
|
Reused variable name in lexical scope: $maxbytespersecond at line 4333, column 9. Invent unique variable names. (Severity: 3)
|
||||||
Close filehandles as soon as possible after opening them at line 5987, column 2. See page 209 of PBP. (Severity: 4)
|
Hard tabs used at line 4918, column 10. See page 20 of PBP. (Severity: 3)
|
||||||
"die" used instead of "croak" at line 5988, column 7. See page 283 of PBP. (Severity: 3)
|
Expression form of "eval" at line 5522, column 13. See page 161 of PBP. (Severity: 5)
|
||||||
Magic variable "*STDERR" should be assigned as "local" at line 5990, column 10. See pages 81,82 of PBP. (Severity: 4)
|
Regular expression without "/x" flag at line 5757, column 22. See page 236 of PBP. (Severity: 3)
|
||||||
One-argument "select" used at line 5991, column 2. See page 224 of PBP. (Severity: 4)
|
Expression form of "eval" at line 5762, column 13. See page 161 of PBP. (Severity: 5)
|
||||||
|
Too many arguments at line 5926, column 1. See page 182 of PBP. (Severity: 3)
|
||||||
|
Always unpack @_ first at line 6088, column 1. See page 178 of PBP. (Severity: 4)
|
||||||
|
Backtick operator used at line 6095, column 4. Use IPC::Open3 instead. (Severity: 3)
|
||||||
|
Subroutine "tests_pipemess" does not end with "return" at line 6112, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
|
Backtick operator used at line 6301, column 12. Use IPC::Open3 instead. (Severity: 3)
|
||||||
|
Backtick operator used at line 6321, column 11. Use IPC::Open3 instead. (Severity: 3)
|
||||||
|
Split long regexps into smaller qr// chunks at line 6459, column 12. See page 261 of PBP. (Severity: 3)
|
||||||
|
Split long regexps into smaller qr// chunks at line 6485, column 12. See page 261 of PBP. (Severity: 3)
|
||||||
|
Split long regexps into smaller qr// chunks at line 6514, column 12. See page 261 of PBP. (Severity: 3)
|
||||||
|
Split long regexps into smaller qr// chunks at line 6526, column 12. See page 261 of PBP. (Severity: 3)
|
||||||
|
Expression form of "eval" at line 6632, column 43. See page 161 of PBP. (Severity: 5)
|
||||||
|
Expression form of "eval" at line 6636, column 45. See page 161 of PBP. (Severity: 5)
|
||||||
|
Split long regexps into smaller qr// chunks at line 6841, column 20. See page 261 of PBP. (Severity: 3)
|
||||||
|
"$i" is declared but not used at line 6900, column 9. Unused variables clutter code and make it harder to read. (Severity: 3)
|
||||||
|
Magic variable "$ENV" should be assigned as "local" at line 6947, column 12. See pages 81,82 of PBP. (Severity: 4)
|
||||||
|
Magic variable "$ENV" should be assigned as "local" at line 6955, column 12. See pages 81,82 of PBP. (Severity: 4)
|
||||||
|
Test without a label at line 6962, column 2. Add a label argument to all Test::More functions. (Severity: 3)
|
||||||
|
Test without a label at line 6963, column 2. Add a label argument to all Test::More functions. (Severity: 3)
|
||||||
|
Reused variable name in lexical scope: $logfile at line 6968, column 2. Invent unique variable names. (Severity: 3)
|
||||||
|
Subroutine "teelaunch" does not end with "return" at line 6975, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
|
Reused variable name in lexical scope: $logfile at line 6976, column 2. Invent unique variable names. (Severity: 3)
|
||||||
|
Close filehandles as soon as possible after opening them at line 6979, column 2. See page 209 of PBP. (Severity: 4)
|
||||||
|
"die" used instead of "croak" at line 6980, column 7. See page 283 of PBP. (Severity: 3)
|
||||||
|
Magic variable "*STDERR" should be assigned as "local" at line 6982, column 10. See pages 81,82 of PBP. (Severity: 4)
|
||||||
|
One-argument "select" used at line 6983, column 2. See page 224 of PBP. (Severity: 4)
|
||||||
|
Subroutine "testslive" does not end with "return" at line 7462, column 1. See page 197 of PBP. (Severity: 4)
|
||||||
|
Return value of eval not tested at line 7484, column 17. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
|
||||||
|
Return value of eval not tested at line 7523, column 17. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
|
||||||
|
|
29
W/prereq.Ubuntu
Normal file
29
W/prereq.Ubuntu
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
$SHELL says /bin/bash
|
||||||
|
$0 gives ./INSTALL.d/prerequisites_imapsync
|
||||||
|
ps -ef gives gilles 14968 14967 0 04:58 pts/13 00:00:00 /bin/sh ./INSTALL.d/prerequisites_imapsync
|
||||||
|
Distributor ID: Ubuntu
|
||||||
|
Description: Ubuntu 12.04.5 LTS
|
||||||
|
Release: 12.04
|
||||||
|
Codename: precise
|
||||||
|
Linux petite 3.2.0-77-generic #114-Ubuntu SMP Tue Mar 10 17:25:28 UTC 2015 i686 i686 i386 GNU/Linux
|
||||||
|
Ok: Found Perl 5.14.2
|
||||||
|
Ok: Found Perl module Digest::HMAC_MD5
|
||||||
|
Ok: Found Perl module Authen::NTLM
|
||||||
|
Ok: Found Perl module Compress::Zlib
|
||||||
|
Ok: Found Perl module Data::Dumper
|
||||||
|
Ok: Found Perl module Data::Uniqid
|
||||||
|
Ok: Found Perl module Digest::HMAC
|
||||||
|
Ok: Found Perl module Digest::MD5
|
||||||
|
Ok: Found Perl module File::Copy::Recursive
|
||||||
|
Ok: Found Perl module IO::Socket::INET
|
||||||
|
Ok: Found Perl module IO::Socket::INET6
|
||||||
|
Ok: Found Perl module IO::Socket::SSL
|
||||||
|
Ok: Found Perl module IO::Tee
|
||||||
|
Ok: Found Perl module Mail::IMAPClient
|
||||||
|
Ok: Found Perl module Parse::RecDescent
|
||||||
|
Ok: Found Perl module Term::ReadKey
|
||||||
|
Ok: Found Perl module Test::More
|
||||||
|
Ok: Found Perl module Test::Pod
|
||||||
|
Ok: Found Perl module Unicode::String
|
||||||
|
Ok: Found Perl module URI::Escape
|
||||||
|
All needed modules are already installed
|
426
W/prereq.scandeps
Normal file
426
W/prereq.scandeps
Normal file
|
@ -0,0 +1,426 @@
|
||||||
|
|
||||||
|
usage: imapsync [options]
|
||||||
|
|
||||||
|
Several options are mandatory.
|
||||||
|
|
||||||
|
--dry : Makes imapsync doing nothing, just print what would
|
||||||
|
be done without --dry.
|
||||||
|
|
||||||
|
--host1 <string> : Source or "from" imap server. Mandatory.
|
||||||
|
--port1 <int> : Port to connect on host1. Default is 143, 993 if --ssl1
|
||||||
|
--user1 <string> : User to login on host1. Mandatory.
|
||||||
|
--showpasswords : Shows passwords on output instead of "MASKED".
|
||||||
|
Useful to restart a complete run by just reading the log.
|
||||||
|
--password1 <string> : Password for the user1.
|
||||||
|
--host2 <string> : "destination" imap server. Mandatory.
|
||||||
|
--port2 <int> : Port to connect on host2. Default is 143, 993 if --ssl2
|
||||||
|
--user2 <string> : User to login on host2. Mandatory.
|
||||||
|
--password2 <string> : Password for the user2.
|
||||||
|
|
||||||
|
--passfile1 <string> : Password file for the user1. It must contain the
|
||||||
|
password on the first line. This option avoids to show
|
||||||
|
the password on the command line like --password1 does.
|
||||||
|
--passfile2 <string> : Password file for the user2. Contains the password.
|
||||||
|
|
||||||
|
--ssl1 : Use a SSL connection on host1.
|
||||||
|
--ssl2 : Use a SSL connection on host2.
|
||||||
|
--tls1 : Use a TLS connection on host1.
|
||||||
|
--tls2 : Use a TLS connection on host2.
|
||||||
|
--timeout <int> : Connections timeout in seconds. Default is 120.
|
||||||
|
0 means no timeout.
|
||||||
|
|
||||||
|
--authmech1 <string> : Auth mechanism to use with host1:
|
||||||
|
PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE.
|
||||||
|
--authmech2 <string> : Auth mechanism to use with host2. See --authmech1
|
||||||
|
|
||||||
|
--authuser1 <string> : User to auth with on host1 (admin user).
|
||||||
|
Avoid using --authmech1 SOMETHING with --authuser1.
|
||||||
|
--authuser2 <string> : User to auth with on host2 (admin user).
|
||||||
|
--proxyauth1 : Use proxyauth on host1. Requires --authuser1.
|
||||||
|
Required by Sun/iPlanet/Netscape IMAP servers to
|
||||||
|
be able to use an administrative user.
|
||||||
|
--proxyauth2 : Use proxyauth on host2. Requires --authuser2.
|
||||||
|
|
||||||
|
--authmd51 : Use MD5 authentification for host1.
|
||||||
|
--authmd52 : Use MD5 authentification for host2.
|
||||||
|
--domain1 <string> : Domain on host1 (NTLM authentication).
|
||||||
|
--domain2 <string> : Domain on host2 (NTLM authentication).
|
||||||
|
|
||||||
|
|
||||||
|
--folder <string> : Sync this folder.
|
||||||
|
--folder <string> : and this one, etc.
|
||||||
|
--folderrec <string> : Sync this folder recursively.
|
||||||
|
--folderrec <string> : and this one, etc.
|
||||||
|
|
||||||
|
--folderfirst <string> : Sync this folder first. --folderfirst "Work"
|
||||||
|
--folderfirst <string> : then this one, etc.
|
||||||
|
--folderlast <string> : Sync this folder last. --folderlast "[Gmail]/All Mail"
|
||||||
|
--folderlast <string> : then this one, etc.
|
||||||
|
|
||||||
|
--nomixfolders : Do not merge folders when host1 is case sensitive
|
||||||
|
while host2 is not (like Exchange). Only the first
|
||||||
|
similar folder is synced (ex: Sent SENT sent -> Sent).
|
||||||
|
|
||||||
|
--skipemptyfolders : Empty host1 folders are not created on host2.
|
||||||
|
|
||||||
|
--include <regex> : Sync folders matching this regular expression
|
||||||
|
--include <regex> : or this one, etc.
|
||||||
|
in case both --include --exclude options are
|
||||||
|
use, include is done before.
|
||||||
|
--exclude <regex> : Skips folders matching this regular expression
|
||||||
|
Several folders to avoid:
|
||||||
|
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
|
||||||
|
--exclude <regex> : or this one, etc.
|
||||||
|
|
||||||
|
--regextrans2 <regex> : Apply the whole regex to each destination folders.
|
||||||
|
--regextrans2 <regex> : and this one. etc.
|
||||||
|
When you play with the --regextrans2 option, first
|
||||||
|
add also the safe options --dry --justfolders
|
||||||
|
Then, when happy, remove --dry, remove --justfolders.
|
||||||
|
Have in mind that --regextrans2 is applied after prefix
|
||||||
|
and separator inversion.
|
||||||
|
|
||||||
|
--tmpdir <string> : Where to store temporary files and subdirectories.
|
||||||
|
Will be created if it doesn't exist.
|
||||||
|
Default is system specific, Unix is /tmp but
|
||||||
|
it's often small and deleted at reboot.
|
||||||
|
--tmpdir /var/tmp should be better.
|
||||||
|
--pidfile <string> : The file where imapsync pid is written.
|
||||||
|
--pidfilelocking : Abort if pidfile already exists. Usefull to avoid
|
||||||
|
concurrent transfers on the same mailbox.
|
||||||
|
|
||||||
|
--nolog : Turn off logging on file
|
||||||
|
--logfile <string> : Change the default logfile pathname and filename.
|
||||||
|
|
||||||
|
--prefix1 <string> : Remove prefix to all destination folders
|
||||||
|
(usually INBOX. or INBOX/ or an empty string "")
|
||||||
|
you have to use --prefix1 if host1 imap server
|
||||||
|
does not have NAMESPACE capability, all other
|
||||||
|
cases are bad.
|
||||||
|
--prefix2 <string> : Add prefix to all host2 folders. See --prefix1
|
||||||
|
--sep1 <string> : Host1 separator in case NAMESPACE is not supported.
|
||||||
|
--sep2 <string> : Host2 separator in case NAMESPACE is not supported.
|
||||||
|
|
||||||
|
--skipmess <regex> : Skips messages maching the regex.
|
||||||
|
Example: 'm/[\x80-ff]/' # to avoid 8bits messages.
|
||||||
|
--skipmess is applied before --regexmess
|
||||||
|
--skipmess <regex> : or this one, etc.
|
||||||
|
|
||||||
|
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
|
||||||
|
|
||||||
|
--regexmess <regex> : Apply the whole regex to each message before transfer.
|
||||||
|
Example: 's/\000/ /g' # to replace null by space.
|
||||||
|
--regexmess <regex> : and this one, etc.
|
||||||
|
|
||||||
|
--regexflag <regex> : Apply the whole regex to each flags list.
|
||||||
|
Example: 's/"Junk"//g' # to remove "Junk" flag.
|
||||||
|
--regexflag <regex> : and this one, etc.
|
||||||
|
|
||||||
|
--delete : Deletes messages on host1 server after a successful
|
||||||
|
transfer. Option --delete has the following behavior:
|
||||||
|
it marks messages as deleted with the IMAP flag
|
||||||
|
\Deleted, then messages are really deleted with an
|
||||||
|
EXPUNGE IMAP command.
|
||||||
|
|
||||||
|
--delete2 : Delete messages in host2 that are not in
|
||||||
|
host1 server. Useful for backup or pre-sync.
|
||||||
|
--delete2duplicates : Delete messages in host2 that are duplicates.
|
||||||
|
Works only without --useuid since duplicates are
|
||||||
|
detected with an header part of each message.
|
||||||
|
|
||||||
|
--delete2folders : Delete folders in host2 that are not in host1 server.
|
||||||
|
For safety, first try it like this (it is safe):
|
||||||
|
--delete2folders --dry --justfolders --nofoldersizes
|
||||||
|
--delete2foldersonly <regex>: Deleted only folders matching regex.
|
||||||
|
Example: --delete2foldersonly "/^Junk$|^INBOX.Junk$/"
|
||||||
|
--delete2foldersbutnot <regex>: Do not delete folders matching regex.
|
||||||
|
Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/"
|
||||||
|
--noexpunge : Do not expunge messages on host1.
|
||||||
|
Expunge really deletes messages marked deleted.
|
||||||
|
Expunge is made at the beginning, on host1 only.
|
||||||
|
Newly transferred messages are also expunged if
|
||||||
|
option --delete is given.
|
||||||
|
No expunge is done on host2 account (unless --expunge2)
|
||||||
|
--expunge1 : Expunge messages on host1 after messages transfer.
|
||||||
|
--expunge2 : Expunge messages on host2 after messages transfer.
|
||||||
|
--uidexpunge2 : uidexpunge messages on the host2 account
|
||||||
|
that are not on the host1 account, requires --delete2
|
||||||
|
--nomixfolders : Avoid merging folders that are considered different on
|
||||||
|
host1 but the same on destination host2 because of
|
||||||
|
case sensitivities and insensitivities.
|
||||||
|
|
||||||
|
--syncinternaldates : Sets the internal dates on host2 same as host1.
|
||||||
|
Turned on by default. Internal date is the date
|
||||||
|
a message arrived on a host (mtime).
|
||||||
|
--idatefromheader : Sets the internal dates on host2 same as the
|
||||||
|
"Date:" headers.
|
||||||
|
|
||||||
|
--maxsize <int> : Skip messages larger (or equal) than <int> bytes
|
||||||
|
--minsize <int> : Skip messages smaller (or equal) than <int> bytes
|
||||||
|
--maxage <int> : Skip messages older than <int> days.
|
||||||
|
final stats (skipped) don't count older messages
|
||||||
|
see also --minage
|
||||||
|
--minage <int> : Skip messages newer than <int> days.
|
||||||
|
final stats (skipped) don't count newer messages
|
||||||
|
You can do (+ are the messages selected):
|
||||||
|
past|----maxage+++++++++++++++>now
|
||||||
|
past|+++++++++++++++minage---->now
|
||||||
|
past|----maxage+++++minage---->now (intersection)
|
||||||
|
past|++++minage-----maxage++++>now (union)
|
||||||
|
|
||||||
|
--search <string> : Selects only messages returned by this IMAP SEARCH
|
||||||
|
command. Applied on both sides.
|
||||||
|
--search1 <string> : Same as --search for selecting host1 messages only.
|
||||||
|
--search2 <string> : Same as --search for selecting host2 messages only.
|
||||||
|
--search CRIT equals --search1 CRIT --search2 CRIT
|
||||||
|
|
||||||
|
--exitwhenover <int> : Stop syncing when total bytes transferred reached.
|
||||||
|
Gmail per day allows 2500000000 down 500000000 upload.
|
||||||
|
|
||||||
|
--maxlinelength <int> : skip messages with a line length longer than <int> bytes.
|
||||||
|
RFC 2822 says it must be no more than 1000 bytes.
|
||||||
|
|
||||||
|
--useheader <string> : Use this header to compare messages on both sides.
|
||||||
|
Ex: Message-ID or Subject or Date.
|
||||||
|
--useheader <string> and this one, etc.
|
||||||
|
|
||||||
|
--subscribed : Transfers subscribed folders.
|
||||||
|
--subscribe : Subscribe to the folders transferred on the
|
||||||
|
host2 that are subscribed on host1. On by default.
|
||||||
|
--subscribeall : Subscribe to the folders transferred on the
|
||||||
|
host2 even if they are not subscribed on host1.
|
||||||
|
|
||||||
|
--nofoldersizes : Do not calculate the size of each folder in bytes
|
||||||
|
and message counts. Default is to calculate them.
|
||||||
|
--nofoldersizesatend : Do not calculate the size of each folder in bytes
|
||||||
|
and message counts at the end. Default is on.
|
||||||
|
--justfoldersizes : Exit after having printed the folder sizes.
|
||||||
|
|
||||||
|
--syncacls : Synchronises acls (Access Control Lists).
|
||||||
|
--nosyncacls : Does not synchronize acls. This is the default.
|
||||||
|
Acls in IMAP are not standardized, be careful.
|
||||||
|
|
||||||
|
--usecache : Use cache to speedup.
|
||||||
|
--nousecache : Do not use cache. Caveat: --useuid --nousecache creates
|
||||||
|
duplicates on multiple runs.
|
||||||
|
--useuid : Use uid instead of header as a criterium to recognize
|
||||||
|
messages. Option --usecache is then implied unless
|
||||||
|
--nousecache is used.
|
||||||
|
|
||||||
|
--debug : Debug mode.
|
||||||
|
--debugcontent : Debug content of the messages transfered.
|
||||||
|
--debugflags : Debug flags.
|
||||||
|
--debugimap1 : IMAP debug mode for host1. imap debug is very verbose.
|
||||||
|
--debugimap2 : IMAP debug mode for host2.
|
||||||
|
--debugimap : IMAP debug mode for host1 and host2.
|
||||||
|
|
||||||
|
--tests : Run non-regression tests.
|
||||||
|
--testslive : Run a live test with test1.lamiral.info imap server.
|
||||||
|
Useful to check the basics. Needs internet connexion.
|
||||||
|
|
||||||
|
--version : Print software version.
|
||||||
|
--noreleasecheck : Do not check for new imapsync release (a http request).
|
||||||
|
--releasecheck : Check for new imapsync release (a http request).
|
||||||
|
--justconnect : Just connect to both servers and print useful
|
||||||
|
information. Need only --host1 and --host2 options.
|
||||||
|
--justlogin : Just login to both host1 and host2 with users
|
||||||
|
credentials, then exit.
|
||||||
|
--justfolders : Do only things about folders (ignore messages).
|
||||||
|
|
||||||
|
--help : print this help.
|
||||||
|
|
||||||
|
Example: to synchronize imap account "test1" on "test1.lamiral.info"
|
||||||
|
to imap account "test2" on "test2.lamiral.info"
|
||||||
|
with test1 password "secret1"
|
||||||
|
and test2 password "secret2"
|
||||||
|
|
||||||
|
imapsync \
|
||||||
|
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
|
||||||
|
--host2 test2.lamiral.info --user2 test2 --password2 secret2
|
||||||
|
|
||||||
|
Here is a [linux] system (Linux petite 3.2.0-77-generic #114-Ubuntu SMP Tue Mar 10 17:25:28 UTC 2015 i686)
|
||||||
|
With perl 5.14.2 Mail::IMAPClient 3.30
|
||||||
|
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
|
||||||
|
This current imapsync is up to date
|
||||||
|
|
||||||
|
Homepage: http://imapsync.lamiral.info/
|
||||||
|
|
||||||
|
'Tie::Hash::NamedCapture' => '0.08',
|
||||||
|
'Authen::NTLM::DES' => '1.02',
|
||||||
|
'Authen::NTLM::MD4' => '1.02',
|
||||||
|
'IO::Compress::Gzip' => '2.048',
|
||||||
|
'IO::Uncompress::Gunzip' => '2.048',
|
||||||
|
'IO::Compress::Gzip::Constants' => '2.048',
|
||||||
|
'IO::Compress::Base::Common' => '2.048',
|
||||||
|
'Compress::Raw::Zlib' => '2.048',
|
||||||
|
'Convert::ASN1::IO' => 'undef',
|
||||||
|
'Convert::ASN1::_decode' => 'undef',
|
||||||
|
'Convert::ASN1::_encode' => 'undef',
|
||||||
|
'Convert::ASN1::parser' => 'undef',
|
||||||
|
'Crypt::SSLeay::X509' => 'undef',
|
||||||
|
'Crypt::SSLeay::CTX' => 'undef',
|
||||||
|
'Digest::HMAC' => '1.03',
|
||||||
|
'Cwd' => '3.33',
|
||||||
|
'HTML::Parser' => '3.69',
|
||||||
|
'HTTP::Cookies::Netscape' => '6.00',
|
||||||
|
'Time::Zone' => '2.24',
|
||||||
|
'IO::Compress::Bzip2' => '2.048',
|
||||||
|
'IO::Compress::Deflate' => '2.048',
|
||||||
|
'IO::Uncompress::Bunzip2' => '2.048',
|
||||||
|
'IO::Uncompress::Inflate' => '2.048',
|
||||||
|
'IO::Uncompress::RawInflate' => '2.048',
|
||||||
|
'HTTP::Message' => '6.01',
|
||||||
|
'Compress::Raw::Bzip2' => '2.048',
|
||||||
|
'File::GlobMapper' => '1.000',
|
||||||
|
'IO::Compress::Base' => '2.048',
|
||||||
|
'IO::Compress::Adapter::Bzip2' => '2.048',
|
||||||
|
'IO::Compress::RawDeflate' => '2.048',
|
||||||
|
'IO::Compress::Adapter::Deflate' => '2.048',
|
||||||
|
'IO::Compress::Zlib::Extra' => '2.048',
|
||||||
|
'Socket6' => '0.23',
|
||||||
|
'IO::Socket::INET6' => '2.69',
|
||||||
|
'Net::SSLeay' => '1.42',
|
||||||
|
'IO::Uncompress::Adapter::Bunzip2' => '2.048',
|
||||||
|
'IO::Uncompress::Base' => '2.048',
|
||||||
|
'IO::Compress::Zlib::Constants' => '2.048',
|
||||||
|
'IO::Uncompress::Adapter::Inflate' => '2.048',
|
||||||
|
'common::sense' => '3.4',
|
||||||
|
'Authen::NTLM' => '1.09',
|
||||||
|
'CPAN::Config' => 'undef',
|
||||||
|
'URI::data' => 'undef',
|
||||||
|
'URI::_idna' => 'undef',
|
||||||
|
'URI::mailto' => 'undef',
|
||||||
|
'URI::_query' => 'undef',
|
||||||
|
'URI::QueryParam' => 'undef',
|
||||||
|
'URI::Split' => 'undef',
|
||||||
|
'URI::_foreign' => 'undef',
|
||||||
|
'URI::_segment' => 'undef',
|
||||||
|
'URI::file::FAT' => 'undef',
|
||||||
|
'URI::file::Mac' => 'undef',
|
||||||
|
'URI::file::OS2' => 'undef',
|
||||||
|
'URI::file::QNX' => 'undef',
|
||||||
|
'URI::ftp' => 'undef',
|
||||||
|
'URI::gopher' => 'undef',
|
||||||
|
'URI::https' => 'undef',
|
||||||
|
'URI::ldapi' => 'undef',
|
||||||
|
'URI::ldaps' => 'undef',
|
||||||
|
'URI::mms' => 'undef',
|
||||||
|
'URI::nntp' => 'undef',
|
||||||
|
'URI::pop' => 'undef',
|
||||||
|
'URI::rlogin' => 'undef',
|
||||||
|
'URI::rsync' => 'undef',
|
||||||
|
'URI::rtspu' => 'undef',
|
||||||
|
'URI::sips' => 'undef',
|
||||||
|
'URI::snews' => 'undef',
|
||||||
|
'URI::ssh' => 'undef',
|
||||||
|
'URI::telnet' => 'undef',
|
||||||
|
'URI::tn3270' => 'undef',
|
||||||
|
'URI::file::Win32' => 'undef',
|
||||||
|
'URI::file::Unix' => 'undef',
|
||||||
|
'URI::file::Base' => 'undef',
|
||||||
|
'URI::_punycode' => '0.04',
|
||||||
|
'URI::IRI' => 'undef',
|
||||||
|
'URI::_ldap' => '1.12',
|
||||||
|
'URI::ldap' => '1.12',
|
||||||
|
'URI::news' => 'undef',
|
||||||
|
'URI::rtsp' => 'undef',
|
||||||
|
'URI::Heuristic' => '4.20',
|
||||||
|
'URI::_userpass' => 'undef',
|
||||||
|
'URI::sip' => '0.11',
|
||||||
|
'URI::_login' => 'undef',
|
||||||
|
'URI::_generic' => 'undef',
|
||||||
|
'URI' => '1.59',
|
||||||
|
'URI::_server' => 'undef',
|
||||||
|
'File::Listing' => '6.03',
|
||||||
|
'HTTP::Status' => '6.00',
|
||||||
|
'LWP::MediaTypes' => '6.01',
|
||||||
|
'HTTP::Negotiate' => '6.00',
|
||||||
|
'Net::HTTP' => '6.02',
|
||||||
|
'Net::HTTPS' => '6.02',
|
||||||
|
'LWP::Debug' => 'undef',
|
||||||
|
'Net::LDAP' => '0.43',
|
||||||
|
'Net::LDAP::LDIF' => '0.18',
|
||||||
|
'Mail::Internet' => '2.08',
|
||||||
|
'HTML::HeadParser' => '3.69',
|
||||||
|
'HTTP::Config' => '6.00',
|
||||||
|
'HTTP::Request::Common' => '6.00',
|
||||||
|
'LWP::ConnCache' => '6.02',
|
||||||
|
'HTTP::Headers' => '6.00',
|
||||||
|
'HTTP::Cookies' => '6.00',
|
||||||
|
'Encode::Locale' => '1.02',
|
||||||
|
'HTTP::Headers::Util' => '6.00',
|
||||||
|
'LWP::MemberMixin' => 'undef',
|
||||||
|
'LWP' => '6.03',
|
||||||
|
'HTTP::Date' => '6.00',
|
||||||
|
'HTTP::Request' => '6.00',
|
||||||
|
'LWP::Protocol' => '6.00',
|
||||||
|
'HTTP::Response' => '6.01',
|
||||||
|
'Compress::Zlib' => '2.048',
|
||||||
|
'Mail::IMAPClient::MessageSet' => 'undef',
|
||||||
|
'Digest::HMAC_MD5' => '1.01',
|
||||||
|
'Mail::Address' => '2.08',
|
||||||
|
'Mail::Header' => '2.08',
|
||||||
|
'Mail::Mailer' => '2.08',
|
||||||
|
'Mail::Util' => '2.08',
|
||||||
|
'Net::HTTP::Methods' => '6.00',
|
||||||
|
'Net::SSL' => '2.84',
|
||||||
|
'Net::LDAP::Bind' => '1.03',
|
||||||
|
'Net::LDAP::Extension' => '1.02',
|
||||||
|
'Net::LDAP::RootDSE' => '0.01',
|
||||||
|
'Net::LDAP::Schema' => '0.9905',
|
||||||
|
'Net::LDAP::Search' => '0.13',
|
||||||
|
'Convert::ASN1::Debug' => 'undef',
|
||||||
|
'Convert::ASN1' => '0.22',
|
||||||
|
'Net::LDAP::Entry' => '0.24',
|
||||||
|
'Net::LDAP::ASN' => '0.08',
|
||||||
|
'Net::LDAP::Constant' => '0.08',
|
||||||
|
'Net::LDAP::Filter' => '0.15',
|
||||||
|
'Net::LDAP::Message' => '1.11',
|
||||||
|
'Net::LDAP::Util' => '0.11',
|
||||||
|
'Net::LDAP::Control' => '0.09',
|
||||||
|
'Net::LDAP::Intermediate' => '0.02',
|
||||||
|
'Crypt::SSLeay::Conn' => 'undef',
|
||||||
|
'Crypt::SSLeay::Err' => 'undef',
|
||||||
|
'Crypt::SSLeay::MainContext' => 'undef',
|
||||||
|
'Crypt::SSLeay' => '0.57',
|
||||||
|
'Test::Builder::IO::Scalar' => '2.110',
|
||||||
|
'threads::shared' => '1.40',
|
||||||
|
'Test::Builder' => '0.98',
|
||||||
|
'Test::Builder::Module' => '0.98',
|
||||||
|
'URI::WithBase' => '2.20',
|
||||||
|
'URI::file' => '4.21',
|
||||||
|
'Unicode::CharName' => '1.07',
|
||||||
|
'Data::Uniqid' => '0.12',
|
||||||
|
'Digest::HMAC_SHA1' => '1.03',
|
||||||
|
'File::Copy::Recursive' => '0.38',
|
||||||
|
'IO::Tee' => '0.64',
|
||||||
|
'JSON::XS::Boolean' => 'undef',
|
||||||
|
'Term::ReadKey' => '2.30',
|
||||||
|
'Test::More' => '0.98',
|
||||||
|
'Unicode::String' => '2.09',
|
||||||
|
'File::Spec::Unix' => '3.33',
|
||||||
|
'File::Spec' => '3.33',
|
||||||
|
'JSON::XS' => '2.32',
|
||||||
|
'LWP::UserAgent' => '6.03',
|
||||||
|
'HTML::Entities' => '3.69',
|
||||||
|
'LWP::Authen::Digest' => 'undef',
|
||||||
|
'LWP::Authen::Ntlm' => '6.00',
|
||||||
|
'LWP::Protocol::GHTTP' => 'undef',
|
||||||
|
'LWP::Protocol::cpan' => 'undef',
|
||||||
|
'LWP::Protocol::data' => 'undef',
|
||||||
|
'LWP::Protocol::file' => 'undef',
|
||||||
|
'LWP::Protocol::ftp' => 'undef',
|
||||||
|
'LWP::Protocol::gopher' => 'undef',
|
||||||
|
'LWP::Protocol::https' => '6.02',
|
||||||
|
'LWP::Protocol::ldaps' => 'undef',
|
||||||
|
'LWP::Protocol::loopback' => 'undef',
|
||||||
|
'LWP::Protocol::mailto' => 'undef',
|
||||||
|
'LWP::Protocol::nntp' => 'undef',
|
||||||
|
'LWP::Protocol::nogo' => 'undef',
|
||||||
|
'LWP::Authen::Basic' => 'undef',
|
||||||
|
'URI::http' => 'undef',
|
||||||
|
'URI::URL' => '5.04',
|
||||||
|
'LWP::Protocol::http' => 'undef',
|
||||||
|
'LWP::Protocol::ldap' => '1.11',
|
||||||
|
'IO::Socket::SSL' => '1.53',
|
||||||
|
'URI::Escape' => '3.31',
|
|
@ -25,6 +25,11 @@ body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#right-tronche {
|
||||||
|
float: right;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
div.center {
|
div.center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -48,4 +53,4 @@ img {
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* $Id: style.css,v 1.5 2014/07/31 03:33:43 gilles Exp gilles $ */
|
/* $Id: style.css,v 1.6 2015/03/03 11:24:45 gilles Exp gilles $ */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
REM $Id: test.bat,v 1.11 2014/05/22 10:15:45 gilles Exp gilles $
|
REM $Id: test.bat,v 1.12 2015/03/15 04:04:11 gilles Exp gilles $
|
||||||
|
|
||||||
cd /D %~dp0
|
cd /D %~dp0
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL ^
|
||||||
-mData::Uniqid -mURI::Escape -mIO::Tee ""
|
-mData::Uniqid -mURI::Escape -mIO::Tee ""
|
||||||
|
|
||||||
perl ./imapsync
|
perl ./imapsync
|
||||||
|
@REM perl ./imapsync --tests
|
||||||
|
|
||||||
@ECHO ==== All 8 combinaisons between ssl1/tls1 ssl2/tls2 justconnect/justlogin
|
@ECHO ==== All 8 combinaisons between ssl1/tls1 ssl2/tls2 justconnect/justlogin
|
||||||
|
|
||||||
|
|
17
W/test3.bat
17
W/test3.bat
|
@ -1,15 +1,24 @@
|
||||||
|
|
||||||
@REM $Id: test3.bat,v 1.16 2014/11/14 17:09:50 gilles Exp gilles $
|
@REM $Id: test3.bat,v 1.19 2015/03/15 03:02:58 gilles Exp gilles $
|
||||||
cd /D %~dp0
|
cd /D %~dp0
|
||||||
|
|
||||||
@REM \$1 must be $1 on Windows
|
@REM \$1 must be $1 on Windows
|
||||||
@REM .\imapsync.exe --host1 ex-cashub1.caltech.edu --justconnect --host2 ex-cashub1.caltech.edu --ssl1 --ssl2 --ssl1_SSL_version SSLv3 --ssl2_SSL_version SSLv3
|
@REM .\imapsync.exe --host1 ex-cashub1.caltech.edu --justconnect --host2 ex-cashub1.caltech.edu --ssl1 --ssl2 --ssl1_SSL_version SSLv3 --ssl2_SSL_version SSLv3
|
||||||
|
|
||||||
perl .\imapsync --tests_debug
|
@REM perl .\imapsync --tests_debug
|
||||||
|
|
||||||
@REM @EXIT
|
@REM @EXIT
|
||||||
perl .\imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
|
||||||
--foldersizes --usecache --folder "INBOX.[bracket]" --debugcache
|
@REM perl .\imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
||||||
|
@REM --nofoldersizes --regextrans2 "s,INBOX\\yop\\(.*),OLDBOX\\$1," --prefix1 "" --sep1 "." --sep2 "\\" --prefix2 "" --justfolders --dry --debug
|
||||||
|
|
||||||
|
.\imapsync.exe ^
|
||||||
|
--host1 p --user1 tata ^
|
||||||
|
--passfile1 secret.tata ^
|
||||||
|
--host2 imap-mail.outlook.com --ssl2 --user2 gilles.lamiral@outlook.com ^
|
||||||
|
--passfile2 secret.outlook.com ^
|
||||||
|
--folder INBOX --usecache --regextrans2 "s/INBOX/tata/"
|
||||||
|
|
||||||
|
|
||||||
@EXIT
|
@EXIT
|
||||||
|
|
||||||
|
|
11
W/test_cook_exe.bat
Executable file
11
W/test_cook_exe.bat
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
REM $Id: test_exe.bat,v 1.11 2014/05/22 10:13:34 gilles Exp gilles $
|
||||||
|
|
||||||
|
cd /D %~dp0
|
||||||
|
|
||||||
|
@REM EXIT
|
||||||
|
|
||||||
|
.\imapsync.exe
|
||||||
|
.\imapsync.exe --tests
|
||||||
|
.\imapsync.exe --testslive
|
||||||
|
|
||||||
|
@PAUSE
|
11
W/test_cook_src.bat
Executable file
11
W/test_cook_src.bat
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
REM $Id: test_exe.bat,v 1.11 2014/05/22 10:13:34 gilles Exp gilles $
|
||||||
|
|
||||||
|
cd /D %~dp0
|
||||||
|
|
||||||
|
@REM EXIT
|
||||||
|
|
||||||
|
perl .\imapsync
|
||||||
|
perl .\imapsync --tests
|
||||||
|
perl .\imapsync --testslive
|
||||||
|
|
||||||
|
@PAUSE
|
|
@ -1,6 +1,6 @@
|
||||||
@REM
|
@REM
|
||||||
|
|
||||||
@REM $Id: test_exe_2.bat,v 1.5 2014/11/14 17:09:34 gilles Exp gilles $
|
@REM $Id: test_exe_2.bat,v 1.6 2015/03/20 03:11:22 gilles Exp gilles $
|
||||||
|
|
||||||
@REM cd C:\msys\1.0\home\Admin\imapsync
|
@REM cd C:\msys\1.0\home\Admin\imapsync
|
||||||
cd /D %~dp0
|
cd /D %~dp0
|
||||||
|
@ -8,8 +8,11 @@ cd /D %~dp0
|
||||||
@REM imapsync.exe --host1 p --user1 toto --passfile1 secret.toto --host2 p --user2 titi --passfile2 secret.titi
|
@REM imapsync.exe --host1 p --user1 toto --passfile1 secret.toto --host2 p --user2 titi --passfile2 secret.titi
|
||||||
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi
|
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi
|
||||||
|
|
||||||
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
||||||
--foldersizes --usecache --folder "INBOX.[bracket]" --debugcache
|
@REM --foldersizes --usecache --folder "INBOX.[bracket]" --debugcache
|
||||||
|
|
||||||
@REM.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
||||||
@REM --dry --nofoldersizes --regextrans2 "s,(.*),\L$1," --justfolders
|
@REM --dry --nofoldersizes --regextrans2 "s,(.*),\L$1," --justfolders
|
||||||
|
|
||||||
|
@REM .\imapsync.exe --testslive
|
||||||
|
perl .\imapsync --tests
|
||||||
|
|
10
W/test_tests.bat
Executable file
10
W/test_tests.bat
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
@REM
|
||||||
|
|
||||||
|
@REM $Id: test_exe_2.bat,v 1.6 2015/03/20 03:11:22 gilles Exp gilles $
|
||||||
|
|
||||||
|
@REM cd C:\msys\1.0\home\Admin\imapsync
|
||||||
|
cd /D %~dp0
|
||||||
|
|
||||||
|
perl .\imapsync --tests
|
||||||
|
|
||||||
|
@REM @PAUSE
|
|
@ -1 +0,0 @@
|
||||||
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
|
|
|
@ -1 +0,0 @@
|
||||||
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue