mirror of
https://github.com/imapsync/imapsync.git
synced 2025-08-06 00:34:58 +02:00
1.727
This commit is contained in:
parent
3eaac56812
commit
137242e609
114 changed files with 10852 additions and 8980 deletions
|
@ -380,3 +380,64 @@
|
|||
1458206536 END 1.684 : jeudi 17 mars 2016, 10:22:16 (UTC+0100)
|
||||
1458216703 BEGIN 1.684 : jeudi 17 mars 2016, 13:11:43 (UTC+0100)
|
||||
1458217520 END 1.684 : jeudi 17 mars 2016, 13:25:20 (UTC+0100)
|
||||
1458428579 BEGIN 1.684 : dimanche 20 mars 2016, 00:02:59 (UTC+0100)
|
||||
1458428756 END 1.684 : dimanche 20 mars 2016, 00:05:56 (UTC+0100)
|
||||
1458433683 BEGIN 1.684 : dimanche 20 mars 2016, 01:28:03 (UTC+0100)
|
||||
1458434445 END 1.684 : dimanche 20 mars 2016, 01:40:45 (UTC+0100)
|
||||
1458436534 BEGIN 1.684 : dimanche 20 mars 2016, 02:15:34 (UTC+0100)
|
||||
1458437310 END 1.684 : dimanche 20 mars 2016, 02:28:30 (UTC+0100)
|
||||
1463261525 BEGIN 1.690 : samedi 14 mai 2016, 23:32:05 (UTC+0200)
|
||||
1463261701 END 1.690 : samedi 14 mai 2016, 23:35:01 (UTC+0200)
|
||||
1463261777 BEGIN 1.690 : samedi 14 mai 2016, 23:36:17 (UTC+0200)
|
||||
1463262258 END 1.690 : samedi 14 mai 2016, 23:44:18 (UTC+0200)
|
||||
1464194085 BEGIN 1.692 : mercredi 25 mai 2016, 18:34:45 (UTC+0200)
|
||||
1464194868 END 1.692 : mercredi 25 mai 2016, 18:47:49 (UTC+0200)
|
||||
1465431106 BEGIN 1.694 : jeudi 9 juin 2016, 02:11:46 (UTC+0200)
|
||||
1465431905 END 1.694 : jeudi 9 juin 2016, 02:25:05 (UTC+0200)
|
||||
1465864115 BEGIN 1.701 : mardi 14 juin 2016, 02:28:35 (UTC+0200)
|
||||
1465864364 END 1.701 : mardi 14 juin 2016, 02:32:44 (UTC+0200)
|
||||
1465865557 BEGIN 1.701 : mardi 14 juin 2016, 02:52:37 (UTC+0200)
|
||||
1465866291 END 1.701 : mardi 14 juin 2016, 03:04:51 (UTC+0200)
|
||||
1466171000 BEGIN 1.706 : vendredi 17 juin 2016, 15:43:20 (UTC+0200)
|
||||
1466171789 END 1.706 : vendredi 17 juin 2016, 15:56:29 (UTC+0200)
|
||||
1466210899 BEGIN 1.707 : samedi 18 juin 2016, 02:48:19 (UTC+0200)
|
||||
1466211650 END 1.707 : samedi 18 juin 2016, 03:00:50 (UTC+0200)
|
||||
1466610746 BEGIN 1.710 : mercredi 22 juin 2016, 17:52:26 (UTC+0200)
|
||||
1466611426 END 1.710 : mercredi 22 juin 2016, 18:03:46 (UTC+0200)
|
||||
1466627202 BEGIN 1.711 : mercredi 22 juin 2016, 22:26:42 (UTC+0200)
|
||||
1466627955 END 1.711 : mercredi 22 juin 2016, 22:39:15 (UTC+0200)
|
||||
1467069519 BEGIN 1.711 : mardi 28 juin 2016, 01:18:39 (UTC+0200)
|
||||
1467069574 END 1.711 : mardi 28 juin 2016, 01:19:34 (UTC+0200)
|
||||
1467069750 BEGIN 1.711 : mardi 28 juin 2016, 01:22:30 (UTC+0200)
|
||||
1467069794 END 1.711 : mardi 28 juin 2016, 01:23:14 (UTC+0200)
|
||||
1467069926 BEGIN 1.711 : mardi 28 juin 2016, 01:25:26 (UTC+0200)
|
||||
1467070138 BEGIN 1.711 : mardi 28 juin 2016, 01:28:58 (UTC+0200)
|
||||
1467070225 BEGIN 1.711 : mardi 28 juin 2016, 01:30:25 (UTC+0200)
|
||||
1467070345 BEGIN 1.711 : mardi 28 juin 2016, 01:32:25 (UTC+0200)
|
||||
1467070391 BEGIN 1.711 : mardi 28 juin 2016, 01:33:11 (UTC+0200)
|
||||
1467070514 BEGIN 1.711 : mardi 28 juin 2016, 01:35:14 (UTC+0200)
|
||||
1467070588 BEGIN 1.711 : mardi 28 juin 2016, 01:36:28 (UTC+0200)
|
||||
1467070950 BEGIN 1.711 : mardi 28 juin 2016, 01:42:30 (UTC+0200)
|
||||
1467255653 BEGIN 1.712 : jeudi 30 juin 2016, 05:00:53 (UTC+0200)
|
||||
1467255813 END 1.712 : jeudi 30 juin 2016, 05:03:33 (UTC+0200)
|
||||
1467755793 BEGIN 1.715 : mardi 5 juillet 2016, 23:56:34 (UTC+0200)
|
||||
1467756564 END 1.715 : mercredi 6 juillet 2016, 00:09:24 (UTC+0200)
|
||||
1469013686 BEGIN 1.718 : mercredi 20 juillet 2016, 13:21:26 (UTC+0200)
|
||||
1469014489 BEGIN 1.718 : mercredi 20 juillet 2016, 13:34:49 (UTC+0200)
|
||||
1469814584 BEGIN 1.721 : vendredi 29 juillet 2016, 19:49:44 (UTC+0200)
|
||||
1469815484 END 1.721 : vendredi 29 juillet 2016, 20:04:44 (UTC+0200)
|
||||
1469828350 BEGIN 1.722 : vendredi 29 juillet 2016, 23:39:10 (UTC+0200)
|
||||
1469829123 END 1.722 : vendredi 29 juillet 2016, 23:52:03 (UTC+0200)
|
||||
1469831589 BEGIN 1.723 : samedi 30 juillet 2016, 00:33:09 (UTC+0200)
|
||||
1469832393 END 1.723 : samedi 30 juillet 2016, 00:46:33 (UTC+0200)
|
||||
1471305986 BEGIN 1.725 : mardi 16 août 2016, 02:06:26 (UTC+0200)
|
||||
1471306861 END 1.725 : mardi 16 août 2016, 02:21:01 (UTC+0200)
|
||||
1471390396 BEGIN 1.726 : mercredi 17 août 2016, 01:33:16 (UTC+0200)
|
||||
1471391143 END 1.726 : mercredi 17 août 2016, 01:45:43 (UTC+0200)
|
||||
1471399447 BEGIN 1.726 : mercredi 17 août 2016, 04:04:07 (UTC+0200)
|
||||
1471399633 END 1.726 : mercredi 17 août 2016, 04:07:13 (UTC+0200)
|
||||
1471514233 BEGIN 1.726 : jeudi 18 août 2016, 11:57:13 (UTC+0200)
|
||||
1471515101 END 1.726 : jeudi 18 août 2016, 12:11:41 (UTC+0200)
|
||||
1471606171 BEGIN 1.727 : vendredi 19 août 2016, 13:29:31 (UTC+0200)
|
||||
1471616659 BEGIN 1.727 : vendredi 19 août 2016, 16:24:19 (UTC+0200)
|
||||
1471617309 END 1.727 : vendredi 19 août 2016, 16:35:09 (UTC+0200)
|
||||
|
|
0
W/.checklinkext
Normal file
0
W/.checklinkext
Normal file
0
W/.compok
Normal file
0
W/.compok
Normal file
61
W/.tests.errors.txt
Normal file
61
W/.tests.errors.txt
Normal file
|
@ -0,0 +1,61 @@
|
|||
2016_08_16_22_49_23 : FAILED 1/4 TESTS: ll_authmech_xoauth2_json_gmail
|
||||
2016_08_16_22_52_37 : FAILED 1/2 TESTS: ll_authmech_XOAUTH2_json_gmail
|
||||
2016_08_16_22_55_09 : FAILED 1/2 TESTS: ll_authmech_XOAUTH2_gmail
|
||||
2016_08_16_22_56_48 : FAILED 1/2 TESTS: ll_pipemess
|
||||
2016_08_16_23_59_51 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_16_23_59_56 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_17_00_00_27 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_17_00_24_36 : ALL 114 TESTS SUCCESSFUL
|
||||
2016_08_17_00_48_26 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_17_01_20_59 : ALL 114 TESTS SUCCESSFUL
|
||||
2016_08_19_10_22_53 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_10_22_59 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_45_57 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_46_02 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_48_53 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_48_58 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_49_28 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_49_32 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_50_21 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_50_25 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_52_06 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_52_11 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_53_49 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_53_53 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_55_13 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_55_18 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_57_16 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_57_21 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_11_58_33 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_11_58_58 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_12_29_48 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_33_39 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_33_46 : FAILED 1/2 TESTS: ll_ssl_justconnect_SSL_VERIFY_PEER
|
||||
2016_08_19_16_34_36 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_34_41 : FAILED 1/2 TESTS: ll_ssl_justconnect_SSL_VERIFY_PEER
|
||||
2016_08_19_16_38_37 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_38_42 : FAILED 1/2 TESTS: ll_ssl_justconnect_SSL_VERIFY_PEER
|
||||
2016_08_19_16_41_01 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_41_05 : FAILED 1/2 TESTS: ll_ssl_justconnect_SSL_VERIFY_PEER
|
||||
2016_08_19_16_41_27 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_41_32 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_16_42_51 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_42_56 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_16_43_21 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_43_26 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_16_44_25 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_44_29 : FAILED 1/2 TESTS: ll_ssl_justconnect_SSL_VERIFY_PEER
|
||||
2016_08_19_16_50_18 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_50_26 : FAILED 1/2 TESTS: l_office365_justlogin_2
|
||||
2016_08_19_16_51_12 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_52_50 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_52_56 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_16_53_30 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_54_47 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_54_54 : FAILED 1/2 TESTS: l_office365_justconnect_tls_SSL_verify_mode
|
||||
2016_08_19_16_55_13 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_55_19 : FAILED 1/2 TESTS: l_office365_justconnect_tls_SSL_verify_mode
|
||||
2016_08_19_16_55_37 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_16_55_43 : ALL 2 TESTS SUCCESSFUL
|
||||
2016_08_19_19_54_03 : ALL 1 TESTS SUCCESSFUL
|
||||
2016_08_19_20_18_58 : ALL 115 TESTS SUCCESSFUL
|
0
W/.valid.index.shtml
Normal file
0
W/.valid.index.shtml
Normal file
1
W/LOG_bat/learn_func.bat.txt
Normal file
1
W/LOG_bat/learn_func.bat.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Failure running NOEXIST
|
127
W/build_exe.bat
127
W/build_exe.bat
|
@ -1,19 +1,55 @@
|
|||
|
||||
REM $Id: build_exe.bat,v 1.35 2015/12/14 15:15:36 gilles Exp gilles $
|
||||
@ECHO OFF
|
||||
REM $Id: build_exe.bat,v 1.40 2016/08/19 14:12:29 gilles Exp gilles $
|
||||
|
||||
@SETLOCAL
|
||||
ECHO Currently running through %0 %*
|
||||
|
||||
ECHO Building imapsync.exe
|
||||
|
||||
@REM the following command change current directory to the dirname of the current batch pathname
|
||||
CD /D %~dp0
|
||||
|
||||
REM Remove the error file because its existence means an error occured during this script execution
|
||||
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
|
||||
|
||||
|
||||
CALL :handle_error CALL :detect_perl
|
||||
CALL :handle_error CALL :check_modules
|
||||
CALL :handle_error CALL :pp_exe
|
||||
|
||||
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
|
||||
:pp_exe
|
||||
@SETLOCAL
|
||||
CALL pp -o imapsync.exe --link libeay32_.dll --link zlib1_.dll --link ssleay32_.dll .\imapsync
|
||||
IF ERRORLEVEL 1 CALL pp -o imapsync.exe .\imapsync
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
|
||||
|
||||
|
||||
::------------------------------------------------------
|
||||
::--------------- Detect Perl --------------------------
|
||||
:detect_perl
|
||||
@SETLOCAL
|
||||
perl -v
|
||||
IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://strawberryperl.com/ ^
|
||||
&& PAUSE && EXIT /B 3
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
||||
REM CALL .\install_modules.bat
|
||||
|
||||
::------------------------------------------------------
|
||||
::--------------- Check modules are here --------------
|
||||
:check_modules
|
||||
@SETLOCAL
|
||||
perl ^
|
||||
-mTest::MockObject ^
|
||||
-mPAR::Packer ^
|
||||
-mReadonly ^
|
||||
-mAuthen::NTLM ^
|
||||
-mData::Dumper ^
|
||||
-mData::Uniqid ^
|
||||
|
@ -39,66 +75,29 @@ perl ^
|
|||
-mCrypt::OpenSSL::RSA ^
|
||||
-mEncode::Byte ^
|
||||
-e ''
|
||||
IF ERRORLEVEL 1 CALL .\install_modules.bat
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
||||
@ECHO ON
|
||||
DEL imapsync.exe
|
||||
pp -o imapsync.exe ^
|
||||
--link libeay32_.dll ^
|
||||
--link zlib1_.dll ^
|
||||
--link ssleay32_.dll ^
|
||||
.\imapsync
|
||||
|
||||
ECHO Done building imapsync.exe
|
||||
|
||||
@REM Previous options to pp
|
||||
@REM Previous options to pp
|
||||
@REM --link libeay32_.dll ^
|
||||
@REM --link zlib1_.dll ^
|
||||
@REM --link ssleay32_.dll ^
|
||||
@REM -M Mail::IMAPClient ^
|
||||
@REM -M IO::Socket ^
|
||||
@REM -M IO::Socket::IP ^
|
||||
@REM -M IO::Socket::SSL ^
|
||||
@REM -M IO::Socket::INET ^
|
||||
@REM -M Digest::MD5 ^
|
||||
@REM -M Digest::HMAC_MD5 ^
|
||||
@REM -M Digest::HMAC_SHA1 ^
|
||||
@REM -M Term::ReadKey ^
|
||||
@REM -M File::Spec ^
|
||||
@REM -M Authen::NTLM ^
|
||||
@REM -M Time::Local ^
|
||||
@REM -M URI::Escape ^
|
||||
@REM -M Data::Uniqid ^
|
||||
@REM -M File::Copy::Recursive ^
|
||||
@REM -M IO::Tee ^
|
||||
@REM -M Unicode::String ^
|
||||
@REM -M JSON::WebToken ^
|
||||
@REM -M LWP::UserAgent ^
|
||||
@REM -M HTML::Entities ^
|
||||
@REM -M JSON ^
|
||||
@REM -M Encode::Byte ^
|
||||
EXIT /B
|
||||
|
||||
-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 ^
|
||||
-M JSON::WebToken ^
|
||||
-M LWP::UserAgent ^
|
||||
-M HTML::Entities ^
|
||||
-M Crypt::OpenSSL::RSA ^
|
||||
-M JSON ^
|
||||
-M Encode::Byte ^
|
||||
::------------------------------------------------------
|
||||
::--------------- Handle error -------------------------
|
||||
:handle_error
|
||||
SETLOCAL
|
||||
ECHO IN %0 with parameters %*
|
||||
%*
|
||||
SET CMD_RETURN=%ERRORLEVEL%
|
||||
|
||||
IF %CMD_RETURN% EQU 0 (
|
||||
ECHO GOOD END
|
||||
) ELSE (
|
||||
ECHO BAD END
|
||||
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
||||
ECHO Failure calling: %* >> LOG_bat\%~nx0.txt
|
||||
)
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: build_mac.sh,v 1.2 2015/11/04 18:19:48 gilles Exp gilles $
|
||||
# $Id: build_mac.sh,v 1.6 2016/06/22 20:04:16 gilles Exp gilles $
|
||||
|
||||
# exit on any failure
|
||||
set -e
|
||||
|
||||
eval `perl -I $HOME/perl5/lib/perl5 -Mlocal::lib`
|
||||
export MANPATH=$HOME/perl5/man:$MANPATH
|
||||
|
@ -10,10 +13,15 @@ ARCH=`uname -m`
|
|||
KERNEL=`uname -s`
|
||||
echo "$HOSTNAME $ARCH $KERNEL"
|
||||
|
||||
VERSION=`./imapsync --version`
|
||||
BIN_NAME=imapsync_bin_Darwin
|
||||
|
||||
cpanm Mail::IMAPClient
|
||||
# exit if known needed modules are missing
|
||||
sh prerequisites_imapsync
|
||||
|
||||
VERSION=`./imapsync --version`
|
||||
|
||||
# Update important Perl modules
|
||||
cpanm Mail::IMAPClient IO::Socket::SSL PAR::Packer
|
||||
|
||||
pp -o $BIN_NAME \
|
||||
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
|
||||
|
@ -22,6 +30,6 @@ pp -o $BIN_NAME \
|
|||
-M Crypt::OpenSSL::RSA -M JSON -M JSON::WebToken -M LWP -M HTML::Entities \
|
||||
imapsync
|
||||
|
||||
./imapsync_bin_Darwin
|
||||
./imapsync_bin_Darwin
|
||||
./imapsync_bin_Darwin --tests
|
||||
./imapsync_bin_Darwin --testslive
|
||||
|
|
17
W/check_winerr
Executable file
17
W/check_winerr
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: check_winerr,v 1.4 2016/06/30 11:10:37 gilles Exp gilles $
|
||||
|
||||
test -n "$1" || { echo usage: "$0 script.bat" && exit 1 ; }
|
||||
|
||||
test -d W/LOG_bat || mkdir W/LOG_bat
|
||||
ERROR_FILENAME=$1.txt
|
||||
rm -f "W/LOG_bat/$ERROR_FILENAME"
|
||||
if scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/LOG_bat/'"$ERROR_FILENAME" W/LOG_bat/ > /dev/null 2>&1 ; then
|
||||
#echo -n "W/LOG_bat/$ERROR_FILENAME : "
|
||||
#cat "W/LOG_bat/$ERROR_FILENAME"
|
||||
sed -e "s#^#W/LOG_bat/$ERROR_FILENAME : #" "W/LOG_bat/$ERROR_FILENAME"
|
||||
exit 1
|
||||
else
|
||||
echo NO errror
|
||||
fi
|
11
W/checklink.txt
Normal file
11
W/checklink.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
Processing http://lamiral.info/~gilles/imapsync/
|
||||
|
||||
|
||||
List of broken links and other issues:
|
||||
http://fr.linkedin.com/in/gilleslamiral
|
||||
Line: 185
|
||||
Code: 405 Method Not Allowed
|
||||
To do: The server does not allow HTTP HEAD requests, which prevents the
|
||||
Link Checker to check the link automatically. Check the link
|
||||
manually.
|
44
W/checklinkext.txt
Normal file
44
W/checklinkext.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
----------------------------------------
|
||||
|
||||
Processing http://lamiral.info/~gilles/imapsync/S/news.shtml
|
||||
|
||||
|
||||
List of broken links and other issues:
|
||||
http://lamiral.info/~gilles/imapsync/
|
||||
Line: 135
|
||||
Code: 200 OK
|
||||
To do: Some of the links to this resource point to broken URI fragments
|
||||
(such as index.html#fragment).
|
||||
The following fragments need to be fixed:
|
||||
poll Line: 135
|
||||
|
||||
----------------------------------------
|
||||
|
||||
Processing http://lamiral.info/~gilles/imapsync/S/external.shtml
|
||||
|
||||
|
||||
List of broken links and other issues:
|
||||
https://bl0rg.net/software/
|
||||
Line: 41
|
||||
Code: 500 Can't connect to bl0rg.net:443
|
||||
To do: This is a server side problem. Check the URI.
|
||||
|
||||
----------------------------------------
|
||||
|
||||
Processing http://lamiral.info/~gilles/imapsync/S/imapservers.shtml
|
||||
|
||||
|
||||
List of broken links and other issues:
|
||||
http://www.mirapoint.com/
|
||||
Line: 126
|
||||
Code: 404 Not Found
|
||||
To do: The link is broken. Double-check that you have not made any typo,
|
||||
or mistake in copy-pasting. If the link points to a resource that
|
||||
no longer exists, you may want to remove or fix the link.
|
||||
|
||||
http://www.kerio.com/
|
||||
Line: 117
|
||||
Code: 302 -> 302 Found
|
||||
To do: This is a temporary redirect. Update the link if you believe it
|
||||
makes sense, or leave it as is.
|
1108
W/dprof2_bigmail_tmon.out
Normal file
1108
W/dprof2_bigmail_tmon.out
Normal file
File diff suppressed because it is too large
Load diff
299
W/imapsync.1
299
W/imapsync.1
|
@ -1,4 +1,4 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
||||
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
@ -38,6 +38,8 @@
|
|||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
|
@ -48,17 +50,24 @@
|
|||
.\" 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"
|
||||
.\"
|
||||
.\" Avoid warning from groff about undefined register 'F'.
|
||||
.de IX
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
.nr rF 0
|
||||
.if \n(.g .if rF .nr rF 1
|
||||
.if (\n(rF:(\n(.g==0)) \{
|
||||
. if \nF \{
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. if !\nF==2 \{
|
||||
. nr % 0
|
||||
. nr F 2
|
||||
. \}
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
|
@ -124,24 +133,25 @@
|
|||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "IMAPSYNC 1"
|
||||
.TH IMAPSYNC 1 "2016-03-17" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||
.TH IMAPSYNC 1 "2016-08-19" "perl v5.18.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 66 different IMAP server softwares
|
||||
supported with success, few failures.
|
||||
imapsync \- Email IMAP tool for syncing, copying and migrating email mailboxes.
|
||||
.PP
|
||||
$Revision: 1.684 $
|
||||
The imapsync command synchronises mailboxes between two imap servers.
|
||||
More than 69 different IMAP server softwares supported with success,
|
||||
few failures.
|
||||
.PP
|
||||
$Revision: 1.727 $
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 5
|
||||
\& To synchronize the source imap account
|
||||
\& "test1" on server "test1.lamiral.info" with password "secret1"
|
||||
\& to the destination imap account
|
||||
\& To synchronize the source imap account
|
||||
\& "test1" on server "test1.lamiral.info" with password "secret1"
|
||||
\& to the destination imap account
|
||||
\& "test2" on server "test2.lamiral.info" with password "secret2"
|
||||
\& do:
|
||||
\&
|
||||
|
@ -149,13 +159,18 @@ $Revision: 1.684 $
|
|||
\& \-\-host1 test1.lamiral.info \-\-user1 test1 \-\-password1 secret1 \e
|
||||
\& \-\-host2 test2.lamiral.info \-\-user2 test2 \-\-password2 secret2
|
||||
.Ve
|
||||
.SH "REQUIRED ARGUMENTS"
|
||||
.IX Header "REQUIRED ARGUMENTS"
|
||||
The required argmuments are the six values, three on each sides,
|
||||
needed to login into the \s-1IMAP\s0 servers,
|
||||
a host, a username, and a password, two times.
|
||||
.SH "INSTALL"
|
||||
.IX Header "INSTALL"
|
||||
.Vb 5
|
||||
\& Imapsync works under any Unix with perl.
|
||||
\& Imapsync works under Windows (2000, XP, Vista, Seven)
|
||||
\& Imapsync works under Windows (2000, XP, Vista, Seven)
|
||||
\& as a standalone binary software called imapsync.exe
|
||||
\& Imapsync works under OS X as a standalone binary
|
||||
\& Imapsync works under OS X as a standalone binary
|
||||
\& software called imapsync_bin_Darwin.
|
||||
\&
|
||||
\& Purchase latest imapsync at
|
||||
|
@ -169,14 +184,19 @@ $Revision: 1.684 $
|
|||
\&
|
||||
\& Go into the directory imapsync\-x.xx and read the INSTALL file.
|
||||
\& As mentioned at http://imapsync.lamiral.info/#install
|
||||
\& the INSTALL file can also be found at
|
||||
\& the INSTALL file can also be found at
|
||||
\& http://imapsync.lamiral.info/INSTALL
|
||||
\& It is now split in several files for each system
|
||||
\& http://imapsync.lamiral.info/INSTALL.d/
|
||||
.Ve
|
||||
.SH "CONFIGURATION"
|
||||
.IX Header "CONFIGURATION"
|
||||
There is no specific configuration file for imapsync,
|
||||
everything is specified by the command line parameteres
|
||||
and the default behavior.
|
||||
.SH "USAGE"
|
||||
.IX Header "USAGE"
|
||||
To get a description of each option just run imapsync
|
||||
To get a description of each option just run imapsync
|
||||
with no argument, like this:
|
||||
.PP
|
||||
.Vb 1
|
||||
|
@ -189,16 +209,16 @@ reproduced here:
|
|||
.PP
|
||||
.Vb 1
|
||||
\& usage: ./imapsync [options]
|
||||
\&
|
||||
\& Several options are mandatory.
|
||||
\&
|
||||
\& Several options are mandatory.
|
||||
\& str means string
|
||||
\& int means integer
|
||||
\& reg means regular expression
|
||||
\& cmd means command
|
||||
\&
|
||||
\& \-\-dry : Makes imapsync doing nothing, just print what would
|
||||
\&
|
||||
\& \-\-dry : Makes imapsync doing nothing, just print what would
|
||||
\& be done without \-\-dry.
|
||||
\&
|
||||
\&
|
||||
\& \-\-host1 str : Source or "from" imap server. Mandatory.
|
||||
\& \-\-port1 int : Port to connect on host1. Default is 143, 993 if \-\-ssl1
|
||||
\& \-\-user1 str : User to login on host1. Mandatory.
|
||||
|
@ -209,12 +229,12 @@ reproduced here:
|
|||
\& \-\-port2 int : Port to connect on host2. Default is 143, 993 if \-\-ssl2
|
||||
\& \-\-user2 str : User to login on host2. Mandatory.
|
||||
\& \-\-password2 str : Password for the user2.
|
||||
\&
|
||||
\& \-\-passfile1 str : Password file for the user1. It must contain the
|
||||
\&
|
||||
\& \-\-passfile1 str : 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 str : 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.
|
||||
|
@ -225,45 +245,45 @@ reproduced here:
|
|||
\& See all possibilities in the new() method of IO::Socket::SSL
|
||||
\& http://search.cpan.org/perldoc?IO::Socket::SSL#Description_Of_Methods
|
||||
\& \-\-sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
|
||||
\& See \-\-sslargs1
|
||||
\&
|
||||
\& \-\-timeout1 int : Connection timeout in seconds for host1.
|
||||
\& See \-\-sslargs1
|
||||
\&
|
||||
\& \-\-timeout1 int : Connection timeout in seconds for host1.
|
||||
\& Default is 120 and 0 means no timeout at all.
|
||||
\& \-\-timeout2 int : Connection timeout in seconds for host2.
|
||||
\& \-\-timeout2 int : Connection timeout in seconds for host2.
|
||||
\& Default is 120 and 0 means no timeout at all.
|
||||
\&
|
||||
\&
|
||||
\& \-\-authmech1 str : Auth mechanism to use with host1:
|
||||
\& PLAIN, LOGIN, CRAM\-MD5 etc. Use UPPERCASE.
|
||||
\& \-\-authmech2 str : Auth mechanism to use with host2. See \-\-authmech1
|
||||
\&
|
||||
\& \-\-authuser1 str : User to auth with on host1 (admin user).
|
||||
\& \-\-authuser1 str : User to auth with on host1 (admin user).
|
||||
\& Avoid using \-\-authmech1 SOMETHING with \-\-authuser1.
|
||||
\& \-\-authuser2 str : 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 str : Domain on host1 (NTLM authentication).
|
||||
\& \-\-domain2 str : Domain on host2 (NTLM authentication).
|
||||
\&
|
||||
\&
|
||||
\&
|
||||
\&
|
||||
\& \-\-folder str : Sync this folder.
|
||||
\& \-\-folder str : and this one, etc.
|
||||
\& \-\-folderrec str : Sync this folder recursively.
|
||||
\& \-\-folderrec str : and this one, etc.
|
||||
\&
|
||||
\&
|
||||
\& \-\-folderfirst str : Sync this folder first. \-\-folderfirst "Work"
|
||||
\& \-\-folderfirst str : then this one, etc.
|
||||
\& \-\-folderlast str : Sync this folder last. \-\-folderlast "[Gmail]/All Mail"
|
||||
\& \-\-folderlast str : 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.
|
||||
\&
|
||||
\& \-\-f1f2 str1=str2 : Force folder str1 to be synced to str2.
|
||||
|
@ -275,12 +295,12 @@ reproduced here:
|
|||
\& Several folders to avoid:
|
||||
\& \-\-exclude \*(Aqfold1|fold2|f3\*(Aq skips fold1, fold2 and f3.
|
||||
\& \-\-exclude reg : or this one, etc.
|
||||
\&
|
||||
\& \-\-subfolder2 str : Move whole host1 folders hierarchy under this
|
||||
\&
|
||||
\& \-\-subfolder2 str : Move whole host1 folders hierarchy under this
|
||||
\& host2 folder str .
|
||||
\& It does it by adding two \-\-regextrans2 options before
|
||||
\& all others. Add \-\-debug to see what\*(Aqs really going on.
|
||||
\&
|
||||
\&
|
||||
\& \-\-regextrans2 reg : Apply the whole regex to each destination folders.
|
||||
\& \-\-regextrans2 reg : and this one. etc.
|
||||
\& When you play with the \-\-regextrans2 option, first
|
||||
|
@ -288,21 +308,21 @@ reproduced here:
|
|||
\& Then, when happy, remove \-\-dry, remove \-\-justfolders.
|
||||
\& Have in mind that \-\-regextrans2 is applied after prefix
|
||||
\& and separator inversion.
|
||||
\&
|
||||
\&
|
||||
\& \-\-tmpdir str : Where to store temporary files and subdirectories.
|
||||
\& Will be created if it doesn\*(Aqt exist.
|
||||
\& Default is system specific, Unix is /tmp but
|
||||
\& it\*(Aqs often small and deleted at reboot.
|
||||
\& \-\-tmpdir /var/tmp should be better.
|
||||
\& \-\-pidfile str : The file where imapsync pid is written.
|
||||
\& \-\-pidfilelocking : Abort if pidfile already exists. Usefull to avoid
|
||||
\& \-\-pidfilelocking : Abort if pidfile already exists. Usefull to avoid
|
||||
\& concurrent transfers on the same mailbox.
|
||||
\&
|
||||
\&
|
||||
\& \-\-nolog : Turn off logging on file
|
||||
\& \-\-logfile str : Change the default log filename (can be dirname/filename).
|
||||
\& \-\-logdir str : Change the default log directory. Default is LOG_imapsync
|
||||
\&
|
||||
\& \-\-prefix1 str : Remove prefix to all destination folders
|
||||
\& \-\-prefix1 str : 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, so imapsync
|
||||
|
@ -310,16 +330,16 @@ reproduced here:
|
|||
\& \-\-prefix2 str : Add prefix to all host2 folders. See \-\-prefix1
|
||||
\& \-\-sep1 str : Host1 separator in case NAMESPACE is not supported.
|
||||
\& \-\-sep2 str : Host2 separator in case NAMESPACE is not supported.
|
||||
\&
|
||||
\&
|
||||
\& \-\-skipmess reg : Skips messages maching the regex.
|
||||
\& Example: \*(Aqm/[\ex80\-ff]/\*(Aq # to avoid 8bits messages.
|
||||
\& \-\-skipmess is applied before \-\-regexmess
|
||||
\& \-\-skipmess reg : or this one, etc.
|
||||
\&
|
||||
\& \-\-pipemess cmd : Apply this cmd command to each message content
|
||||
\& \-\-pipemess cmd : Apply this cmd command to each message content
|
||||
\& before the copy.
|
||||
\& \-\-pipemess cmd : and this one, etc.
|
||||
\&
|
||||
\&
|
||||
\& \-\-disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
|
||||
\&
|
||||
\& \-\-regexmess reg : Apply the whole regex to each message before transfer.
|
||||
|
@ -329,20 +349,20 @@ reproduced here:
|
|||
\& \-\-regexflag reg : Apply the whole regex to each flags list.
|
||||
\& Example: \*(Aqs/"Junk"//g\*(Aq # to remove "Junk" flag.
|
||||
\& \-\-regexflag reg : 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
|
||||
\& \eDeleted, then messages are really deleted with an
|
||||
\&
|
||||
\& \-\-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
|
||||
\& \eDeleted, 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
|
||||
\& 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.
|
||||
\& \-\-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 reg : Deleted only folders matching regex.
|
||||
|
@ -351,8 +371,8 @@ reproduced here:
|
|||
\& 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
|
||||
\& 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.
|
||||
|
@ -360,13 +380,13 @@ reproduced here:
|
|||
\& \-\-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
|
||||
\& 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
|
||||
\& \-\-idatefromheader : Sets the internal dates on host2 same as the
|
||||
\& "Date:" headers.
|
||||
\&
|
||||
\& \-\-maxsize int : Skip messages larger (or equal) than int bytes
|
||||
|
@ -381,48 +401,48 @@ reproduced here:
|
|||
\& past|+++++++++++++++minage\-\-\-\->now
|
||||
\& past|\-\-\-\-maxage+++++minage\-\-\-\->now (intersection)
|
||||
\& past|++++minage\-\-\-\-\-maxage++++>now (union)
|
||||
\&
|
||||
\& \-\-search str : Selects only messages returned by this IMAP SEARCH
|
||||
\&
|
||||
\& \-\-search str : Selects only messages returned by this IMAP SEARCH
|
||||
\& command. Applied on both sides.
|
||||
\& \-\-search1 str : Same as \-\-search for selecting host1 messages only.
|
||||
\& \-\-search2 str : 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
|
||||
\& Gmail per day allows
|
||||
\& 2500000000 = 2.5 GB downloaded from Gmail as host2
|
||||
\& 500000000 = 500 MB uploaded to Gmail as host1.
|
||||
\&
|
||||
\&
|
||||
\& \-\-maxlinelength int : skip messages with a line length longer than int bytes.
|
||||
\& RFC 2822 says it must be no more than 1000 bytes.
|
||||
\&
|
||||
\& \-\-useheader str : Use this header to compare messages on both sides.
|
||||
\& Ex: Message\-ID or Subject or Date.
|
||||
\& \-\-useheader str and this one, etc.
|
||||
\&
|
||||
\&
|
||||
\& \-\-subscribed : Transfers subscribed folders.
|
||||
\& \-\-subscribe : Subscribe to the folders transferred on the
|
||||
\& \-\-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
|
||||
\& \-\-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.
|
||||
\&
|
||||
\& \-\-useuid : Use uid instead of header as a criterium to recognize
|
||||
\& messages. Option \-\-usecache is then implied unless
|
||||
\& \-\-nousecache is used.
|
||||
\&
|
||||
\& \-\-debug : Debug mode.
|
||||
\& \-\-debugfolders : Debug mode for the folders part only.
|
||||
\& \-\-debugcontent : Debug content of the messages transfered. Huge ouput.
|
||||
|
@ -435,7 +455,7 @@ reproduced here:
|
|||
\& \-\-errorsmax int : Exit when int number of errors is reached. Default is 50.
|
||||
\&
|
||||
\& \-\-tests : Run local non\-regression tests. Exit code 0 means all ok.
|
||||
\& \-\-testslive : Run a live test with test1.lamiral.info imap server.
|
||||
\& \-\-testslive : Run a live test with test1.lamiral.info imap server.
|
||||
\& Useful to check the basics. Needs internet connexion.
|
||||
\&
|
||||
\& \-\-version : Print only software version.
|
||||
|
@ -444,19 +464,19 @@ reproduced here:
|
|||
\& \-\-noid : Do not send/receive ID command to imap servers.
|
||||
\& \-\-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
|
||||
\& \-\-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 the source imap account
|
||||
\& "test1" on server "test1.lamiral.info" with password "secret1"
|
||||
\& to the destination imap account
|
||||
\& Example:
|
||||
\& To synchronize the source imap account
|
||||
\& "test1" on server "test1.lamiral.info" with password "secret1"
|
||||
\& to the destination imap account
|
||||
\& "test2" on server "test2.lamiral.info" with password "secret2"
|
||||
\& do:
|
||||
\&
|
||||
\&
|
||||
\& imapsync \e
|
||||
\& \-\-host1 test1.lamiral.info \-\-user1 test1 \-\-password1 secret1 \e
|
||||
\& \-\-host2 test2.lamiral.info \-\-user2 test2 \-\-password2 secret2
|
||||
|
@ -466,42 +486,42 @@ reproduced here:
|
|||
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
|
||||
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
|
||||
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.
|
||||
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
|
||||
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
|
||||
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 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
|
||||
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
|
||||
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
|
||||
Use offlineimap (written by John Goerzen) or mbsync (written by
|
||||
Michael R. Elkins) for 2 ways synchronizations.
|
||||
.SH "OPTIONS"
|
||||
.IX Header "OPTIONS"
|
||||
|
@ -511,6 +531,8 @@ To get a description of each option just invoke:
|
|||
\& imapsync
|
||||
.Ve
|
||||
.PP
|
||||
or read the previous section named \s-1USAGE,\s0
|
||||
.PP
|
||||
or read http://imapsync.lamiral.info/OPTIONS
|
||||
.SH "HISTORY"
|
||||
.IX Header "HISTORY"
|
||||
|
@ -528,8 +550,8 @@ 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")
|
||||
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
|
||||
|
@ -542,7 +564,7 @@ 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
|
||||
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
|
||||
|
@ -552,7 +574,7 @@ the best solution.
|
|||
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
|
||||
\&\-\-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),
|
||||
|
@ -566,8 +588,8 @@ 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.
|
||||
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.
|
||||
|
@ -579,21 +601,30 @@ with Google Apps free edition.
|
|||
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
|
||||
So if you have an unreliable internet connection, you can use this loop
|
||||
in a Bourne shell:
|
||||
.PP
|
||||
.Vb 3
|
||||
\& while ! imapsync ...; do
|
||||
\& while ! imapsync ...; do
|
||||
\& echo imapsync not complete
|
||||
\& done
|
||||
.Ve
|
||||
.SH "LICENSE"
|
||||
.IX Header "LICENSE"
|
||||
imapsync is free, open, public but not always gratis software
|
||||
.SH "LICENSE AND COPYRIGHT"
|
||||
.IX Header "LICENSE AND COPYRIGHT"
|
||||
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.
|
||||
.PP
|
||||
.Vb 1
|
||||
\& "No limit to do anything with this work and this license."
|
||||
.Ve
|
||||
.PP
|
||||
In case it is not long enough I repeat:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& "No limit to do anything with this work and this license."
|
||||
.Ve
|
||||
.SH "MAILING-LIST"
|
||||
.IX Header "MAILING-LIST"
|
||||
The public mailing-list may be the best way to get free support.
|
||||
|
@ -628,16 +659,16 @@ 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
|
||||
way to stay maintening and supporting free open public
|
||||
softwares (see the license) over decades.
|
||||
.SH "BUG REPORT GUIDELINES"
|
||||
.IX Header "BUG REPORT GUIDELINES"
|
||||
.SH "BUGS AND LIMITATIONS"
|
||||
.IX Header "BUGS AND LIMITATIONS"
|
||||
Help me to help you: follow the following guidelines.
|
||||
.PP
|
||||
Report any bugs or feature requests to the public mailing-list
|
||||
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
|
||||
Before reporting bugs, read the FAQs, the \s-1README\s0 and the
|
||||
\&\s-1TODO\s0 files. http://imapsync.lamiral.info/
|
||||
.PP
|
||||
Upgrade to last imapsync release, maybe the bug
|
||||
|
@ -647,7 +678,7 @@ 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),
|
||||
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
|
||||
|
@ -657,23 +688,23 @@ Help us to help you: in your report, please include:
|
|||
\& \- 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
|
||||
\& of the issue. First failures messages are often more significant than
|
||||
\& the last ones.
|
||||
\&
|
||||
\& imapsync ... \-\-folder \*(AqBUG\*(Aq \-\-debug \-\-debugimap
|
||||
\& \- 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).
|
||||
\& you use (except the passwords of course).
|
||||
\&
|
||||
\& \- IMAPClient.pm version.
|
||||
\&
|
||||
\& \- the run context. Do you run imapsync.exe, a unix binary
|
||||
\& \- the run context. Do you run imapsync.exe, a unix binary
|
||||
\& or the perl script imapsync.
|
||||
\&
|
||||
\& \- operating system running imapsync.
|
||||
|
@ -687,7 +718,7 @@ Help us to help you: in your report, please include:
|
|||
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
|
||||
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.
|
||||
|
@ -696,7 +727,7 @@ and then forget it.
|
|||
See http://imapsync.lamiral.info/S/imapservers.shtml
|
||||
.SH "HUGE MIGRATION"
|
||||
.IX Header "HUGE MIGRATION"
|
||||
Pay special attention to options
|
||||
Pay special attention to options
|
||||
\&\-\-subscribed
|
||||
\&\-\-subscribe
|
||||
\&\-\-delete
|
||||
|
@ -725,7 +756,7 @@ user005_1;password005_1;user005_2;password005_2
|
|||
On Unix the shell program can be:
|
||||
.PP
|
||||
.Vb 4
|
||||
\& { while IFS=\*(Aq;\*(Aq read u1 p1 u2 p2; do
|
||||
\& { 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
|
||||
|
@ -742,13 +773,13 @@ On Windows the batch program can be:
|
|||
The ... have to be replaced by nothing or any imapsync option.
|
||||
Welcome in shell programming !
|
||||
.PP
|
||||
You will find already written scripts at
|
||||
You will find already written scripts at
|
||||
http://imapsync.lamiral.info/examples/
|
||||
.SH "Hacking"
|
||||
.IX Header "Hacking"
|
||||
.SH "HACKING"
|
||||
.IX Header "HACKING"
|
||||
Feel free to hack imapsync as the \s-1NOLIMIT\s0 license permits it.
|
||||
.SH "Links"
|
||||
.IX Header "Links"
|
||||
.SH "LINKS"
|
||||
.IX Header "LINKS"
|
||||
Entries for imapsync:
|
||||
https://web.archive.org/web/20070202005121/http://www.imap.org/products/showall.php
|
||||
.SH "SIMILAR SOFTWARES"
|
||||
|
@ -773,4 +804,4 @@ https://web.archive.org/web/20070202005121/http://www.imap.org/products/showall.
|
|||
.PP
|
||||
Feedback (good or bad) will often be welcome.
|
||||
.PP
|
||||
\&\f(CW$Id:\fR imapsync,v 1.684 2016/03/17 08:35:03 gilles Exp gilles $
|
||||
\&\f(CW$Id:\fR imapsync,v 1.727 2016/08/19 10:30:36 gilles Exp gilles $
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
|
||||
@REM $Id: install_module_one.bat,v 1.1 2015/11/23 16:49:17 gilles Exp gilles $
|
||||
@REM $Id: install_module_one.bat,v 1.4 2016/07/20 21:44:40 gilles Exp gilles $
|
||||
|
||||
@ECHO OFF
|
||||
SET SHELL=
|
||||
SET
|
||||
REM EXIT
|
||||
|
||||
ECHO Installing Perl module IO::Socket::SSL for imapsync
|
||||
REM CD /D %~dp0
|
||||
|
||||
perl -v
|
||||
|
@ -16,9 +15,9 @@ IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://stra
|
|||
@ECHO perl is here
|
||||
|
||||
FOR %%M in (
|
||||
IO::Socket::SSL ^
|
||||
IO::Socket::SSL Net::SSLeay PAR::Packer^
|
||||
) DO perl -m%%M -e "print qq{Updating %%M $%%M::VERSION \n}" ^
|
||||
& cpanm %%M
|
||||
& cpanm --force %%M
|
||||
|
||||
REM IO::Socket::SSL
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
REM $Id: install_modules.bat,v 1.27 2016/08/17 02:03:46 gilles Exp gilles $
|
||||
|
||||
REM $Id: install_modules.bat,v 1.22 2015/12/26 02:10:15 gilles Exp gilles $
|
||||
|
||||
::------------------------------------------------------
|
||||
::--------------- Main of install_modules.bat ----------
|
||||
@SETLOCAL
|
||||
@ECHO OFF
|
||||
ECHO Currently running through %0 %*
|
||||
|
||||
@REM Needed with remote ssh
|
||||
SET SHELL=
|
||||
SET
|
||||
|
@ -9,13 +13,34 @@ ECHO Installing Perl modules for imapsync
|
|||
|
||||
CD /D %~dp0
|
||||
|
||||
CALL :handle_error CALL :detect_perl
|
||||
CALL :handle_error CALL :update_modules
|
||||
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
||||
|
||||
::------------------------------------------------------
|
||||
::--------------- Detect Perl --------------------------
|
||||
:detect_perl
|
||||
@SETLOCAL
|
||||
perl -v
|
||||
IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://strawberryperl.com/ ^
|
||||
&& PAUSE && EXIT /B 3
|
||||
|
||||
&& PAUSE && EXIT 3
|
||||
ECHO perl is there
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
||||
|
||||
::------------------------------------------------------
|
||||
::---------------- Update modules ----------------------
|
||||
:update_modules
|
||||
@SETLOCAL
|
||||
FOR %%M in ( ^
|
||||
Test::MockObject ^
|
||||
Readonly ^
|
||||
Filesys::DfPortable ^
|
||||
Authen::NTLM ^
|
||||
Crypt::SSLeay ^
|
||||
|
@ -49,5 +74,27 @@ FOR %%M in ( ^
|
|||
|
||||
ECHO Perl modules for imapsync updated
|
||||
REM PAUSE
|
||||
@ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
||||
|
||||
::------------------------------------------------------
|
||||
::----------- Handle errors in LOG_bat\ directory ------
|
||||
:handle_error
|
||||
SETLOCAL
|
||||
ECHO IN %0 with parameters %*
|
||||
%*
|
||||
SET CMD_RETURN=%ERRORLEVEL%
|
||||
|
||||
IF %CMD_RETURN% EQU 0 (
|
||||
ECHO GOOD END
|
||||
) ELSE (
|
||||
ECHO BAD END
|
||||
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
||||
ECHO Failure calling with extra %* >> LOG_bat\%~nx0.txt
|
||||
)
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
::------------------------------------------------------
|
||||
|
||||
|
|
11
W/learn/automap_languages
Normal file
11
W/learn/automap_languages
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
From
|
||||
http://stackoverflow.com/questions/2185391/localized-gmail-imap-folders/2185548#2185548
|
||||
|
||||
drafts Borradores, Borradores, Bozze, Brouillons, Concepten, Entwürfe, Kladder, Koncepty, Kopie robocze, Rascunhos, Rascunhos, Taslaklar, Utkast, Utkast, Πρόχειρα, Черновики, 下書き, 草稿, 草稿, 임시보관함
|
||||
inbox Bandeja de entrada, Boîte de réception, Caixa de entrada, Caixa de entrada, Doručená pošta, Gelen Kutusu, Indbakke, Inkorgen, Innboks, Odebrane, Posta in arrivo, Posteingang, Postvak IN, Recibidos, Εισερχόμενα, Входящие, 受信トレイ, 收件匣, 收件箱, 받은편지함
|
||||
junk Correio electrónico não solicitado, Correo basura, Junk, Junk, Lixo, Nettsøppel, Nevyžádaná pošta, No solicitado, Ongewenst, Posta indesiderata, Skräp, Spam, Wiadomości-śmieci, Önemsiz, Ανεπιθύμητα, Спам, 垃圾邮件, 垃圾郵件, 迷惑メール, 스팸
|
||||
outbox Bandeja de salida, Boîte d'envoi, Caixa de saída, Caixa de saída, Do wysłania, Enviados, Giden Kutusu, Posta in uscita, Postausgang, Postvak UIT, Pošta k odeslání, Udbakke, Utboks, Utkorgen, Εξερχόμενα, Исходящие, 发件箱, 寄件匣, 送信トレイ, 보낼편지함
|
||||
sent E-mails enviados, Enviada, Enviado, Enviado, Gesendet, Gönderildi, Inviati, Odeslaná pošta, Sendt, Sendt, Skickat, Verzonden, Wysłane, Éléments envoyés, Απεσταλμένα, Отправленные, 寄件備份, 已发送邮件, 送信済み, 보낸편지함
|
||||
trash Cestino, Corbeille, Kosz, Koš, Lixeira, Lixo, Papelera, Papelera, Papierkorb, Papirkurv, Papirkurv, Papperskorgen, Prullenbak, Çöp Kutusu, Κάδος απορριμμάτων, Корзина, ゴミ箱, 垃圾桶, 已删除邮件, 휴지통
|
||||
|
29
W/learn/create_folder
Executable file
29
W/learn/create_folder
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
use Mail::IMAPClient;
|
||||
|
||||
$ARGV[2] or die "usage: $0 host user password folder1 folder2 ...\n";
|
||||
|
||||
$host = $ARGV[0];
|
||||
$user = $ARGV[1];
|
||||
$password = $ARGV[2];
|
||||
|
||||
my $imap = Mail::IMAPClient->new();
|
||||
$imap->Debug(1);
|
||||
$imap->Server($host);
|
||||
$imap->connect() or die;
|
||||
$imap->User($user);
|
||||
$imap->Password($password);
|
||||
$imap->login() or die;
|
||||
$imap->Uid(1);
|
||||
$imap->Peek(1);
|
||||
|
||||
foreach $folder (@ARGV[3..$#ARGV]) {
|
||||
print "creating folder $folder\n";
|
||||
$imap->create($folder);
|
||||
}
|
||||
|
||||
$imap->logout();
|
||||
# $imap->close();
|
||||
|
||||
|
36
W/learn/delete_all_folders
Executable file
36
W/learn/delete_all_folders
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# $Id: delete_folder,v 1.1 2016/07/05 20:59:43 gilles Exp gilles $
|
||||
|
||||
use Mail::IMAPClient;
|
||||
|
||||
$ARGV[2] or die "usage: $0 host user password folder1 folder2 ...\n";
|
||||
|
||||
$host = $ARGV[0];
|
||||
$user = $ARGV[1];
|
||||
$password = $ARGV[2];
|
||||
|
||||
my $imap = Mail::IMAPClient->new();
|
||||
$imap->Debug(1);
|
||||
$imap->Server($host);
|
||||
$imap->Ssl( 1 ) ;
|
||||
$imap->connect() or die;
|
||||
$imap->User($user);
|
||||
$imap->Password($password);
|
||||
$imap->login() or die;
|
||||
$imap->Uid(1);
|
||||
$imap->Peek(1);
|
||||
|
||||
|
||||
|
||||
my @folders = $imap->folders( ) ;
|
||||
print map { "$_\n" } @folders ;
|
||||
foreach $folder ( @folders) {
|
||||
print "deleting folder $folder\n";
|
||||
$imap->delete( $folder ) ;
|
||||
}
|
||||
|
||||
$imap->logout();
|
||||
# $imap->close();
|
||||
|
||||
|
36
W/learn/delete_folder
Executable file
36
W/learn/delete_folder
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# $Id: delete_folder,v 1.1 2016/07/05 20:59:43 gilles Exp gilles $
|
||||
|
||||
use Mail::IMAPClient;
|
||||
|
||||
$ARGV[2] or die "usage: $0 host user password folder1 folder2 ...\n";
|
||||
|
||||
$host = $ARGV[0];
|
||||
$user = $ARGV[1];
|
||||
$password = $ARGV[2];
|
||||
|
||||
my $imap = Mail::IMAPClient->new();
|
||||
$imap->Debug(1);
|
||||
$imap->Server($host);
|
||||
$imap->Ssl( 1 ) ;
|
||||
$imap->connect() or die;
|
||||
$imap->User($user);
|
||||
$imap->Password($password);
|
||||
$imap->login() or die;
|
||||
$imap->Uid(1);
|
||||
$imap->Peek(1);
|
||||
|
||||
|
||||
|
||||
my @folders = $imap->folders( ) ;
|
||||
print map { "$_\n" } @folders ;
|
||||
foreach $folder (@ARGV[3..$#ARGV]) {
|
||||
print "deleting folder $folder\n";
|
||||
$imap->delete( $folder ) ;
|
||||
}
|
||||
|
||||
$imap->logout();
|
||||
# $imap->close();
|
||||
|
||||
|
205
W/learn/dns_srv_imap
Executable file
205
W/learn/dns_srv_imap
Executable file
|
@ -0,0 +1,205 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: dns_srv_imap,v 1.5 2016/08/15 01:24:20 gilles Exp gilles $
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use English ;
|
||||
use Test::More ;
|
||||
use Net::DNS ;
|
||||
|
||||
|
||||
|
||||
foreach my $email ( @ARGV ) {
|
||||
my $domain = domain_name_of( $email ) ;
|
||||
print "Domain for email $email: $domain\n" ;
|
||||
my ( $host, $port ) = host_port_from_lookup_srv( '_imaps._tcp.' . $domain ) ;
|
||||
$host ||= q{} ;
|
||||
$port ||= q{} ;
|
||||
print "IMAPS server name and port for $email: $host $port\n" ;
|
||||
|
||||
( $host, $port ) = host_port_from_lookup_srv( '_imap._tcp.' . $domain ) ;
|
||||
$host ||= q{} ;
|
||||
$port ||= q{} ;
|
||||
print "IMAP server name and port for $email: $host $port\n" ;
|
||||
}
|
||||
|
||||
|
||||
tests_server_name_from_srv_string( ) ;
|
||||
tests_server_port_from_srv_string( ) ;
|
||||
tests_domain_name_of( ) ;
|
||||
tests_host_port_ssl_from_user( ) ;
|
||||
done_testing( ) ;
|
||||
|
||||
my $debug = 1 ;
|
||||
|
||||
|
||||
sub host_port_ssl_from_user {
|
||||
my $user = shift @ARG ;
|
||||
|
||||
if ( ! $user ) {
|
||||
return ;
|
||||
}
|
||||
|
||||
my $domain = domain_name_of( $user ) ;
|
||||
if ( ! $domain ) {
|
||||
return ;
|
||||
}
|
||||
|
||||
my ( $host, $port ) = host_port_from_lookup_srv( qq{_imaps._tcp.$domain} ) ;
|
||||
my $ssl = 1 ;
|
||||
if ( $host and $port ) {
|
||||
return ( $host, $port, $ssl ) ;
|
||||
}
|
||||
|
||||
# fallback to imap in clear
|
||||
$ssl = 0 ;
|
||||
( $host, $port ) = host_port_from_lookup_srv( qq{_imap._tcp.$domain} ) ;
|
||||
|
||||
if ( $host and $port ) {
|
||||
return ( $host, $port, $ssl ) ;
|
||||
}
|
||||
|
||||
return ;
|
||||
|
||||
}
|
||||
|
||||
sub tests_host_port_ssl_from_user {
|
||||
is( undef, host_port_ssl_from_user( ), 'host_port_ssl_from_user: no args => undef' ) ;
|
||||
is_deeply( [qw( imap.gmail.com. 993 1 )], [host_port_ssl_from_user( 'gilles.lamiral@gmail.com' )],
|
||||
'host_port_ssl_from_user: gilles.lamiral@gmail.com => imap.gmail.com. 993 1 (ssl)' ) ;
|
||||
|
||||
}
|
||||
|
||||
sub host_port_from_lookup_srv {
|
||||
my $request = shift @ARG ;
|
||||
|
||||
my $lookup = lookup_srv_string( $request ) ;
|
||||
if ( ! $lookup ) {
|
||||
return ;
|
||||
}
|
||||
|
||||
my $host = server_name_from_srv_string( $lookup ) ;
|
||||
my $port = server_port_from_srv_string( $lookup ) ;
|
||||
|
||||
if( $host and $port ) {
|
||||
return ( $host, $port ) ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub domain_name_of_email {
|
||||
my $email = shift ;
|
||||
|
||||
return( undef ) if ( not $email ) ;
|
||||
|
||||
my $domain ;
|
||||
|
||||
if ( $email =~ /^.*@([^@]+)$/ ) {
|
||||
$domain = $1 ;
|
||||
$debug and print "domain: $domain\n" ;
|
||||
return( $domain ) ;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
sub domain_name_of {
|
||||
my $email = shift ;
|
||||
|
||||
return( undef ) if ( not $email ) ;
|
||||
|
||||
my $domain = domain_name_of_email( $email ) ;
|
||||
|
||||
if ( ! $domain ) {
|
||||
$domain = $email ;
|
||||
}
|
||||
|
||||
return( $domain ) ;
|
||||
}
|
||||
|
||||
sub tests_domain_name_of {
|
||||
ok( not( domain_name_of( '' ) ), 'domain_name_of: void => undef' ) ;
|
||||
ok( not( domain_name_of( ) ), 'domain_name_of: undef => undef' ) ;
|
||||
ok( 'foo' eq domain_name_of( 'foo' ), 'domain_name_of: foo => foo' ) ;
|
||||
#ok( 'foo' eq domain_name_of( 'foo ' ), 'domain_name_of: foo => foo' ) ;
|
||||
#ok( 'foo' eq domain_name_of( 'foo ' ), 'domain_name_of: foo => foo' ) ;
|
||||
ok( 'example.com' eq domain_name_of( 'foo@example.com' ), 'domain_name_of: foo@example.com => example.com' ) ;
|
||||
ok( 'example.com' eq domain_name_of( '@foo@example.com' ), 'domain_name_of: @foo@example.com => example.com' ) ;
|
||||
ok( 'example.com' eq domain_name_of( 'bar@foo@example.com' ), 'domain_name_of: bar@foo@example.com => example.com' ) ;
|
||||
}
|
||||
|
||||
sub lookup_srv_string {
|
||||
my $name = shift ;
|
||||
|
||||
my $resolver = new Net::DNS::Resolver( ) ;
|
||||
my $reply = $resolver->query( $name, 'SRV' ) ;
|
||||
|
||||
my $string ;
|
||||
if ( $reply ) {
|
||||
#($reply->answer)[0]->print;
|
||||
foreach my $rr ( $reply->answer ) {
|
||||
$debug and print 'name: ' . $rr->name . "\n" ;
|
||||
$debug and print 'class: ' . $rr->class . "\n" ;
|
||||
$debug and print 'type: ' . $rr->type . "\n" ;
|
||||
$debug and print 'ttl: ' . $rr->ttl . "\n" ;
|
||||
$debug and print 'string: ' . $rr->string . "\n" ;
|
||||
next if ( 'SRV' ne $rr->type ) ;
|
||||
next if ( not( $rr->string ) ) ;
|
||||
$string = $rr->string ;
|
||||
return( $string ) ;
|
||||
}
|
||||
} else {
|
||||
print "Query failed SRV for domain $name: ", $resolver->errorstring, "\n" ;
|
||||
return( undef ) ;
|
||||
}
|
||||
return( $string ) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
sub server_name_from_srv_string {
|
||||
my $srv_string = shift ;
|
||||
|
||||
return( undef ) if ( not $srv_string ) ;
|
||||
my $server_name = (split( /\s+/ , $srv_string ) )[7] ;
|
||||
return( undef ) if ( '.' eq $server_name ) ;
|
||||
return( $server_name ) ;
|
||||
}
|
||||
|
||||
sub tests_server_name_from_srv_string {
|
||||
ok( not( server_name_from_srv_string( '' ) ), 'server_name_from_srv_string: void' ) ;
|
||||
ok( not( server_name_from_srv_string( ) ), 'server_name_from_srv_string: undef' ) ;
|
||||
ok( 'imap.gmail.com.' eq
|
||||
server_name_from_srv_string( '_imaps._tcp.gmail.com. 82466 IN SRV 5 0 993 imap.gmail.com.' ),
|
||||
'server_name_from_srv_string: _imaps._tcp.gmail.com. => imap.gmail.com.' ) ;
|
||||
ok( not( server_name_from_srv_string( '_imap._tcp.gmail.com. 81999 IN SRV 0 0 0 .' ) ),
|
||||
'server_name_from_srv_string: _imap._tcp.gmail.com. => undef' ) ;
|
||||
|
||||
return( ) ;
|
||||
}
|
||||
|
||||
sub server_port_from_srv_string {
|
||||
my $srv_string = shift ;
|
||||
|
||||
return( undef ) if ( not $srv_string ) ;
|
||||
my $server_port = (split( /\s+/ , $srv_string ) )[6] ;
|
||||
return( undef ) if ( 0 == $server_port ) ;
|
||||
return( $server_port ) ;
|
||||
}
|
||||
|
||||
sub tests_server_port_from_srv_string {
|
||||
ok( not( server_port_from_srv_string( '' ) ), 'server_port_from_srv_string: void' ) ;
|
||||
ok( not( server_port_from_srv_string( ) ), 'server_port_from_srv_string: undef' ) ;
|
||||
ok( '993' eq
|
||||
server_port_from_srv_string( '_imaps._tcp.gmail.com. 82466 IN SRV 5 0 993 imap.gmail.com.' ),
|
||||
'server_port_from_srv_string: _imaps._tcp.gmail.com. => 993' ) ;
|
||||
ok( not( server_port_from_srv_string( '_imap._tcp.gmail.com. 81999 IN SRV 0 0 0 .' ) ),
|
||||
'server_port_from_srv_string: _imap._tcp.gmail.com. => undef' ) ;
|
||||
|
||||
return( ) ;
|
||||
}
|
249
W/learn/dns_srv_imap.tdy
Executable file
249
W/learn/dns_srv_imap.tdy
Executable file
|
@ -0,0 +1,249 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: dns_srv_imap,v 1.5 2016/08/15 01:24:20 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use English;
|
||||
use Test::More;
|
||||
use Net::DNS;
|
||||
|
||||
# _imaps._tcp.gmail.com. 86183 IN SRV 5 0 993 imap.gmail.com.
|
||||
lookup_srv_string('_imaps._tcp.gmail.com');
|
||||
|
||||
#lookup_srv( '_imap._tcp.gmail.com' ) ;
|
||||
#lookup_srv( '_imaps._tcp.lamiral.info' ) ;
|
||||
#lookup_srv( '_imap._tcp.lamiral.info' ) ;
|
||||
|
||||
foreach my $email (@ARGV) {
|
||||
my $domain = domain_name_of($email);
|
||||
print "Domain for email $email: $domain\n";
|
||||
my ( $host, $port ) = host_port_from_lookup_srv( '_imaps._tcp.' . $domain );
|
||||
$host ||= q{};
|
||||
$port ||= q{};
|
||||
print "IMAPS server name and port for $email: $host $port\n";
|
||||
|
||||
( $host, $port ) = host_port_from_lookup_srv( '_imap._tcp.' . $domain );
|
||||
$host ||= q{};
|
||||
$port ||= q{};
|
||||
print "IMAP server name and port for $email: $host $port\n";
|
||||
|
||||
}
|
||||
|
||||
tests_server_name_from_srv_string();
|
||||
tests_server_port_from_srv_string();
|
||||
tests_domain_name_of();
|
||||
tests_host_port_ssl_from_user();
|
||||
done_testing();
|
||||
|
||||
my $debug = 1;
|
||||
|
||||
sub host_port_ssl_from_user {
|
||||
my $user = shift @ARG;
|
||||
|
||||
if ( !$user ) {
|
||||
return;
|
||||
}
|
||||
|
||||
my $domain = domain_name_of($user);
|
||||
if ( !$domain ) {
|
||||
return;
|
||||
}
|
||||
|
||||
my ( $host, $port ) = host_port_from_lookup_srv(qq{_imaps._tcp.$domain});
|
||||
my $ssl = 1;
|
||||
if ( $host and $port ) {
|
||||
return ( $host, $port, $ssl );
|
||||
}
|
||||
|
||||
# fallback to imap in clear
|
||||
$ssl = 0;
|
||||
( $host, $port ) = host_port_from_lookup_srv(qq{_imap._tcp.$domain});
|
||||
|
||||
if ( $host and $port ) {
|
||||
return ( $host, $port, $ssl );
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
sub tests_host_port_ssl_from_user {
|
||||
is( undef, host_port_ssl_from_user(),
|
||||
'host_port_ssl_from_user: no args => undef' );
|
||||
is_deeply(
|
||||
[qw( imap.gmail.com. 993 1 )],
|
||||
[ host_port_ssl_from_user('gilles.lamiral@gmail.com') ],
|
||||
'host_port_ssl_from_user: gilles.lamiral@gmail.com => imap.gmail.com. 993 1 (ssl)'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
sub host_port_from_lookup_srv {
|
||||
my $request = shift @ARG;
|
||||
|
||||
my $lookup = lookup_srv_string($request);
|
||||
if ( !$lookup ) {
|
||||
return;
|
||||
}
|
||||
|
||||
my $host = server_name_from_srv_string($lookup);
|
||||
my $port = server_port_from_srv_string($lookup);
|
||||
|
||||
if ( $host and $port ) {
|
||||
return ( $host, $port );
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sub domain_name_of_email {
|
||||
my $email = shift;
|
||||
|
||||
return (undef) if ( not $email );
|
||||
|
||||
my $domain;
|
||||
|
||||
if ( $email =~ /^.*@([^@]+)$/ ) {
|
||||
$domain = $1;
|
||||
$debug and print "domain: $domain\n";
|
||||
return ($domain);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
sub domain_name_of {
|
||||
my $email = shift;
|
||||
|
||||
return (undef) if ( not $email );
|
||||
|
||||
my $domain = domain_name_of_email($email);
|
||||
|
||||
if ( !$domain ) {
|
||||
$domain = $email;
|
||||
}
|
||||
|
||||
return ($domain);
|
||||
}
|
||||
|
||||
sub tests_domain_name_of {
|
||||
ok( not( domain_name_of('') ), 'domain_name_of: void => undef' );
|
||||
ok( not( domain_name_of() ), 'domain_name_of: undef => undef' );
|
||||
ok( 'foo' eq domain_name_of('foo'), 'domain_name_of: foo => foo' );
|
||||
|
||||
#ok( 'foo' eq domain_name_of( 'foo ' ), 'domain_name_of: foo => foo' ) ;
|
||||
#ok( 'foo' eq domain_name_of( 'foo ' ), 'domain_name_of: foo => foo' ) ;
|
||||
ok(
|
||||
'example.com' eq domain_name_of('foo@example.com'),
|
||||
'domain_name_of: foo@example.com => example.com'
|
||||
);
|
||||
ok(
|
||||
'example.com' eq domain_name_of('@foo@example.com'),
|
||||
'domain_name_of: @foo@example.com => example.com'
|
||||
);
|
||||
ok(
|
||||
'example.com' eq domain_name_of('bar@foo@example.com'),
|
||||
'domain_name_of: bar@foo@example.com => example.com'
|
||||
);
|
||||
}
|
||||
|
||||
sub lookup_srv_string {
|
||||
my $name = shift;
|
||||
|
||||
my $resolver = new Net::DNS::Resolver();
|
||||
my $reply = $resolver->query( $name, 'SRV' );
|
||||
|
||||
my $string;
|
||||
if ($reply) {
|
||||
|
||||
#($reply->answer)[0]->print;
|
||||
foreach my $rr ( $reply->answer ) {
|
||||
$debug and print 'name: ' . $rr->name . "\n";
|
||||
$debug and print 'class: ' . $rr->class . "\n";
|
||||
$debug and print 'type: ' . $rr->type . "\n";
|
||||
$debug and print 'ttl: ' . $rr->ttl . "\n";
|
||||
$debug and print 'string: ' . $rr->string . "\n";
|
||||
next if ( 'SRV' ne $rr->type );
|
||||
next if ( not( $rr->string ) );
|
||||
$string = $rr->string;
|
||||
return ($string);
|
||||
}
|
||||
}
|
||||
else {
|
||||
print "Query failed SRV for domain $name: ", $resolver->errorstring,
|
||||
"\n";
|
||||
return (undef);
|
||||
}
|
||||
return ($string);
|
||||
}
|
||||
|
||||
sub server_name_from_srv_string {
|
||||
my $srv_string = shift;
|
||||
|
||||
return (undef) if ( not $srv_string );
|
||||
my $server_name = ( split( /\s+/, $srv_string ) )[7];
|
||||
return (undef) if ( '.' eq $server_name );
|
||||
return ($server_name);
|
||||
}
|
||||
|
||||
sub tests_server_name_from_srv_string {
|
||||
ok(
|
||||
not( server_name_from_srv_string('') ),
|
||||
'server_name_from_srv_string: void'
|
||||
);
|
||||
ok(
|
||||
not( server_name_from_srv_string() ),
|
||||
'server_name_from_srv_string: undef'
|
||||
);
|
||||
ok(
|
||||
'imap.gmail.com.' eq server_name_from_srv_string(
|
||||
'_imaps._tcp.gmail.com. 82466 IN SRV 5 0 993 imap.gmail.com.'
|
||||
),
|
||||
'server_name_from_srv_string: _imaps._tcp.gmail.com. => imap.gmail.com.'
|
||||
);
|
||||
ok(
|
||||
not(
|
||||
server_name_from_srv_string(
|
||||
'_imap._tcp.gmail.com. 81999 IN SRV 0 0 0 .')
|
||||
),
|
||||
'server_name_from_srv_string: _imap._tcp.gmail.com. => undef'
|
||||
);
|
||||
|
||||
return ();
|
||||
}
|
||||
|
||||
sub server_port_from_srv_string {
|
||||
my $srv_string = shift;
|
||||
|
||||
return (undef) if ( not $srv_string );
|
||||
my $server_port = ( split( /\s+/, $srv_string ) )[6];
|
||||
return (undef) if ( 0 == $server_port );
|
||||
return ($server_port);
|
||||
}
|
||||
|
||||
sub tests_server_port_from_srv_string {
|
||||
ok(
|
||||
not( server_port_from_srv_string('') ),
|
||||
'server_port_from_srv_string: void'
|
||||
);
|
||||
ok(
|
||||
not( server_port_from_srv_string() ),
|
||||
'server_port_from_srv_string: undef'
|
||||
);
|
||||
ok(
|
||||
'993' eq server_port_from_srv_string(
|
||||
'_imaps._tcp.gmail.com. 82466 IN SRV 5 0 993 imap.gmail.com.'
|
||||
),
|
||||
'server_port_from_srv_string: _imaps._tcp.gmail.com. => 993'
|
||||
);
|
||||
ok(
|
||||
not(
|
||||
server_port_from_srv_string(
|
||||
'_imap._tcp.gmail.com. 81999 IN SRV 0 0 0 .')
|
||||
),
|
||||
'server_port_from_srv_string: _imap._tcp.gmail.com. => undef'
|
||||
);
|
||||
|
||||
return ();
|
||||
}
|
9
W/learn/imap_utf7_tests
Executable file
9
W/learn/imap_utf7_tests
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
|
||||
echo 收件箱
|
||||
|
||||
touch './+ZyhnUA-'
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
perl -I../Mail-IMAPClient-2.2.9 "$@"
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
perl -I../Mail-IMAPClient-3.28/lib "$@"
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use Net::DNS;
|
||||
|
||||
|
||||
|
||||
lookup_srv( '_imaps._tcp.gmail.com' ) ;
|
||||
lookup_srv( '_imap._tcp.gmail.com' ) ;
|
||||
|
||||
sub lookup_srv {
|
||||
my $name = shift ;
|
||||
|
||||
my $resolver = new Net::DNS::Resolver( ) ;
|
||||
my $reply = $resolver->query( $name, 'SRV' ) ;
|
||||
|
||||
if ( $reply ) {
|
||||
#($reply->answer)[0]->print;
|
||||
foreach my $rr ($reply->answer) {
|
||||
print $rr->name . "\n" ;
|
||||
print $rr->class . "\n" ;
|
||||
print $rr->type . "\n" ;
|
||||
print $rr->ttl . "\n" ;
|
||||
print $rr->string . "\n" ;
|
||||
}
|
||||
} else {
|
||||
print "query failed: ", $resolver->errorstring, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub lookup_address {
|
||||
# Perform a lookup, using the searchlist if appropriate.
|
||||
my $resolver = new Net::DNS::Resolver( ) ;
|
||||
my $reply = $resolver->search( 'example.com' );
|
||||
if ($reply) {
|
||||
foreach my $rr ($reply->answer) {
|
||||
next unless $rr->type eq "A";
|
||||
print $rr->address, "\n";
|
||||
}
|
||||
} else {
|
||||
warn "query failed: ", $resolver->errorstring, "\n";
|
||||
}
|
||||
}
|
||||
|
16
W/learn/perlcritic_ProhibitInterpolationOfLiterals
Executable file
16
W/learn/perlcritic_ProhibitInterpolationOfLiterals
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: perlcritic_ProhibitInterpolationOfLiterals,v 1.3 2016/06/15 22:18:23 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION = q$Revision: 1.3 $;
|
||||
|
||||
if ( "\1foo" eq '\1foo' ) {
|
||||
print "equal\n";
|
||||
}
|
||||
else {
|
||||
print "not equal\n";
|
||||
}
|
||||
|
16
W/learn/perlcritic_ProhibitInterpolationOfLiterals_2
Executable file
16
W/learn/perlcritic_ProhibitInterpolationOfLiterals_2
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: perlcritic_ProhibitInterpolationOfLiterals,v 1.3 2016/06/15 22:18:23 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION = q$Revision: 1.3 $;
|
||||
|
||||
if ( "\afoo" eq '\afoo' ) {
|
||||
print "equal\n";
|
||||
}
|
||||
else {
|
||||
print "not equal\n";
|
||||
}
|
||||
|
27
W/learn/print
Executable file
27
W/learn/print
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: print,v 1.1 2016/06/16 19:10:04 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use English;
|
||||
|
||||
our $VERSION = q$Revision: 1.1 $;
|
||||
|
||||
# myprint( STDOUT "Hello\n" ) ; # DO NOT WORK
|
||||
|
||||
open my $stdout, ">-" ;
|
||||
#myprint( $stdout, "Hello from myprint & filehandle\n" ) ; # DO NOT WORK
|
||||
close $stdout ;
|
||||
|
||||
myprint( "Hello\n" ) ; # WORKS
|
||||
|
||||
myprint( << 'EOF' ) ;
|
||||
lalala
|
||||
myprint inline
|
||||
EOF
|
||||
|
||||
exit;
|
||||
|
||||
sub myprint { print @ARG ; }
|
||||
|
24
W/learn/quotes
Executable file
24
W/learn/quotes
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
|
||||
print "123456789\\" ."\n" ;
|
||||
print '123456789\\' ."\n" ;
|
||||
print "123456789\"" ."\n" ;
|
||||
print '123456789\'' ."\n" ;
|
||||
|
||||
print "\\" ."\n" ;
|
||||
print q{\\} ."\n" ;
|
||||
|
||||
print qq{ !"#$%&'()*+,-./0123456789:;<=>?\@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg\n} ;
|
||||
|
||||
print "\1auth=Bearer " . "\1\1" . "\n" ;
|
||||
print '\1auth=Bearer ' . '\1\1' . "\n" ;
|
||||
|
||||
if ( "\1foo" eq '\1foo' ) {
|
||||
print "equal\n" ;
|
||||
}else{
|
||||
print "not equal\n" ;
|
||||
}
|
||||
|
12
W/learn/ref
Executable file
12
W/learn/ref
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
||||
my $debug = 'val_debug' ;
|
||||
|
||||
print "ref(\\\$debug)=" . ref(\$debug) . "\n" ;
|
||||
print "ref(\$debug)=" . ref($debug) . "\n" ;
|
||||
print "\n$debug=$debug\n" ;
|
0
W/learn/tmp/+ZyhnUA-
Normal file
0
W/learn/tmp/+ZyhnUA-
Normal file
0
W/learn/tmp/收件箱
Normal file
0
W/learn/tmp/收件箱
Normal file
21
W/learn/utf7_to_utf7imap
Executable file
21
W/learn/utf7_to_utf7imap
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: utf7_to_utf7imap,v 1.1 2016/08/08 22:57:44 gilles Exp gilles $
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
|
||||
foreach my $str_utf7 ( @ARGV ) {
|
||||
my $str_utf7imap = utf7_to_uft7imap( $str_utf7 ) ;
|
||||
print qq{mv '$str_utf7' '$str_utf7imap'\n} ;
|
||||
}
|
||||
|
||||
# http://cpansearch.perl.org/src/FABPOT/Unicode-IMAPUtf7-2.01/lib/Unicode/IMAPUtf7.pm
|
||||
sub utf7_to_uft7imap {
|
||||
my ( $s ) = @_ ;
|
||||
|
||||
$s =~ s/\+([^\/&\-]*)\/([^\/\-&]*)\-/\+$1,$2\-/g ;
|
||||
$s =~ s/&/&\-/g ;
|
||||
$s =~ s/\+([^+\-]+)?\-/&$1\-/g ;
|
||||
return( $s ) ;
|
||||
}
|
39
W/learn_func.bat
Normal file
39
W/learn_func.bat
Normal file
|
@ -0,0 +1,39 @@
|
|||
REM $Id: learn_func.bat,v 1.2 2016/06/28 11:39:42 gilles Exp gilles $
|
||||
|
||||
@SETLOCAL
|
||||
@ECHO OFF
|
||||
|
||||
ECHO Currently running through %0 %*
|
||||
|
||||
CD /D %~dp0
|
||||
|
||||
REM Remove the error file because its existence means an error occured during this script execution
|
||||
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
|
||||
|
||||
CALL :handle_error EXIT /B 1
|
||||
CALL :handle_error EXIT /B 0
|
||||
CALL :handle_error NOEXIST
|
||||
CALL :handle_error ECHO "STILL THERE? FIRST"
|
||||
CALL :handle_error EXIT 0
|
||||
CALL :handle_error ECHO "STILL THERE? SECOND"
|
||||
@ENDLOCAL
|
||||
@EXIT /B
|
||||
|
||||
|
||||
|
||||
:handle_error
|
||||
SETLOCAL
|
||||
ECHO IN %0 with parameters %*
|
||||
%*
|
||||
SET CMD_RETURN=%ERRORLEVEL%
|
||||
|
||||
IF %CMD_RETURN% EQU 0 (
|
||||
ECHO GOOD END
|
||||
) ELSE (
|
||||
ECHO BAD END
|
||||
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
||||
ECHO Failure running %* >> LOG_bat\%~nx0.txt
|
||||
)
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
m4_dnl $Id: ml_announce.in,v 1.12 2016/01/21 02:22:24 gilles Exp gilles $
|
||||
m4_dnl $Id: ml_announce.in,v 1.16 2016/08/18 09:38:48 gilles Exp gilles $
|
||||
m4_dnl
|
||||
m4_define(`M4_imapsync_VERSION',m4_esyscmd(cat VERSION|tr -d '\n'))m4_dnl
|
||||
m4_define(`M4_SECRET_PATH',m4_esyscmd(cat dist/path_last.txt|tr -d '\n'))m4_dnl
|
||||
|
@ -14,14 +14,15 @@ You're subscribed to the newsletter announcing imapsync new releases
|
|||
(very few traffic) and the way to get them. Send me a note if you
|
||||
don't want to receive those announces anymore.
|
||||
|
||||
You will find the latest imapsync.exe binary (release M4_imapsync_VERSION)
|
||||
and the latest imapsync source code (release M4_imapsync_VERSION) at the following link:
|
||||
You will find the latest imapsync.exe binary (release M4_imapsync_VERSION),
|
||||
the latest imapsync source code (release M4_imapsync_VERSION),
|
||||
OS X and Linux (i386) binaries at the following link:
|
||||
|
||||
http://imapsync.lamiral.info/dist/M4_SECRET_PATH/
|
||||
https://imapsync.lamiral.info/dist/M4_SECRET_PATH
|
||||
|
||||
or also more permanently from this page
|
||||
|
||||
http://imapsync.lamiral.info/paypal_return.shtml
|
||||
https://imapsync.lamiral.info/paypal_return.shtml
|
||||
|
||||
Three important files are there:
|
||||
* imapsync is directly the perl script (also found in the tarball and zip) for a fast upgrade.
|
||||
|
@ -29,20 +30,20 @@ Three important files are there:
|
|||
* imapsync.M4_imapsync_VERSION.zip is the win32 zip archive including standalone binary imapsync.exe.
|
||||
|
||||
What's new in this M4_imapsync_VERSION release can be found at
|
||||
http://imapsync.lamiral.info/S/news.shtml
|
||||
https://imapsync.lamiral.info/S/news.shtml
|
||||
|
||||
Vote for better imapsync and services at
|
||||
http://imapsync.lamiral.info/#poll
|
||||
http://imapsync.lamiral.info/poll.shtml
|
||||
|
||||
I thank you again for buying and using imapsync,
|
||||
I wish you successful imap transfers!
|
||||
|
||||
Feedback is welcome!
|
||||
|
||||
Web site: http://imapsync.lamiral.info/
|
||||
Web site: https://imapsync.lamiral.info/
|
||||
|
||||
--
|
||||
Au revoir.
|
||||
Gilles Lamiral, La Billais, 35580 Baulon, France
|
||||
tel +33 951 84 42 42
|
||||
mob +33 620 79 76 06
|
||||
mob +33 619 22 03 54
|
||||
|
|
|
@ -1,82 +1,86 @@
|
|||
1145 Etats-Unis_d'Amerique___ 25.78 % 25.78 % 1
|
||||
813 Allemagne_______________ 18.30 % 44.08 % 2
|
||||
418 Royaume-Uni_____________ 9.41 % 53.49 % 3
|
||||
213 France__________________ 4.80 % 58.28 % 4
|
||||
212 Italie__________________ 4.77 % 63.06 % 5
|
||||
202 Canada__________________ 4.55 % 67.60 % 6
|
||||
180 Suisse__________________ 4.05 % 71.66 % 7
|
||||
156 Pays-Bas________________ 3.51 % 75.17 % 8
|
||||
151 Australie_______________ 3.40 % 78.57 % 9
|
||||
90 Autriche________________ 2.03 % 80.59 % 10
|
||||
80 Belgique________________ 1.80 % 82.40 % 11
|
||||
76 Espagne_________________ 1.71 % 84.11 % 12
|
||||
65 Suede___________________ 1.46 % 85.57 % 13
|
||||
53 Danemark________________ 1.19 % 86.76 % 14
|
||||
48 Bresil__________________ 1.08 % 87.84 % 15
|
||||
41 Norvege_________________ 0.92 % 88.77 % 16
|
||||
31 Finlande________________ 0.70 % 89.46 % 17
|
||||
29 Pologne_________________ 0.65 % 90.12 % 18
|
||||
26 Japon___________________ 0.59 % 90.70 % 19
|
||||
25 Republique_tcheque______ 0.56 % 91.27 % 20
|
||||
25 ________________________ 0.56 % 91.83 % 21
|
||||
22 Russie__________________ 0.50 % 92.32 % 22
|
||||
22 Irlande_________________ 0.50 % 92.82 % 23
|
||||
21 Nouvelle-Zelande________ 0.47 % 93.29 % 24
|
||||
18 Hongrie_________________ 0.41 % 93.70 % 25
|
||||
15 Hong-Kong_______________ 0.34 % 94.03 % 26
|
||||
15 Afrique_du_Sud__________ 0.34 % 94.37 % 27
|
||||
14 Portugal________________ 0.32 % 94.69 % 28
|
||||
13 Slovaquie_______________ 0.29 % 94.98 % 29
|
||||
13 Malaisie________________ 0.29 % 95.27 % 30
|
||||
12 Luxembourg______________ 0.27 % 95.54 % 31
|
||||
12 Inde____________________ 0.27 % 95.81 % 32
|
||||
12 Grece___________________ 0.27 % 96.08 % 33
|
||||
12 Argentine_______________ 0.27 % 96.35 % 34
|
||||
11 Singapour_______________ 0.25 % 96.60 % 35
|
||||
11 Israel__________________ 0.25 % 96.85 % 36
|
||||
11 Chine___________________ 0.25 % 97.10 % 37
|
||||
11 Chili___________________ 0.25 % 97.34 % 38
|
||||
10 Mexique_________________ 0.23 % 97.57 % 39
|
||||
9 Roumanie________________ 0.20 % 97.77 % 40
|
||||
8 Slovenie________________ 0.18 % 97.95 % 41
|
||||
8 Emirats_Arabes_Unis_____ 0.18 % 98.13 % 42
|
||||
7 Lettonie________________ 0.16 % 98.29 % 43
|
||||
5 Thailande_______________ 0.11 % 98.40 % 44
|
||||
5 Malte___________________ 0.11 % 98.51 % 45
|
||||
5 Islande_________________ 0.11 % 98.63 % 46
|
||||
4 Turquie_________________ 0.09 % 98.72 % 47
|
||||
4 Indonesie_______________ 0.09 % 98.81 % 48
|
||||
4 Egypte__________________ 0.09 % 98.90 % 49
|
||||
4 Croatie_________________ 0.09 % 98.99 % 50
|
||||
4 Bulgarie________________ 0.09 % 99.08 % 51
|
||||
3 Venezuela_______________ 0.07 % 99.14 % 52
|
||||
3 Philippines_____________ 0.07 % 99.21 % 53
|
||||
3 Estonie_________________ 0.07 % 99.28 % 54
|
||||
2 Vietnam_________________ 0.05 % 99.32 % 55
|
||||
2 Uruguay_________________ 0.05 % 99.37 % 56
|
||||
2 Lituanie________________ 0.05 % 99.41 % 57
|
||||
2 Costa_Rica______________ 0.05 % 99.46 % 58
|
||||
2 Chypre__________________ 0.05 % 99.50 % 59
|
||||
1 Ukraine_________________ 0.02 % 99.53 % 60
|
||||
1 Trinite-et-Tobago_______ 0.02 % 99.55 % 61
|
||||
1 Tanzanie________________ 0.02 % 99.57 % 62
|
||||
1 Taiwan__________________ 0.02 % 99.59 % 63
|
||||
1 Serbie__________________ 0.02 % 99.62 % 64
|
||||
1 Senegal_________________ 0.02 % 99.64 % 65
|
||||
1 Saint_Christophe-Nevis-Anguilla__ 0.02 % 99.66 % 66
|
||||
1 Qatar___________________ 0.02 % 99.68 % 67
|
||||
1 Perou___________________ 0.02 % 99.71 % 68
|
||||
1 Panama__________________ 0.02 % 99.73 % 69
|
||||
1 Nouvelle-Caledonie______ 0.02 % 99.75 % 70
|
||||
1 Nigeria_________________ 0.02 % 99.77 % 71
|
||||
1 Namibie_________________ 0.02 % 99.80 % 72
|
||||
1 Mongolie________________ 0.02 % 99.82 % 73
|
||||
1 Moldavie________________ 0.02 % 99.84 % 74
|
||||
1 Maldives________________ 0.02 % 99.86 % 75
|
||||
1 Îles_Vierges_britanniques__ 0.02 % 99.89 % 76
|
||||
1 Koweit__________________ 0.02 % 99.91 % 77
|
||||
1 Jordanie________________ 0.02 % 99.93 % 78
|
||||
1 Colombie________________ 0.02 % 99.95 % 79
|
||||
1 Bahrein_________________ 0.02 % 99.98 % 80
|
||||
1 Antilles_neerlandaises__ 0.02 % 100.00 % 81
|
||||
TOTAL = 4442 sales over 81 countries on Sat Jan 23 10:46:48 CET 2016
|
||||
1225 Etats-Unis______________ 24.84 % 25 % 1
|
||||
918 Allemagne_______________ 18.62 % 43 % 2
|
||||
454 Royaume-Uni_____________ 9.21 % 53 % 3
|
||||
253 Italie__________________ 5.13 % 58 % 4
|
||||
243 France__________________ 4.93 % 63 % 5
|
||||
219 Canada__________________ 4.44 % 67 % 6
|
||||
199 Suisse__________________ 4.04 % 71 % 7
|
||||
183 Pays-Bas________________ 3.71 % 75 % 8
|
||||
172 Australie_______________ 3.49 % 78 % 9
|
||||
98 Autriche________________ 1.99 % 80 % 10
|
||||
91 Espagne_________________ 1.85 % 82 % 11
|
||||
88 Belgique________________ 1.78 % 84 % 12
|
||||
71 Suede___________________ 1.44 % 85 % 13
|
||||
58 Danemark________________ 1.18 % 87 % 14
|
||||
51 Bresil__________________ 1.03 % 88 % 15
|
||||
43 Norvege_________________ 0.87 % 89 % 16
|
||||
36 Pologne_________________ 0.73 % 89 % 17
|
||||
33 Finlande________________ 0.67 % 90 % 18
|
||||
28 Republique_tcheque______ 0.57 % 91 % 19
|
||||
26 Russie__________________ 0.53 % 91 % 20
|
||||
26 Japon___________________ 0.53 % 92 % 21
|
||||
25 ________________________ 0.51 % 92 % 22
|
||||
23 Nouvelle-Zelande________ 0.47 % 93 % 23
|
||||
23 Irlande_________________ 0.47 % 93 % 24
|
||||
23 Hongrie_________________ 0.47 % 93 % 25
|
||||
19 Portugal________________ 0.39 % 94 % 26
|
||||
18 Hong-Kong_______________ 0.37 % 94 % 27
|
||||
18 Grece___________________ 0.37 % 95 % 28
|
||||
18 Afrique_du_Sud__________ 0.37 % 95 % 29
|
||||
14 Slovaquie_______________ 0.28 % 95 % 30
|
||||
14 Malaisie________________ 0.28 % 96 % 31
|
||||
13 Luxembourg______________ 0.26 % 96 % 32
|
||||
13 Inde____________________ 0.26 % 96 % 33
|
||||
12 Singapour_______________ 0.24 % 96 % 34
|
||||
12 Mexique_________________ 0.24 % 97 % 35
|
||||
12 Argentine_______________ 0.24 % 97 % 36
|
||||
11 Israel__________________ 0.22 % 97 % 37
|
||||
11 Chine___________________ 0.22 % 97 % 38
|
||||
11 Chili___________________ 0.22 % 97 % 39
|
||||
10 Roumanie________________ 0.20 % 98 % 40
|
||||
9 Slovenie________________ 0.18 % 98 % 41
|
||||
9 Lettonie________________ 0.18 % 98 % 42
|
||||
9 Emirats_Arabes_Unis_____ 0.18 % 98 % 43
|
||||
7 Croatie_________________ 0.14 % 98 % 44
|
||||
6 Thailande_______________ 0.12 % 98 % 45
|
||||
5 Malte___________________ 0.10 % 99 % 46
|
||||
5 Islande_________________ 0.10 % 99 % 47
|
||||
4 Turquie_________________ 0.08 % 99 % 48
|
||||
4 Indonesie_______________ 0.08 % 99 % 49
|
||||
4 Estonie_________________ 0.08 % 99 % 50
|
||||
4 Egypte__________________ 0.08 % 99 % 51
|
||||
4 Bulgarie________________ 0.08 % 99 % 52
|
||||
3 Venezuela_______________ 0.06 % 99 % 53
|
||||
3 Serbie__________________ 0.06 % 99 % 54
|
||||
3 Philippines_____________ 0.06 % 99 % 55
|
||||
2 Vietnam_________________ 0.04 % 99 % 56
|
||||
2 Uruguay_________________ 0.04 % 99 % 57
|
||||
2 Perou___________________ 0.04 % 99 % 58
|
||||
2 Lituanie________________ 0.04 % 99 % 59
|
||||
2 Costa_Rica______________ 0.04 % 99 % 60
|
||||
2 Chypre__________________ 0.04 % 99 % 61
|
||||
2 Antilles_neerlandaises__ 0.04 % 100 % 62
|
||||
1 Ukraine_________________ 0.02 % 100 % 63
|
||||
1 Trinite-et-Tobago_______ 0.02 % 100 % 64
|
||||
1 Tanzanie________________ 0.02 % 100 % 65
|
||||
1 Taiwan__________________ 0.02 % 100 % 66
|
||||
1 Senegal_________________ 0.02 % 100 % 67
|
||||
1 Saint_Christophe-Nevis-Anguilla__ 0.02 % 100 % 68
|
||||
1 Qatar___________________ 0.02 % 100 % 69
|
||||
1 Panama__________________ 0.02 % 100 % 70
|
||||
1 Nouvelle-Caledonie______ 0.02 % 100 % 71
|
||||
1 Nigeria_________________ 0.02 % 100 % 72
|
||||
1 Namibie_________________ 0.02 % 100 % 73
|
||||
1 Mongolie________________ 0.02 % 100 % 74
|
||||
1 Moldavie________________ 0.02 % 100 % 75
|
||||
1 Maldives________________ 0.02 % 100 % 76
|
||||
1 Koweit__________________ 0.02 % 100 % 77
|
||||
1 Jordanie________________ 0.02 % 100 % 78
|
||||
1 Iles_Vierges_britanniques__ 0.02 % 100 % 79
|
||||
1 Grenade_________________ 0.02 % 100 % 80
|
||||
1 Coree_du_Sud____________ 0.02 % 100 % 81
|
||||
1 Colombie________________ 0.02 % 100 % 82
|
||||
1 Cameroun________________ 0.02 % 100 % 83
|
||||
1 Burkina_Faso____________ 0.02 % 100 % 84
|
||||
1 Bahrein_________________ 0.02 % 100 % 85
|
||||
TOTAL = 4931 sales 219147 EUR over 85 countries on Tue Aug 16 19:44:43 CEST 2016
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: memo,v 1.18 2015/12/03 16:47:48 gilles Exp gilles $
|
||||
# $Id: memo,v 1.19 2016/08/09 10:50:30 gilles Exp gilles $
|
||||
|
||||
|
||||
echo paypal_bilan_todo
|
||||
|
@ -29,6 +29,49 @@ EOF
|
|||
}
|
||||
|
||||
|
||||
echo paypal_bilan_changefix_Commission_Frais
|
||||
paypal_bilan_changefix_Commission_Frais() {
|
||||
# DID output diff between
|
||||
(
|
||||
#set -x
|
||||
perl -c /g/public_html/imapsync/W/paypal_reply/paypal_bilan || return 1
|
||||
cd /g/var/paypal_bilan_changefix_Commission_Frais || return 1
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan_1.81 \
|
||||
--debug --debug_csv --debug_email --details --debug_invoice \
|
||||
--dir_invoices /g/var/paypal_invoices_dev --first_in 40001 \
|
||||
2016_07_old.csv \
|
||||
> 2016_07_old.out1 2>&1 || return 1
|
||||
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||
--debug --debug_csv --debug_email --details --debug_invoice \
|
||||
--dir_invoices /g/var/paypal_invoices_dev --first_in 40001 \
|
||||
2016_07_old.csv \
|
||||
> 2016_07_old.out2 2>&1 || return 1
|
||||
|
||||
echo diff 2016_07_old.out1 2016_07_old.out2
|
||||
diff 2016_07_old.out1 2016_07_old.out2
|
||||
|
||||
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||
--debug --debug_csv --debug_email --details --debug_invoice \
|
||||
--dir_invoices /g/var/paypal_invoices_dev --first_in 40001 \
|
||||
2016_07_old.csv \
|
||||
> 2016_07_old.out3 2>&1 || return 1
|
||||
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||
--debug --debug_csv --debug_email --details --debug_invoice \
|
||||
--dir_invoices /g/var/paypal_invoices_dev --first_in 40001 \
|
||||
2016_07_new.csv \
|
||||
> 2016_07_new.out3 2>&1 || return 1
|
||||
|
||||
echo diff 2016_07_old.out3 2016_07_new.out3
|
||||
diff 2016_07_old.out3 2016_07_new.out3
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo paypal_bilan_licence_support_only_csv
|
||||
paypal_bilan_licence_support_only_csv() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_bilan,v 1.81 2016/01/23 09:37:19 gilles Exp gilles $
|
||||
# $Id: paypal_bilan,v 1.83 2016/08/18 09:43:40 gilles Exp gilles $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
@ -13,7 +13,7 @@ use Test::More 'no_plan' ;
|
|||
|
||||
die unless (utf8_supported_charset('ISO-8859-1'));
|
||||
|
||||
my $rcs = '$Id: paypal_bilan,v 1.81 2016/01/23 09:37:19 gilles Exp gilles $ ' ;
|
||||
my $rcs = '$Id: paypal_bilan,v 1.83 2016/08/18 09:43:40 gilles Exp gilles $ ' ;
|
||||
$rcs =~ m/,v (\d+\.\d+)/ ;
|
||||
my $VERSION = ($1) ? $1: "UNKNOWN" ;
|
||||
|
||||
|
@ -592,6 +592,18 @@ sub compute_line {
|
|||
|
||||
( $A->{Etat} ) = @action{ ( 'Etat' ) } || @action{ ( 'État' ) } ;
|
||||
( $A->{Hors_taxe_paypal} ) = @action{ ( 'Hors taxe' ) } || @action{ ( 'Avant commission' ) } ;
|
||||
|
||||
# August 2016
|
||||
( $A->{N_de_transaction} ) = @action{ ( 'N° de transaction' ) } || @action{ ( 'Numéro de transaction' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
#( $A->{} ) = @action{ ( '' ) } || @action{ ( '' ) } ;
|
||||
|
||||
#
|
||||
$A->{Impact_sur_le_solde} ||= '' ;
|
||||
$A->{invoice} = 'NONE' ;
|
||||
$A->{Montant} = $action->{ 'Net' } if not defined $A->{Montant};
|
||||
|
@ -700,6 +712,16 @@ sub build_invoice {
|
|||
'Etat/Province/Région/Comté/Territoire/Préfecture/République', 'Code postal', 'Pays', 'line_number', 'line_csv', 'file_csv',
|
||||
'Nom Option 2', 'Option 2 Valeur' ) } ;
|
||||
|
||||
# August 2016
|
||||
$F->{Commission} = $action->{'Commission'} || $action->{'Frais'} ;
|
||||
$F->{N_de_transaction} = $action->{'N° de transaction'} || $action->{'Numéro de transaction'} ;
|
||||
$F->{Adresse_1} = $action->{'Adresse 1'} || $action->{'Adresse (ligne 1)'} ;
|
||||
#$F->{} = $action->{''} || $action->{''} ;
|
||||
#$F->{} = $action->{''} || $action->{''} ;
|
||||
#$F->{} = $action->{''} || $action->{''} ;
|
||||
#$F->{} = $action->{''} || $action->{''} ;
|
||||
#
|
||||
|
||||
$F->{Etat_Province} = $action->{'Etat/Province/Région/Comté/Territoire/Préfecture/République'}
|
||||
|| $action->{'État/Province/Région/Comté/Territoire/Préfecture/République'}
|
||||
|| '' ;
|
||||
|
@ -918,11 +940,14 @@ or any other gpg graphical tool.
|
|||
|
||||
Once more, thank you for buying and using imapsync $F->{object_type}.
|
||||
|
||||
Any feedback is welcome.
|
||||
Any feedback is welcome!
|
||||
Best Regards.
|
||||
|
||||
--
|
||||
Best Regards, 09 51 84 42 42
|
||||
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06
|
||||
Gilles Lamiral.
|
||||
add: La Billais 35580 Baulon, France
|
||||
mob: +33 6 19 22 03 54
|
||||
fix: +33 9 51 84 42 42
|
||||
} ;
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_build_invoice_from_email,v 1.2 2013/02/08 14:59:34 gilles Exp gilles $
|
||||
# $Id: paypal_build_invoice_from_email,v 1.3 2016/08/18 09:51:17 gilles Exp gilles $
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
@ -136,7 +136,7 @@ while(<>) {
|
|||
|
||||
my $address = 'gilles.lamiral@laposte.net';
|
||||
my $address2 = 'gilles@lamiral.info';
|
||||
my $rcstag = '$Id: paypal_build_invoice_from_email,v 1.2 2013/02/08 14:59:34 gilles Exp gilles $';
|
||||
my $rcstag = '$Id: paypal_build_invoice_from_email,v 1.3 2016/08/18 09:51:17 gilles Exp gilles $';
|
||||
|
||||
my $download_info = "You will find the latest imapsync.exe binary (release $release_exe)
|
||||
and the latest imapsync source code (release $release) at the following link:
|
||||
|
@ -160,8 +160,8 @@ my $support_info = 'Now you have access to imapsync professional support.
|
|||
You can contact me (Gilles LAMIRAL) by email or phone.
|
||||
|
||||
Email address: gilles.lamiral@laposte.net.
|
||||
Professionnal phone number: +33 951 84 42 42 (France)
|
||||
Mobile phone number: +33 620 79 76 06 (France).
|
||||
Professionnal phone number: +33 9 51 84 42 42 (France)
|
||||
Mobile phone number: +33 6 19 22 03 54 (France).
|
||||
|
||||
I can call you back for free in many countries on landline telephone numbers
|
||||
and to mobile numbers in the United States and France. So do not hesitate
|
||||
|
@ -214,15 +214,15 @@ Gilles LAMIRAL
|
|||
35580 Baulon
|
||||
FRANCE
|
||||
|
||||
Tel: +33 951 84 42 42
|
||||
Mob: +33 620 79 76 06
|
||||
Fax: +33 956 84 42 42
|
||||
Tel: +33 9 51 84 42 42
|
||||
Mob: +33 6 19 22 03 54
|
||||
Fax: +33 9 56 84 42 42
|
||||
|
||||
email: $address
|
||||
|
||||
--
|
||||
Au revoir, 09 51 84 42 42
|
||||
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06
|
||||
Au revoir,
|
||||
Gilles Lamiral.
|
||||
EOM
|
||||
;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: paypal_build_invoices,v 1.103 2016/03/17 20:37:06 gilles Exp gilles $
|
||||
# $Id: paypal_build_invoices,v 1.111 2016/08/09 02:10:07 gilles Exp gilles $
|
||||
|
||||
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
|
||||
|
||||
|
@ -74,9 +74,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 --write_invoices --first_in 4506 /g/paypal/paypal_2015_12_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4575 /g/paypal/paypal_2016_01_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4642 /g/paypal/paypal_2016_02_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4695 /g/paypal/paypal_2016_03_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4776 /g/paypal/paypal_2016_04_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4860 /g/paypal/paypal_2016_05_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4931 /g/paypal/paypal_2016_06_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 5009 /g/paypal/paypal_2016_07_complet.csv
|
||||
|
||||
set -x
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4695 /g/paypal/paypal_2016_03_complet.csv
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 5081 /g/paypal/paypal_2016_08_complet.csv
|
||||
set +x
|
||||
|
||||
|
||||
|
@ -131,24 +136,29 @@ set +x
|
|||
: /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 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
|
||||
: /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 3959 /g/paypal/paypal_2015_03_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4031 /g/paypal/paypal_2015_04_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4085 /g/paypal/paypal_2015_05_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4139 /g/paypal/paypal_2015_06_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4196 /g/paypal/paypal_2015_07_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4263 /g/paypal/paypal_2015_08_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4317 /g/paypal/paypal_2015_09_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4383 /g/paypal/paypal_2015_10_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4451 /g/paypal/paypal_2015_11_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4506 /g/paypal/paypal_2015_12_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4575 /g/paypal/paypal_2016_01_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4642 /g/paypal/paypal_2016_02_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
|
||||
: /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 3959 /g/paypal/paypal_2015_03_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4031 /g/paypal/paypal_2015_04_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4085 /g/paypal/paypal_2015_05_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4139 /g/paypal/paypal_2015_06_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4196 /g/paypal/paypal_2015_07_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4263 /g/paypal/paypal_2015_08_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4317 /g/paypal/paypal_2015_09_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4383 /g/paypal/paypal_2015_10_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4451 /g/paypal/paypal_2015_11_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4506 /g/paypal/paypal_2015_12_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4575 /g/paypal/paypal_2016_01_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4642 /g/paypal/paypal_2016_02_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4695 /g/paypal/paypal_2016_03_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4776 /g/paypal/paypal_2016_04_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4860 /g/paypal/paypal_2016_05_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4931 /g/paypal/paypal_2016_06_complet.csv
|
||||
|
||||
set -x
|
||||
: g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4695 /g/paypal/paypal_2016_03_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 5009 /g/paypal/paypal_2016_07_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 5081 /g/paypal/paypal_2016_08_complet.csv
|
||||
set +x
|
||||
|
||||
# La totale
|
||||
|
@ -218,10 +228,10 @@ set +x
|
|||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 --avoid_numbers '' /g/paypal/paypal_2010_??_complet.csv
|
||||
|
||||
|
||||
echo 'sh paypal_build_invoices /g/var/paypal_invoices/4???'
|
||||
echo 'sh paypal_build_invoices /g/var/paypal_invoices/5???'
|
||||
|
||||
# USD de 147 à 340
|
||||
# EUR de 341 à ...
|
||||
# USD de 147 \E0 340
|
||||
# EUR de 341 \E0 ...
|
||||
|
||||
# 20110413 Found problems with 189 199 249 258 263 359 537
|
||||
# 20110412 Found problems with 189 199 242 249 258 263 359 382 537
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_build_reply,v 1.28 2016/03/03 13:36:18 gilles Exp gilles $
|
||||
# $Id: paypal_build_reply,v 1.29 2016/08/18 09:48:27 gilles Exp gilles $
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
@ -107,7 +107,7 @@ while( my $line = shift @input ) {
|
|||
|
||||
my $address = 'gilles.lamiral@laposte.net';
|
||||
my $address2 = 'gilles@lamiral.info';
|
||||
my $rcstag = '$Id: paypal_build_reply,v 1.28 2016/03/03 13:36:18 gilles Exp gilles $';
|
||||
my $rcstag = '$Id: paypal_build_reply,v 1.29 2016/08/18 09:48:27 gilles Exp gilles $';
|
||||
|
||||
my $download_info = "You will find the latest imapsync.exe binary (release $release_exe)
|
||||
and the latest imapsync source code (release $release) at the following link:
|
||||
|
@ -129,8 +129,8 @@ my $support_info = 'For imapsync professional support,
|
|||
contact me (Gilles LAMIRAL) by email or phone at:
|
||||
|
||||
Email address: gilles.lamiral@laposte.net.
|
||||
Professionnal phone number: +33 951 84 42 42 (France)
|
||||
Mobile phone number: +33 620 79 76 06 (France).
|
||||
Professionnal phone number: +33 9 51 84 42 42 (France)
|
||||
Mobile phone number: +33 6 19 22 03 54 (France, SFR operator).
|
||||
|
||||
I can call you back toll-free in many countries on landline telephone numbers
|
||||
and to mobile numbers in the United States and France. So do not hesitate
|
||||
|
@ -178,15 +178,15 @@ La Billais
|
|||
35580 Baulon
|
||||
FRANCE
|
||||
|
||||
Tel: +33 951 84 42 42
|
||||
Mob: +33 620 79 76 06
|
||||
Fax: +33 956 84 42 42
|
||||
Tel: +33 9 51 84 42 42
|
||||
Mob: +33 6 19 22 03 54
|
||||
Fax: +33 9 56 84 42 42
|
||||
|
||||
email: $address
|
||||
|
||||
--
|
||||
Au revoir, 09 51 84 42 42
|
||||
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06
|
||||
Au revoir,
|
||||
Gilles Lamiral.
|
||||
EOM
|
||||
;
|
||||
|
||||
|
|
28
W/paypal_reply/postsave
Executable file
28
W/paypal_reply/postsave
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: postsave,v 1.2 2016/08/08 15:22:57 gilles Exp gilles $
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use English ;
|
||||
use CGI ;
|
||||
use URL::Encode ;
|
||||
|
||||
my $query = CGI->new( ) ;
|
||||
|
||||
my $data = $query->param('POSTDATA') || q{} ;
|
||||
|
||||
print "\n\n" ;
|
||||
my $datadec = URL::Encode::url_decode($data);
|
||||
#print $data ;
|
||||
if ( ! -d "/var/tmp/postsave" ) {
|
||||
mkdir '/var/tmp/postsave' or die $! ;
|
||||
}
|
||||
|
||||
open (OUT,'>', "/var/tmp/postsave/postsave.$BASETIME.txt") || die;
|
||||
#open (OUT,'>>', "/var/tmp/postsave/postsave.dev.txt") || die;
|
||||
|
||||
print OUT "$datadec\n" ;
|
||||
close OUT ;
|
||||
|
||||
|
16
W/paypal_reply/urldecode
Executable file
16
W/paypal_reply/urldecode
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use English ;
|
||||
use URL::Encode ;
|
||||
|
||||
|
||||
my $data = 'POSTDATA=%7B%22order%22%3A%7B%22id%22%3Anull%2C%22uuid%22%3A%223c632dae-c20e-5447-bcf8-418409f44cc4%22%2C%22resource_path%22%3A%22%2Fv2%2Forders%2F3c632dae-c20e-5447-bcf8-418409f44cc4%22%2C%22metadata%22%3Anull%2C%22created_at%22%3Anull%2C%22status%22%3A%22completed%22%2C%22event%22%3Anull%2C%22total_btc%22%3A%7B%22cents%22%3A100000000.0%2C%22currency_iso%22%3A%22BTC%22%7D%2C%22total_native%22%3A%7B%22cents%22%3A59430.0%2C%22currency_iso%22%3A%22EUR%22%7D%2C%22total_payout%22%3A%7B%22cents%22%3A59430.0%2C%22currency_iso%22%3A%22EUR%22%7D%2C%22custom%22%3A%22123456789%22%2C%22receive_address%22%3A%221GEZK4EuxmYKc22mTEYnZMUSpyjW9a52Hd%22%2C%22button%22%3A%7B%22type%22%3A%22buy_now%22%2C%22subscription%22%3Afalse%2C%22repeat%22%3Anull%2C%22name%22%3A%22Test%20Item%22%2C%22description%22%3Anull%2C%22id%22%3Anull%2C%22uuid%22%3A%22859232d4-b3bc-5240-b1cf-7b62566b6c54%22%2C%22resource_path%22%3A%22%2Fv2%2Fcheckouts%2F859232d4-b3bc-5240-b1cf-7b62566b6c54%22%7D%2C%22transaction%22%3A%7B%22id%22%3A%2257992060c04ee00001899f33%22%2C%22hash%22%3A%224a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b%22%2C%22confirmations%22%3A0%7D%7D%7D' ;
|
||||
|
||||
print "\n\n" ;
|
||||
print "$data\n" ;
|
||||
print URL::Encode::url_decode($data), "\n" ;
|
||||
|
||||
|
||||
|
3583
W/perlcritic_1.out
3583
W/perlcritic_1.out
File diff suppressed because it is too large
Load diff
1455
W/perlcritic_2.out
1455
W/perlcritic_2.out
File diff suppressed because it is too large
Load diff
|
@ -1,78 +1,174 @@
|
|||
Main code has high complexity score (400) at line 1, column 1. Consider refactoring. (Severity: 3)
|
||||
"$ssl1_SSL_version" is declared but not used at line 712, column 1. Unused variables clutter code and make it harder to read. (Severity: 3)
|
||||
"$ssl2_SSL_version" is declared but not used at line 712, column 1. Unused variables clutter code and make it harder to read. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 1341, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 1350, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Code structure is deeply nested at line 1875, column 41. Consider refactoring. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2040, column 2. Invent unique variable names. (Severity: 3)
|
||||
Hard tabs used at line 2066, column 22. See page 20 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2150, column 2. Invent unique variable names. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2199, column 29. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2221, column 31. See page 236 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2230, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2253, column 2. Invent unique variable names. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2286, column 30. See page 236 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2297, column 53. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2305, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2353, column 2. Invent unique variable names. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2389, column 26. See page 236 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $nb_errors at line 2437, column 2. Invent unique variable names. (Severity: 3)
|
||||
Too many arguments at line 2473, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 2491, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 2501, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Subroutine "modules_VERSION" with high complexity score (26) at line 2619, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 2782, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Subroutine "authenticate_imap" with high complexity score (21) at line 2851, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 2851, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 2981, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3057, column 62. See page 236 of PBP. (Severity: 3)
|
||||
Backtick operator used at line 3065, column 19. Use IPC::Open3 instead. (Severity: 3)
|
||||
Return value of eval not tested at line 3203, column 2. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
|
||||
"die" used instead of "croak" at line 3248, column 2. See page 283 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3356, column 15. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3357, column 15. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3358, column 15. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3367, column 8. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3368, column 8. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3369, column 8. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3395, column 31. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3477, column 25. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3480, column 20. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3681, column 24. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3682, column 19. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3686, column 19. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3756, column 39. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3757, column 39. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3758, column 41. See page 236 of PBP. (Severity: 3)
|
||||
Hard tabs used at line 3772, column 106. See page 20 of PBP. (Severity: 3)
|
||||
Expression form of "eval" at line 4012, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 4242, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Subroutine "copy_message" with high complexity score (25) at line 4603, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 4603, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 4679, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 4713, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 4902, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $total_bytes_transferred at line 4963, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $nb_msg_transferred at line 4963, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $nb_msg_transferred at line 4976, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $maxmessagespersecond at line 4976, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $total_bytes_transferred at line 4997, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $maxbytespersecond at line 4997, column 9. Invent unique variable names. (Severity: 3)
|
||||
Expression form of "eval" at line 6186, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Regular expression without "/x" flag at line 6421, column 22. See page 236 of PBP. (Severity: 3)
|
||||
Expression form of "eval" at line 6426, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Too many arguments at line 6589, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Backtick operator used at line 6756, column 4. Use IPC::Open3 instead. (Severity: 3)
|
||||
Backtick operator used at line 6963, column 12. Use IPC::Open3 instead. (Severity: 3)
|
||||
Backtick operator used at line 6983, column 11. Use IPC::Open3 instead. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7145, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7171, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7212, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7224, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Expression form of "eval" at line 7330, column 43. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 7334, column 45. See page 161 of PBP. (Severity: 5)
|
||||
Split long regexps into smaller qr// chunks at line 7539, column 20. See page 261 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7706, column 19. See page 236 of PBP. (Severity: 3)
|
||||
Close filehandles as soon as possible after opening them at line 7750, column 2. See page 209 of PBP. (Severity: 4)
|
||||
Magic variable "*STDERR" should be assigned as "local" at line 7753, column 10. See pages 81,82 of PBP. (Severity: 4)
|
||||
One-argument "select" used at line 7754, column 2. See page 224 of PBP. (Severity: 4)
|
||||
Main code has high complexity score (401) at line 1, column 1. Consider refactoring. (Severity: 3)
|
||||
"$ssl1_ssl_version" is declared but not used at line 814, column 1. Unused variables clutter code and make it harder to read. (Severity: 3)
|
||||
"$ssl2_ssl_version" is declared but not used at line 814, column 1. Unused variables clutter code and make it harder to read. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 1442, column 3. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 1443, column 3. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 1481, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 1490, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Code structure is deeply nested at line 2013, column 41. Consider refactoring. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2255, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2365, column 2. Invent unique variable names. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2414, column 29. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2436, column 31. See page 236 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2445, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2468, column 2. Invent unique variable names. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2501, column 30. See page 236 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2512, column 53. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2520, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 2570, column 2. Invent unique variable names. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 2607, column 26. See page 236 of PBP. (Severity: 3)
|
||||
Too many arguments at line 2727, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 2745, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 2755, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Subroutine "modulesversion" with high complexity score (27) at line 2868, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 3075, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Subroutine "authenticate_imap" with high complexity score (21) at line 3144, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 3144, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Too many arguments at line 3274, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3358, column 32. See page 236 of PBP. (Severity: 3)
|
||||
Use "local $/ = undef" or File::Slurp instead of joined readline at line 3363, column 43. See page 213 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3373, column 69. See page 236 of PBP. (Severity: 3)
|
||||
Backtick operator used at line 3381, column 20. Use IPC::Open3 instead. (Severity: 3)
|
||||
Return value of eval not tested at line 3538, column 2. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
|
||||
"die" used instead of "croak" at line 3606, column 2. See page 283 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3714, column 15. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3715, column 15. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3716, column 15. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3725, column 8. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3726, column 8. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3727, column 8. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3770, column 31. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3857, column 24. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 3860, column 20. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 4061, column 24. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 4062, column 19. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 4066, column 19. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 4136, column 39. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 4137, column 39. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 4138, column 41. See page 236 of PBP. (Severity: 3)
|
||||
Expression form of "eval" at line 4391, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Single-quote used as quote-like operator delimiter at line 4522, column 6. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4522, column 45. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4528, column 6. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4528, column 38. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4529, column 17. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4530, column 39. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4534, column 6. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4534, column 40. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4537, column 45. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4538, column 45. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4539, column 22. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4541, column 17. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4550, column 17. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Single-quote used as quote-like operator delimiter at line 4556, column 17. Using quotes as delimiters for quote-like operators obfuscates code. (Severity: 3)
|
||||
Expression form of "eval" at line 4629, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Subroutine "copy_message" with high complexity score (25) at line 4990, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 4990, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 4993, column 2. Invent unique variable names. (Severity: 3)
|
||||
Too many arguments at line 5074, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Subroutine "message_for_host2" with high complexity score (27) at line 5107, column 1. Consider refactoring. (Severity: 3)
|
||||
Too many arguments at line 5107, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 5129, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 5223, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $string_ref at line 5242, column 25. Invent unique variable names. (Severity: 3)
|
||||
Too many arguments at line 5419, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Reused variable name in lexical scope: $total_bytes_transferred at line 5486, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $nb_msg_transferred at line 5486, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $nb_msg_transferred at line 5499, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $maxmessagespersecond at line 5499, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $total_bytes_transferred at line 5520, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $maxbytespersecond at line 5520, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $h1_nb_msg_start at line 5557, column 2. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $h1_nb_msg_start at line 5568, column 2. Invent unique variable names. (Severity: 3)
|
||||
Expression form of "eval" at line 6706, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 6942, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Regular expression without "/x" flag at line 7132, column 21. See page 236 of PBP. (Severity: 3)
|
||||
Too many arguments at line 7204, column 1. See page 182 of PBP. (Severity: 3)
|
||||
Close filehandles as soon as possible after opening them at line 7338, column 9. See page 209 of PBP. (Severity: 4)
|
||||
Literal line breaks in a string at line 7379, column 1. See pages 60,61 of PBP. (Severity: 3)
|
||||
Backtick operator used at line 7403, column 17. Use IPC::Open3 instead. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7489, column 32. See page 261 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7489, column 32. See page 236 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7493, column 32. See page 261 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7493, column 32. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7502, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7507, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7511, column 33. See page 261 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7511, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7515, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7521, column 24. See page 261 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7521, column 24. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7671, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7672, column 33. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7673, column 43. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7675, column 36. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7676, column 37. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7677, column 38. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 7679, column 30. See page 236 of PBP. (Severity: 3)
|
||||
Backtick operator used at line 7696, column 12. Use IPC::Open3 instead. (Severity: 3)
|
||||
Backtick operator used at line 7718, column 11. Use IPC::Open3 instead. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7866, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7892, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7933, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 7945, column 12. See page 261 of PBP. (Severity: 3)
|
||||
Expression form of "eval" at line 8051, column 42. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 8055, column 44. See page 161 of PBP. (Severity: 5)
|
||||
Reused variable name in lexical scope: $sync at line 8072, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 8093, column 9. Invent unique variable names. (Severity: 3)
|
||||
Reused variable name in lexical scope: $sync at line 8145, column 9. Invent unique variable names. (Severity: 3)
|
||||
Split long regexps into smaller qr// chunks at line 8481, column 20. See page 261 of PBP. (Severity: 3)
|
||||
Close filehandles as soon as possible after opening them at line 8693, column 2. See page 209 of PBP. (Severity: 4)
|
||||
Magic variable "*STDERR" should be assigned as "local" at line 8696, column 10. See pages 81,82 of PBP. (Severity: 4)
|
||||
One-argument "select" used at line 8697, column 2. See page 224 of PBP. (Severity: 4)
|
||||
Multiple "package" declarations at line 9395, column 1. Limit to one per file. (Severity: 4)
|
||||
Subroutine "GetOptions" with high complexity score (32) at line 9407, column 1. Consider refactoring. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 9425, column 22. See page 236 of PBP. (Severity: 3)
|
||||
Capture variable used outside conditional at line 9430, column 32. See page 253 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 9438, column 42. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 9439, column 30. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 9443, column 35. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 9460, column 30. See page 236 of PBP. (Severity: 3)
|
||||
Regular expression without "/x" flag at line 9462, column 35. See page 236 of PBP. (Severity: 3)
|
||||
|
||||
1 files.
|
||||
263 subroutines/methods.
|
||||
8,603 statements.
|
||||
|
||||
9,486 lines, consisting of:
|
||||
1,684 blank lines.
|
||||
551 comment lines.
|
||||
0 data lines.
|
||||
6,579 lines of Perl code.
|
||||
672 lines of POD.
|
||||
|
||||
Average McCabe score of subroutines was 4.35.
|
||||
|
||||
131 violations.
|
||||
Violations per file was 131.000.
|
||||
Violations per statement was 0.015.
|
||||
Violations per line of code was 0.014.
|
||||
|
||||
6 severity 5 violations.
|
||||
5 severity 4 violations.
|
||||
120 severity 3 violations.
|
||||
|
||||
6 violations of BuiltinFunctions::ProhibitStringyEval.
|
||||
1 violations of ControlStructures::ProhibitDeepNests.
|
||||
1 violations of ErrorHandling::RequireCarping.
|
||||
1 violations of ErrorHandling::RequireCheckingReturnValueOfEval.
|
||||
4 violations of InputOutput::ProhibitBacktickOperators.
|
||||
1 violations of InputOutput::ProhibitJoinedReadline.
|
||||
1 violations of InputOutput::ProhibitOneArgSelect.
|
||||
2 violations of InputOutput::RequireBriefOpen.
|
||||
1 violations of Modules::ProhibitExcessMainComplexity.
|
||||
1 violations of Modules::ProhibitMultiplePackages.
|
||||
1 violations of RegularExpressions::ProhibitCaptureWithoutTest.
|
||||
9 violations of RegularExpressions::ProhibitComplexRegexes.
|
||||
44 violations of RegularExpressions::RequireExtendedFormatting.
|
||||
5 violations of Subroutines::ProhibitExcessComplexity.
|
||||
11 violations of Subroutines::ProhibitManyArgs.
|
||||
1 violations of ValuesAndExpressions::ProhibitImplicitNewlines.
|
||||
16 violations of ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters.
|
||||
22 violations of Variables::ProhibitReusedNames.
|
||||
2 violations of Variables::ProhibitUnusedVariables.
|
||||
1 violations of Variables::RequireLocalizedPunctuationVars.
|
||||
|
|
|
@ -1,9 +1,38 @@
|
|||
Expression form of "eval" at line 4012, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 4242, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 6186, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 6426, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 7330, column 43. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 7334, column 45. See page 161 of PBP. (Severity: 5)
|
||||
Close filehandles as soon as possible after opening them at line 7750, column 2. See page 209 of PBP. (Severity: 4)
|
||||
Magic variable "*STDERR" should be assigned as "local" at line 7753, column 10. See pages 81,82 of PBP. (Severity: 4)
|
||||
One-argument "select" used at line 7754, column 2. See page 224 of PBP. (Severity: 4)
|
||||
Expression form of "eval" at line 4391, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 4629, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 6706, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 6942, column 13. See page 161 of PBP. (Severity: 5)
|
||||
Close filehandles as soon as possible after opening them at line 7338, column 9. See page 209 of PBP. (Severity: 4)
|
||||
Expression form of "eval" at line 8051, column 42. See page 161 of PBP. (Severity: 5)
|
||||
Expression form of "eval" at line 8055, column 44. See page 161 of PBP. (Severity: 5)
|
||||
Close filehandles as soon as possible after opening them at line 8693, column 2. See page 209 of PBP. (Severity: 4)
|
||||
Magic variable "*STDERR" should be assigned as "local" at line 8696, column 10. See pages 81,82 of PBP. (Severity: 4)
|
||||
One-argument "select" used at line 8697, column 2. See page 224 of PBP. (Severity: 4)
|
||||
Multiple "package" declarations at line 9395, column 1. Limit to one per file. (Severity: 4)
|
||||
|
||||
1 files.
|
||||
263 subroutines/methods.
|
||||
8,603 statements.
|
||||
|
||||
9,486 lines, consisting of:
|
||||
1,684 blank lines.
|
||||
551 comment lines.
|
||||
0 data lines.
|
||||
6,579 lines of Perl code.
|
||||
672 lines of POD.
|
||||
|
||||
Average McCabe score of subroutines was 4.35.
|
||||
|
||||
11 violations.
|
||||
Violations per file was 11.000.
|
||||
Violations per statement was 0.001.
|
||||
Violations per line of code was 0.001.
|
||||
|
||||
6 severity 5 violations.
|
||||
5 severity 4 violations.
|
||||
|
||||
6 violations of BuiltinFunctions::ProhibitStringyEval.
|
||||
1 violations of InputOutput::ProhibitOneArgSelect.
|
||||
2 violations of InputOutput::RequireBriefOpen.
|
||||
1 violations of Modules::ProhibitMultiplePackages.
|
||||
1 violations of Variables::RequireLocalizedPunctuationVars.
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
$SHELL says /bin/bash
|
||||
$0 gives ./INSTALL.d/prerequisites_imapsync
|
||||
ps -ef gives gilles 1314 1313 0 09:43 pts/31 00:00:00 /bin/sh ./INSTALL.d/prerequisites_imapsync
|
||||
ps -ef gives gilles 11305 11304 0 12:55 pts/27 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-97-generic #137-Ubuntu SMP Thu Dec 17 21:14:00 UTC 2015 i686 i686 i386 GNU/Linux
|
||||
Ok: Found Perl 5.14.2
|
||||
Ok: Found Perl module Digest::HMAC_MD5
|
||||
Description: Ubuntu 14.04.5 LTS
|
||||
Release: 14.04
|
||||
Codename: trusty
|
||||
Linux petite 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:32 UTC 2016 i686 i686 i686 GNU/Linux
|
||||
Ok: Found Perl 5.18.2
|
||||
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_MD5
|
||||
Ok: Found Perl module Digest::HMAC
|
||||
Ok: Found Perl module Digest::MD5
|
||||
Ok: Found Perl module File::Copy::Recursive
|
||||
|
@ -19,9 +19,12 @@ 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 JSON::WebToken
|
||||
Ok: Found Perl module Mail::IMAPClient
|
||||
Ok: Found Perl module Parse::RecDescent
|
||||
Ok: Found Perl module Readonly
|
||||
Ok: Found Perl module Term::ReadKey
|
||||
Ok: Found Perl module Test::MockObject
|
||||
Ok: Found Perl module Test::More
|
||||
Ok: Found Perl module Test::Pod
|
||||
Ok: Found Perl module Unicode::String
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
See all possibilities in the new() method of IO::Socket::SSL
|
||||
http://search.cpan.org/perldoc?IO::Socket::SSL#Description_Of_Methods
|
||||
--sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
|
||||
See --sslargs1
|
||||
|
||||
See --sslargs1
|
||||
|
||||
--timeout1 int : Connection timeout in seconds for host1.
|
||||
Default is 120 and 0 means no timeout at all.
|
||||
--timeout2 int : Connection timeout in seconds for host2.
|
||||
|
@ -91,9 +91,9 @@
|
|||
It does it by adding two --regextrans2 options before
|
||||
all others. Add --debug to see what's really going on.
|
||||
|
||||
--automap : guesses folders mapping, for folders like
|
||||
--automap : guesses folders mapping, for folders like
|
||||
"Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
|
||||
--f1f2 str1=str2 : Force folder str1 to be synced to str2,
|
||||
--f1f2 str1=str2 : Force folder str1 to be synced to str2,
|
||||
--f1f2 overrides --automap and --regextrans2.
|
||||
--regextrans2 reg : Apply the whole regex to each destination folders.
|
||||
--regextrans2 reg : and this one. etc.
|
||||
|
@ -134,7 +134,7 @@
|
|||
--pipemess cmd : Apply this cmd command to each message content
|
||||
before the copy.
|
||||
--pipemess cmd : and this one, etc.
|
||||
|
||||
|
||||
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
|
||||
|
||||
--regexmess reg : Apply the whole regex to each message before transfer.
|
||||
|
@ -274,65 +274,52 @@
|
|||
--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-97-generic #137-Ubuntu SMP Thu Dec 17 21:14:00 UTC 2015 i686)
|
||||
With perl 5.14.2 Mail::IMAPClient 3.30
|
||||
$Id: imapsync,v 1.684 2016/03/17 08:35:03 gilles Exp gilles $
|
||||
This current imapsync is up to date
|
||||
Here is a [linux] system (Linux petite 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:32 UTC 2016 i686)
|
||||
with Perl 5.18.2 Mail::IMAPClient 3.35
|
||||
$Id: prereq.scandeps,v 1.4 2016/08/19 10:55:47 gilles Exp gilles $
|
||||
This imapsync is up to date
|
||||
|
||||
Homepage: http://imapsync.lamiral.info/
|
||||
|
||||
[MSG] No '/home/gilles/.cpanplus/custom-sources' dir, skipping custom sources
|
||||
[MSG] No '/home/gilles/.cpanplus/custom-sources' dir, skipping custom sources
|
||||
[MSG] No '/home/gilles/.cpanplus/custom-sources' dir, skipping custom sources
|
||||
'Tie::Hash::NamedCapture' => '0.08',
|
||||
'Tie::Hash::NamedCapture' => '0.09',
|
||||
'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',
|
||||
'IO::Compress::Gzip' => '2.063',
|
||||
'IO::Compress::Base::Common' => '2.063',
|
||||
'IO::Compress::Gzip::Constants' => '2.063',
|
||||
'IO::Uncompress::Gunzip' => '2.063',
|
||||
'Compress::Raw::Zlib' => '2.063',
|
||||
'Convert::ASN1::IO' => '0.26',
|
||||
'Convert::ASN1::_decode' => '0.26',
|
||||
'Convert::ASN1::_encode' => '0.26',
|
||||
'Convert::ASN1::parser' => '0.26',
|
||||
'Crypt::SSLeay::X509' => 'undef',
|
||||
'Crypt::SSLeay::CTX' => 'undef',
|
||||
'Digest::HMAC' => '1.03',
|
||||
'Encode::HanExtra' => '0.23',
|
||||
'Cwd' => '3.33',
|
||||
'HTML::Parser' => '3.69',
|
||||
'HTML::Parser' => '3.71',
|
||||
'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',
|
||||
'IO::Compress::Bzip2' => '2.063',
|
||||
'IO::Compress::Deflate' => '2.063',
|
||||
'IO::HTML' => '1.00',
|
||||
'IO::Uncompress::Bunzip2' => '2.063',
|
||||
'IO::Uncompress::Inflate' => '2.063',
|
||||
'IO::Uncompress::RawInflate' => '2.063',
|
||||
'HTTP::Message' => '6.06',
|
||||
'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',
|
||||
'Compress::Raw::Bzip2' => '2.048',
|
||||
'IO::Uncompress::Adapter::Bunzip2' => '2.048',
|
||||
'IO::Uncompress::Base' => '2.048',
|
||||
'IO::Compress::Zlib::Constants' => '2.048',
|
||||
'IO::Uncompress::Adapter::Inflate' => '2.048',
|
||||
'JSON::WebToken::Constants' => 'undef',
|
||||
'JSON::WebToken::Exception' => 'undef',
|
||||
'Module::Runtime' => '0.011',
|
||||
'JSON::WebToken::Crypt' => 'undef',
|
||||
'common::sense' => '3.4',
|
||||
'Authen::NTLM' => '1.09',
|
||||
'CPAN::Config' => 'undef',
|
||||
'URI' => '1.59',
|
||||
'IO::Compress::Base' => '2.063',
|
||||
'IO::Compress::Adapter::Bzip2' => '2.063',
|
||||
'IO::Compress::Zlib::Constants' => '2.063',
|
||||
'IO::Compress::RawDeflate' => '2.063',
|
||||
'IO::Compress::Adapter::Deflate' => '2.063',
|
||||
'Socket6' => '0.25',
|
||||
'URI::data' => 'undef',
|
||||
'URI::_idna' => 'undef',
|
||||
'URI::_generic' => 'undef',
|
||||
'URI::mailto' => 'undef',
|
||||
'URI::_query' => 'undef',
|
||||
'URI::QueryParam' => 'undef',
|
||||
|
@ -369,72 +356,90 @@ Homepage: http://imapsync.lamiral.info/
|
|||
'URI::news' => 'undef',
|
||||
'URI::rtsp' => 'undef',
|
||||
'URI::Heuristic' => '4.20',
|
||||
'URI::_userpass' => 'undef',
|
||||
'URI::sip' => '0.11',
|
||||
'URI::_userpass' => 'undef',
|
||||
'URI::_login' => 'undef',
|
||||
'URI::_idna' => 'undef',
|
||||
'URI::_generic' => 'undef',
|
||||
'LWP::MediaTypes' => '6.01',
|
||||
'File::Listing' => '6.03',
|
||||
'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',
|
||||
'HTTP::Status' => '6.00',
|
||||
'URI::file' => '4.21',
|
||||
'URI::WithBase' => '2.20',
|
||||
'URI' => '1.60',
|
||||
'URI::_server' => 'undef',
|
||||
'Net::SSLeay' => '1.58',
|
||||
'Compress::Raw::Bzip2' => '2.063',
|
||||
'IO::Uncompress::Adapter::Bunzip2' => '2.063',
|
||||
'IO::Uncompress::Base' => '2.063',
|
||||
'IO::Compress::Zlib::Extra' => '2.063',
|
||||
'IO::Uncompress::Adapter::Inflate' => '2.063',
|
||||
'JSON::WebToken::Constants' => 'undef',
|
||||
'JSON::WebToken::Exception' => 'undef',
|
||||
'Module::Runtime' => '0.013',
|
||||
'JSON::WebToken::Crypt' => 'undef',
|
||||
'common::sense' => '3.72',
|
||||
'Authen::NTLM' => '1.09',
|
||||
'HTTP::Status' => '6.03',
|
||||
'LWP::Protocol' => '6.00',
|
||||
'HTTP::Response' => '6.01',
|
||||
'HTTP::Response' => '6.04',
|
||||
'CPAN::Config' => 'undef',
|
||||
'LWP::MediaTypes' => '6.02',
|
||||
'HTTP::Request' => '6.00',
|
||||
'HTML::HeadParser' => '3.69',
|
||||
'HTTP::Date' => '6.02',
|
||||
'File::Listing' => '6.04',
|
||||
'HTTP::Negotiate' => '6.00',
|
||||
'Net::HTTP' => '6.06',
|
||||
'Net::HTTPS' => '6.04',
|
||||
'Net::SSL' => '2.85',
|
||||
'LWP::Debug' => 'undef',
|
||||
'Net::LDAP::DSML' => '0.16',
|
||||
'Net::LDAP' => '0.58',
|
||||
'Net::LDAP::LDIF' => '0.22',
|
||||
'Mail::Internet' => '2.12',
|
||||
'HTML::HeadParser' => '3.71',
|
||||
'HTTP::Config' => '6.00',
|
||||
'HTTP::Request::Common' => '6.00',
|
||||
'HTTP::Request::Common' => '6.04',
|
||||
'LWP::ConnCache' => '6.02',
|
||||
'HTTP::Cookies' => '6.00',
|
||||
'HTTP::Headers' => '6.00',
|
||||
'Encode::Locale' => '1.02',
|
||||
'HTTP::Headers::Util' => '6.00',
|
||||
'HTTP::Headers' => '6.05',
|
||||
'Encode::Locale' => '1.03',
|
||||
'HTTP::Headers::Util' => '6.03',
|
||||
'LWP::MemberMixin' => 'undef',
|
||||
'LWP' => '6.03',
|
||||
'HTTP::Date' => '6.00',
|
||||
'Compress::Zlib' => '2.048',
|
||||
'LWP' => '6.05',
|
||||
'Compress::Zlib' => '2.063',
|
||||
'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',
|
||||
'Params::Classify' => '0.013',
|
||||
'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',
|
||||
'Mail::Address' => '2.12',
|
||||
'Mail::Header' => '2.12',
|
||||
'Mail::Mailer' => '2.12',
|
||||
'Mail::Util' => '2.12',
|
||||
'Net::HTTP::Methods' => '6.06',
|
||||
'Net::LDAP::Bind' => '1.04',
|
||||
'Net::LDAP::Extension' => '1.03',
|
||||
'Net::LDAP::RootDSE' => '0.02',
|
||||
'Net::LDAP::Search' => '0.14',
|
||||
'Convert::ASN1::Debug' => '0.26',
|
||||
'Convert::ASN1' => '0.26',
|
||||
'Net::LDAP::Constant' => '0.22',
|
||||
'Net::LDAP::ASN' => '0.11',
|
||||
'Net::LDAP::Message' => '1.12',
|
||||
'Net::LDAP::Filter' => '0.19',
|
||||
'XML::SAX::Base' => '1.07',
|
||||
'Net::LDAP::Schema' => '0.9908',
|
||||
'Net::LDAP::Entry' => '0.26',
|
||||
'Net::LDAP::Control' => '0.15',
|
||||
'Net::LDAP::Util' => '0.18',
|
||||
'Net::LDAP::Intermediate' => '0.04',
|
||||
'Crypt::SSLeay::Conn' => 'undef',
|
||||
'Crypt::SSLeay::Err' => 'undef',
|
||||
'Crypt::SSLeay::MainContext' => 'undef',
|
||||
'Crypt::SSLeay' => '0.57',
|
||||
'Crypt::SSLeay' => '0.58',
|
||||
'Readonly::Array' => '1.04',
|
||||
'Readonly::Hash' => '1.04',
|
||||
'Readonly::Scalar' => '1.04',
|
||||
'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',
|
||||
'URI::_server' => 'undef',
|
||||
'UNIVERSAL::can' => '1.20140124',
|
||||
'UNIVERSAL::isa' => '1.20120726',
|
||||
'Test::Builder' => '1.001002',
|
||||
'Test::Builder::Module' => '1.001002',
|
||||
'Unicode::CharName' => '1.07',
|
||||
'XML::SAX::Exception' => '1.07',
|
||||
'Crypt::OpenSSL::Bignum' => '0.04',
|
||||
'Crypt::OpenSSL::Random' => '0.04',
|
||||
'Data::Uniqid' => '0.12',
|
||||
|
@ -443,20 +448,26 @@ Homepage: http://imapsync.lamiral.info/
|
|||
'IO::Tee' => '0.64',
|
||||
'JSON::WebToken' => '0.10',
|
||||
'JSON::WebToken::Crypt::RSA' => 'undef',
|
||||
'Term::ReadKey' => '2.30',
|
||||
'Test::More' => '0.98',
|
||||
'Readonly' => '1.04',
|
||||
'Term::ReadKey' => '2.31',
|
||||
'Test::MockObject' => '1.20120301',
|
||||
'Test::More' => '1.001002',
|
||||
'Unicode::String' => '2.09',
|
||||
'File::Spec::Unix' => '3.33',
|
||||
'File::Spec' => '3.33',
|
||||
'JSON::PP' => '2.27203',
|
||||
'JSON::PP::Boolean' => 'undef',
|
||||
'JSON::XS::Boolean' => 'undef',
|
||||
'JSON' => '2.53',
|
||||
'Crypt::OpenSSL::RSA' => '0.27',
|
||||
'JSON::XS' => '2.32',
|
||||
'LWP::UserAgent' => '6.03',
|
||||
'HTML::Entities' => '3.69',
|
||||
'File::Spec::Unix' => '3.40',
|
||||
'File::Spec' => '3.40',
|
||||
'Cwd' => '3.40',
|
||||
'URI::http' => 'undef',
|
||||
'URI::URL' => '5.04',
|
||||
'URI::Escape' => '3.31',
|
||||
'JSON' => '2.61',
|
||||
'JSON::XS::Boolean' => 'undef',
|
||||
'JSON::XS' => '2.34',
|
||||
'Crypt::OpenSSL::RSA' => '0.28',
|
||||
'LWP::UserAgent' => '6.05',
|
||||
'HTML::Entities' => '3.69',
|
||||
'LWP::Protocol::http' => 'undef',
|
||||
'IO::Socket::SSL' => '1.965',
|
||||
'LWP::Protocol::ldap' => '1.25',
|
||||
'LWP::Authen::Digest' => 'undef',
|
||||
'LWP::Authen::Ntlm' => '6.00',
|
||||
'LWP::Protocol::GHTTP' => 'undef',
|
||||
|
@ -465,15 +476,11 @@ Homepage: http://imapsync.lamiral.info/
|
|||
'LWP::Protocol::file' => 'undef',
|
||||
'LWP::Protocol::ftp' => 'undef',
|
||||
'LWP::Protocol::gopher' => 'undef',
|
||||
'LWP::Protocol::https' => '6.02',
|
||||
'LWP::Protocol::https' => '6.04',
|
||||
'LWP::Protocol::ldapi' => 'undef',
|
||||
'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::URL' => '5.04',
|
||||
'URI::http' => 'undef',
|
||||
'LWP::Protocol::http' => 'undef',
|
||||
'LWP::Protocol::ldap' => '1.11',
|
||||
'IO::Socket::SSL' => '1.53',
|
||||
|
|
11
W/test2.bat
11
W/test2.bat
|
@ -1,11 +1,12 @@
|
|||
|
||||
@REM $Id: test2.bat,v 1.20 2015/11/23 16:47:01 gilles Exp gilles $
|
||||
@REM $Id: test2.bat,v 1.21 2016/05/27 23:05:23 gilles Exp gilles $
|
||||
@REM
|
||||
|
||||
cd /D %~dp0
|
||||
|
||||
@REM @ECHO off
|
||||
.\imapsync.exe --modules_version
|
||||
@PAUSE
|
||||
.\imapsync.exe --testslive
|
||||
@PAUSE
|
||||
|
||||
@REM perl .\imapsync --host1 p --ssl1 --user1 tata --passfile1 secret.tata --host2 p --ssl2 --user2 titi --passfile2 secret.titi --justfoldersizes | findstr /C:"Host2 Total size:"
|
||||
|
||||
|
||||
findstr /l /C:"Error login" LOG_imapsync\*.txt
|
||||
|
|
10
W/test3.bat
10
W/test3.bat
|
@ -1,16 +1,12 @@
|
|||
|
||||
@REM $Id: test3.bat,v 1.23 2015/12/14 15:15:12 gilles Exp gilles $
|
||||
@REM $Id: test3.bat,v 1.24 2016/08/05 14:22:42 gilles Exp gilles $
|
||||
cd /D %~dp0
|
||||
|
||||
@REM \$1 must be $1 on Windows
|
||||
|
||||
@REM ==== password within double-quotes
|
||||
perl ./imapsync ^
|
||||
--host1 p --user1 tata ^
|
||||
--password1 """(secret)""" ^
|
||||
--host2 p --user2 titi ^
|
||||
--passfile2 secret.titi ^
|
||||
--justlogin --debugimap1 --showpassword
|
||||
perl ./imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
|
||||
--debugimap2 --debugcontent --folder INBOX --maxage 1
|
||||
@EXIT
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
@REM $Id: test3_gmail.bat,v 1.3 2015/09/19 08:23:14 gilles Exp gilles $
|
||||
@REM $Id: test3_gmail.bat,v 1.4 2016/08/19 14:11:00 gilles Exp gilles $
|
||||
|
||||
cd /D %~dp0
|
||||
|
||||
@REM ./imapsync.exe --modules_version
|
||||
@REM ./imapsync.exe --justbanner
|
||||
|
||||
@REM perl .\imapsync --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com --passfile1 secret.gilles_gmail ^
|
||||
@REM --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com --passfile2 secret.gilles_gmail ^
|
||||
|
@ -13,4 +13,4 @@ cd /D %~dp0
|
|||
|
||||
perl .\imapsync --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com --passfile1 secret.gilles_gmail ^
|
||||
--host2 p --user2 tata --passfile2 secret.tata ^
|
||||
--regextrans2 "s,\[Gmail\].,," --dry --justfolders
|
||||
--regextrans2 "s,\[Gmail\].,," --dry --justfolders
|
||||
|
|
|
@ -1,42 +1,60 @@
|
|||
REM $Id: test_exe.bat,v 1.11 2014/05/22 10:13:34 gilles Exp gilles $
|
||||
REM $Id: test_exe.bat,v 1.15 2016/08/19 14:09:56 gilles Exp gilles $
|
||||
|
||||
@SETLOCAL
|
||||
@ECHO OFF
|
||||
ECHO Currently running through %0 %*
|
||||
|
||||
cd /D %~dp0
|
||||
|
||||
@REM EXIT
|
||||
|
||||
.\imapsync.exe
|
||||
REM Remove the error file because its existence means an error occured during this script execution
|
||||
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
|
||||
REM CALL :handle_error .\imapsync.exe --thisoptionnoexists
|
||||
CALL :handle_error perl imapsync --tests
|
||||
CALL :handle_error .\imapsync.exe --tests
|
||||
CALL :handle_error .\imapsync.exe --testslive
|
||||
EXIT /B
|
||||
|
||||
@ECHO ==== All 8 combinaisons between ssl1/tls1 ssl2/tls2 justconnect/justlogin
|
||||
@ECHO
|
||||
@ECHO ==== 1 --SSL1 --SSL2 --JUSTCONNECT
|
||||
.\imapsync.exe --host1 p --ssl1 --user1 tata --passfile1 secret.tata --host2 p --ssl2 --user2 titi --passfile2 secret.titi --justconnect
|
||||
CALL :handle_error CALL :launch_imapsync --justconnect --ssl1 --ssl2
|
||||
CALL :handle_error CALL :launch_imapsync --justconnect --tls1 --tls2
|
||||
CALL :handle_error CALL :launch_imapsync --justconnect --ssl1 --tls2
|
||||
CALL :handle_error CALL :launch_imapsync --justconnect --tls1 --ssl2
|
||||
CALL :handle_error CALL :launch_imapsync --justlogin --ssl1 --ssl2
|
||||
CALL :handle_error CALL :launch_imapsync --justlogin --tls1 --tls2
|
||||
CALL :handle_error CALL :launch_imapsync --justlogin --ssl1 --tls2
|
||||
CALL :handle_error CALL :launch_imapsync --justlogin --tls1 --ssl2
|
||||
@ECHO ==== various calls
|
||||
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl1_SSL_version SSLv3 --ssl2 --justconnect
|
||||
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl1_SSL_version SSLv3 --ssl2 --justlogin
|
||||
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl2 --delete2
|
||||
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl2 --delete2 --folder INBOX
|
||||
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl2 --delete2 --folder INBOX --usecache
|
||||
|
||||
@ECHO ==== 2 --SSL1 --SSL2 --JUSTLOGIN
|
||||
.\imapsync.exe --host1 p --ssl1 --user1 tata --passfile1 secret.tata --host2 p --ssl2 --user2 titi --passfile2 secret.titi --justlogin
|
||||
|
||||
@ECHO ==== 3 --TLS1 --TLS2 --JUSTCONNECT
|
||||
.\imapsync.exe --host1 p --tls1 --user1 tata --passfile1 secret.tata --host2 p --tls2 --user2 titi --passfile2 secret.titi --justconnect
|
||||
|
||||
@ECHO ==== 4 --TLS1 --TLS2 --JUSTLOGIN
|
||||
.\imapsync.exe --host1 p --tls1 --user1 tata --passfile1 secret.tata --host2 p --tls2 --user2 titi --passfile2 secret.titi --justlogin
|
||||
|
||||
@ECHO ==== 5 --SSL1 --TLS2 --JUSTCONNECT
|
||||
.\imapsync.exe --host1 p --ssl1 --user1 tata --passfile1 secret.tata --host2 p --tls2 --user2 titi --passfile2 secret.titi --justconnect
|
||||
|
||||
@ECHO ==== 6 --SSL1 --TLS2 --JUSTLOGIN
|
||||
.\imapsync.exe --host1 p --ssl1 --user1 tata --passfile1 secret.tata --host2 p --tls2 --user2 titi --passfile2 secret.titi --justlogin
|
||||
|
||||
@ECHO ==== 7 --TLS1 --SSL2 --JUSTCONNECT
|
||||
.\imapsync.exe --host1 p --tls1 --user1 tata --passfile1 secret.tata --host2 p --ssl2 --user2 titi --passfile2 secret.titi --justconnect
|
||||
|
||||
@ECHO ==== 8 --TLS1 --SSL2 --JUSTLOGIN
|
||||
.\imapsync.exe --host1 p --tls1 --user1 tata --passfile1 secret.tata --host2 p --ssl2 --user2 titi --passfile2 secret.titi --justlogin
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
|
||||
:handle_error
|
||||
SETLOCAL
|
||||
ECHO IN %0 %*
|
||||
%*
|
||||
SET CMD_RETURN=%ERRORLEVEL%
|
||||
ECHO CMD_RETURN=%CMD_RETURN%
|
||||
IF %CMD_RETURN% EQU 0 (
|
||||
ECHO GOOD END
|
||||
) ELSE (
|
||||
ECHO BAD END
|
||||
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
||||
ECHO Failure calling %* >> LOG_bat\%~nx0.txt
|
||||
)
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
.\imapsync.exe --host1 p --user1 toto --passfile1 secret.toto --host2 p --user2 titi --passfile2 secret.titi --ssl1 --ssl1_SSL_version SSLv3 --ssl2 --justconnect
|
||||
.\imapsync.exe --host1 p --user1 toto --passfile1 secret.toto --host2 p --user2 titi --passfile2 secret.titi --ssl1 --ssl1_SSL_version SSLv3 --ssl2 --justlogin
|
||||
.\imapsync.exe --host1 p --user1 toto --passfile1 secret.toto --host2 p --user2 titi --passfile2 secret.titi --ssl1 --ssl2 --delete2
|
||||
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --ssl1 --ssl2 --delete2 --folder INBOX
|
||||
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --ssl1 --ssl2 --delete2 --folder INBOX --usecache
|
||||
|
||||
:launch_imapsync
|
||||
@SETLOCAL
|
||||
ECHO IN %0 %*
|
||||
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi %*
|
||||
@ENDLOCAL
|
||||
@EXIT /B
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@REM
|
||||
|
||||
@REM $Id: test_exe_2.bat,v 1.9 2015/12/14 15:15:01 gilles Exp gilles $
|
||||
@REM $Id: test_exe_2.bat,v 1.10 2016/07/20 12:48:28 gilles Exp gilles $
|
||||
|
||||
@REM cd C:\msys\1.0\home\Admin\imapsync
|
||||
cd /D %~dp0
|
||||
|
@ -18,6 +18,8 @@ cd /D %~dp0
|
|||
@REM perl .\imapsync --tests
|
||||
|
||||
@REM .\imapsync.exe --testslive --authmech2 XOAUTH2
|
||||
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com --passfile2 secret.gilles_gmail --authmech2 XOAUTH2
|
||||
|
||||
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com --passfile2 secret.gilles_gmail --authmech2 XOAUTH2
|
||||
|
||||
@REM .\imapsync.exe --host1 mail2.name-services.com --user1 jessica@champlaindoor.com --passfile1 secret.mail2World --host2 mail.emailsrvr.com --user2 jessica@champlaindoor.com --passfile2 secret.mail2World --sep1 / --prefix1 "" --noabletosearch --fetch_hash_set "1:*" --delete2duplicates
|
||||
|
||||
|
|
|
@ -1,9 +1,37 @@
|
|||
@REM $Id: test_tests.bat,v 1.3 2015/09/19 08:46:11 gilles Exp gilles $
|
||||
@REM $Id: test_tests.bat,v 1.5 2016/08/19 14:08:01 gilles Exp gilles $
|
||||
|
||||
@REM cd C:\msys\1.0\home\Admin\imapsync
|
||||
cd /D %~dp0
|
||||
@SETLOCAL
|
||||
@ECHO OFF
|
||||
|
||||
perl .\imapsync --modules_version
|
||||
perl .\imapsync --tests
|
||||
ECHO Currently running through %0 %*
|
||||
|
||||
CD /D %~dp0
|
||||
|
||||
REM Remove the error file because its existence means an error occured during this script execution
|
||||
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
|
||||
|
||||
CALL :handle_error perl .\imapsync --justbanner
|
||||
CALL :handle_error perl .\imapsync --testsdebug
|
||||
CALL :handle_error perl .\imapsync --tests
|
||||
|
||||
@REM @PAUSE
|
||||
@ENDLOCAL
|
||||
@EXIT /B
|
||||
|
||||
|
||||
:handle_error
|
||||
SETLOCAL
|
||||
ECHO IN %0 with parameters %*
|
||||
%*
|
||||
SET CMD_RETURN=%ERRORLEVEL%
|
||||
|
||||
IF %CMD_RETURN% EQU 0 (
|
||||
ECHO GOOD END
|
||||
) ELSE (
|
||||
ECHO BAD END
|
||||
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
||||
ECHO Failure running %* >> LOG_bat\%~nx0.txt
|
||||
)
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
|
|
37
W/test_testsdebug.bat
Normal file
37
W/test_testsdebug.bat
Normal file
|
@ -0,0 +1,37 @@
|
|||
@REM $Id: test_testsdebug.bat,v 1.1 2016/08/19 08:20:53 gilles Exp gilles $
|
||||
|
||||
@SETLOCAL
|
||||
@ECHO OFF
|
||||
|
||||
ECHO Currently running through %0 %*
|
||||
|
||||
CD /D %~dp0
|
||||
|
||||
REM Remove the error file because its existence means an error occured during this script execution
|
||||
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
|
||||
|
||||
@REM CALL :handle_error perl .\imapsync --justbanner
|
||||
CALL :handle_error perl .\imapsync --testsdebug
|
||||
@REM CALL :handle_error perl .\imapsync --tests
|
||||
|
||||
@REM @PAUSE
|
||||
@ENDLOCAL
|
||||
@EXIT /B
|
||||
|
||||
|
||||
:handle_error
|
||||
SETLOCAL
|
||||
ECHO IN %0 with parameters %*
|
||||
%*
|
||||
SET CMD_RETURN=%ERRORLEVEL%
|
||||
|
||||
IF %CMD_RETURN% EQU 0 (
|
||||
ECHO GOOD END
|
||||
) ELSE (
|
||||
ECHO BAD END
|
||||
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
||||
ECHO Failure running %* >> LOG_bat\%~nx0.txt
|
||||
)
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
@REM $Id: test_xoauth2.bat,v 1.1 2015/12/26 02:11:27 gilles Exp gilles $
|
||||
@REM $Id: test_xoauth2.bat,v 1.2 2016/08/19 14:07:40 gilles Exp gilles $
|
||||
@REM
|
||||
|
||||
cd /D %~dp0
|
||||
|
||||
@REM @ECHO off
|
||||
@REM .\imapsync.exe --modules_version
|
||||
@REM .\imapsync.exe --justbanner
|
||||
@REM @PAUSE
|
||||
@REM .\imapsync.exe --tests
|
||||
@REM @PAUSE
|
||||
|
|
107
W/tools/fixup_email.py
Executable file
107
W/tools/fixup_email.py
Executable file
|
@ -0,0 +1,107 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
NUKE_HDRS = [
|
||||
# (hdr, max_lines, max_items, max_bytes). (-1 => unlimited).
|
||||
("References", 485, 485, 40000),
|
||||
]
|
||||
MAX_LINE_LENGTH = 996
|
||||
NUKE_8BIT = True
|
||||
FORCE_REWRITE = False
|
||||
|
||||
import sys
|
||||
from email.parser import Parser
|
||||
from email.generator import Generator
|
||||
from email import utils
|
||||
from cStringIO import StringIO
|
||||
|
||||
# NB: utils._qencode() replaces ALL ' ' with '=20', as required by QP
|
||||
# header strings. We only need to encode trailing whitespace in message
|
||||
# body. quopri.encodestring (used by utils._qencode()) does this already.
|
||||
from quopri import encodestring as qp_encode
|
||||
|
||||
fp = open(sys.argv[1], "rb") if len(sys.argv) > 1 else sys.stdin
|
||||
msg_text_crnl = fp.read(); fp.close()
|
||||
msg_text_nl = msg_text_crnl.replace("\r\n", "\n")
|
||||
|
||||
# We want to preserve CRLF and any leading "From" from source message
|
||||
CRLF = "\r\n" if (len(msg_text_nl) < len(msg_text_crnl)) else "\n"
|
||||
UNIXFROM = msg_text_nl.startswith("From ")
|
||||
|
||||
def rewrite(part):
|
||||
need_rewrite = False
|
||||
|
||||
for hdr in part.values():
|
||||
if max([len(i) for i in hdr.split('\n')]) > MAX_LINE_LENGTH:
|
||||
need_rewrite = True # Force MIME rewrite if we have long headers
|
||||
sys.stderr.write("FIXUP NEXT: Rewrite forced by long header line\n")
|
||||
|
||||
for hdr, max_lines, max_items, max_bytes in NUKE_HDRS:
|
||||
(hdr, val) = (hdr.lower(), msg.get(hdr))
|
||||
if (val and ((max_lines >= 0 and len(val.split('\n')) > max_lines) or
|
||||
(max_items >= 0 and len(val.split()) > max_items) or
|
||||
(max_bytes >= 0 and len(val) > max_bytes))):
|
||||
del msg[hdr]
|
||||
sys.stderr.write("FIXUP NEXT: Removed long header line: "+hdr+"\n")
|
||||
need_rewrite = True
|
||||
|
||||
if part.is_multipart():
|
||||
for subpart in part.get_payload():
|
||||
if rewrite(subpart):
|
||||
need_rewrite = True
|
||||
return need_rewrite
|
||||
|
||||
payload = part.get_payload()
|
||||
max_line_length = max([ len(i) for i in payload.split('\n') ])
|
||||
|
||||
cte = part.get('content-transfer-encoding', '').lower().strip()
|
||||
if cte in ['8bit', '7bit', 'binary', '']:
|
||||
# Encode unencoded forms which contain 8bit characters or long lines
|
||||
update_cte = part.replace_header if (cte != '') else part.add_header
|
||||
nonascii_count = [(ord(c) >= 128) for c in payload].count(True)
|
||||
if ((NUKE_8BIT and nonascii_count > 0) or
|
||||
max_line_length > MAX_LINE_LENGTH):
|
||||
if nonascii_count < 100:
|
||||
part.set_payload(qp_encode(payload))
|
||||
update_cte('Content-Transfer-Encoding', "quoted-printable")
|
||||
else:
|
||||
part.set_payload(utils._bencode(payload))
|
||||
update_cte('Content-Transfer-Encoding', "base64")
|
||||
need_rewrite = True
|
||||
elif cte in ['quoted-printable', 'base64']:
|
||||
# Recode quoted-printable or base64 with long lines
|
||||
if max_line_length > MAX_LINE_LENGTH:
|
||||
if cte == 'quoted-printable':
|
||||
raw=utils._qdecode(payload)
|
||||
part.set_payload(qp_encode(raw))
|
||||
need_rewrite = True
|
||||
elif cte == 'base64':
|
||||
try:
|
||||
raw=utils._bdecode(payload)
|
||||
part.set_payload(utils._bencode(raw))
|
||||
need_rewrite = True
|
||||
except binascii.Error:
|
||||
pass
|
||||
|
||||
newcte = part.get('content-transfer-encoding', '').lower().strip()
|
||||
if (newcte != cte):
|
||||
part.add_header('X-Mime-Autoconverted',
|
||||
"from " + (cte or "none") + " to " + newcte)
|
||||
sys.stderr.write("FIXUP NEXT: Attachment converted " +
|
||||
"from " + (cte or "none") + " to " + newcte + "\n")
|
||||
return need_rewrite
|
||||
|
||||
msg=Parser().parsestr(msg_text_nl)
|
||||
|
||||
if not rewrite(msg) and not FORCE_REWRITE:
|
||||
sys.stdout.write(msg_text_crnl)
|
||||
sys.exit(0)
|
||||
|
||||
buffer = StringIO()
|
||||
gen=Generator(buffer, mangle_from_=False, maxheaderlen=MAX_LINE_LENGTH)
|
||||
gen.flatten(msg, unixfrom=UNIXFROM)
|
||||
|
||||
buffer.seek(0)
|
||||
for line in buffer.readlines():
|
||||
sys.stdout.write(line.rstrip('\n')); sys.stdout.write(CRLF)
|
||||
buffer.close()
|
||||
sys.exit(0)
|
186
W/tools/html5check.py
Executable file
186
W/tools/html5check.py
Executable file
|
@ -0,0 +1,186 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (c) 2007-2008 Mozilla Foundation
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
import httplib
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import urlparse
|
||||
import string
|
||||
import gzip
|
||||
import StringIO
|
||||
|
||||
extPat = re.compile(r'^.*\.([A-Za-z]+)$')
|
||||
extDict = {
|
||||
"html" : "text/html",
|
||||
"htm" : "text/html",
|
||||
"xhtml" : "application/xhtml+xml",
|
||||
"xht" : "application/xhtml+xml",
|
||||
"xml" : "application/xml",
|
||||
}
|
||||
|
||||
argv = sys.argv[1:]
|
||||
|
||||
forceXml = 0
|
||||
forceHtml = 0
|
||||
gnu = 0
|
||||
errorsOnly = 0
|
||||
encoding = None
|
||||
fileName = None
|
||||
contentType = None
|
||||
inputHandle = None
|
||||
service = 'http://html5.validator.nu/'
|
||||
|
||||
for arg in argv:
|
||||
if '--help' == arg:
|
||||
print '-h : force text/html'
|
||||
print '-x : force application/xhtml+xml'
|
||||
print '-g : GNU output'
|
||||
print '-e : errors only (no info or warnings)'
|
||||
print '--encoding=foo : declare encoding foo'
|
||||
print '--service=url : the address of the HTML5 validator'
|
||||
print 'One file argument allowed. Leave out to read from stdin.'
|
||||
sys.exit(0)
|
||||
elif arg.startswith("--encoding="):
|
||||
encoding = arg[11:]
|
||||
elif arg.startswith("--service="):
|
||||
service = arg[10:]
|
||||
elif arg.startswith("--"):
|
||||
sys.stderr.write('Unknown argument %s.\n' % arg)
|
||||
sys.exit(2)
|
||||
elif arg.startswith("-"):
|
||||
for c in arg[1:]:
|
||||
if 'x' == c:
|
||||
forceXml = 1
|
||||
elif 'h' == c:
|
||||
forceHtml = 1
|
||||
elif 'g' == c:
|
||||
gnu = 1
|
||||
elif 'e' == c:
|
||||
errorsOnly = 1
|
||||
else:
|
||||
sys.stderr.write('Unknown argument %s.\n' % arg)
|
||||
sys.exit(3)
|
||||
else:
|
||||
if fileName:
|
||||
sys.stderr.write('Cannot have more than one input file.\n')
|
||||
sys.exit(1)
|
||||
fileName = arg
|
||||
|
||||
if forceXml and forceHtml:
|
||||
sys.stderr.write('Cannot force HTML and XHTML at the same time.\n')
|
||||
sys.exit(2)
|
||||
|
||||
if forceXml:
|
||||
contentType = 'application/xhtml+xml'
|
||||
elif forceHtml:
|
||||
contentType = 'text/html'
|
||||
elif fileName:
|
||||
m = extPat.match(fileName)
|
||||
if m:
|
||||
ext = m.group(1)
|
||||
ext = ext.translate(string.maketrans(string.ascii_uppercase, string.ascii_lowercase))
|
||||
if extDict.has_key(ext):
|
||||
contentType = extDict[ext]
|
||||
else:
|
||||
sys.stderr.write('Unable to guess Content-Type from file name. Please force the type.\n')
|
||||
sys.exit(3)
|
||||
else:
|
||||
sys.stderr.write('Could not extract a filename extension. Please force the type.\n')
|
||||
sys.exit(6)
|
||||
else:
|
||||
sys.stderr.write('Need to force HTML or XHTML when reading from stdin.\n')
|
||||
sys.exit(4)
|
||||
|
||||
if encoding:
|
||||
contentType = '%s; charset=%s' % (contentType, encoding)
|
||||
|
||||
if fileName:
|
||||
inputHandle = open(fileName, "rb")
|
||||
else:
|
||||
inputHandle = sys.stdin
|
||||
|
||||
data = inputHandle.read()
|
||||
|
||||
buf = StringIO.StringIO()
|
||||
gzipper = gzip.GzipFile(fileobj=buf, mode='wb')
|
||||
gzipper.write(data)
|
||||
gzipper.close()
|
||||
gzippeddata = buf.getvalue()
|
||||
buf.close()
|
||||
|
||||
connection = None
|
||||
response = None
|
||||
status = 302
|
||||
redirectCount = 0
|
||||
|
||||
url = service
|
||||
if gnu:
|
||||
url = url + '?out=gnu'
|
||||
else:
|
||||
url = url + '?out=text'
|
||||
|
||||
if errorsOnly:
|
||||
url = url + '&level=error'
|
||||
|
||||
while (status == 302 or status == 301 or status == 307) and redirectCount < 10:
|
||||
if redirectCount > 0:
|
||||
url = response.getheader('Location')
|
||||
parsed = urlparse.urlsplit(url)
|
||||
if parsed[0] != 'http':
|
||||
sys.stderr.write('URI scheme %s not supported.\n' % parsed[0])
|
||||
sys.exit(7)
|
||||
if redirectCount > 0:
|
||||
connection.close() # previous connection
|
||||
print 'Redirecting to %s' % url
|
||||
print 'Please press enter to continue or type "stop" followed by enter to stop.'
|
||||
if raw_input() != "":
|
||||
sys.exit(0)
|
||||
connection = httplib.HTTPConnection(parsed[1])
|
||||
connection.connect()
|
||||
connection.putrequest("POST", "%s?%s" % (parsed[2], parsed[3]), skip_accept_encoding=1)
|
||||
connection.putheader("Accept-Encoding", 'gzip')
|
||||
connection.putheader("Content-Type", contentType)
|
||||
connection.putheader("Content-Encoding", 'gzip')
|
||||
connection.putheader("Content-Length", len(gzippeddata))
|
||||
connection.endheaders()
|
||||
connection.send(gzippeddata)
|
||||
response = connection.getresponse()
|
||||
status = response.status
|
||||
redirectCount += 1
|
||||
|
||||
if status != 200:
|
||||
sys.stderr.write('%s %s\n' % (status, response.reason))
|
||||
sys.exit(5)
|
||||
|
||||
if response.getheader('Content-Encoding', 'identity').lower() == 'gzip':
|
||||
response = gzip.GzipFile(fileobj=StringIO.StringIO(response.read()))
|
||||
|
||||
if fileName and gnu:
|
||||
quotedName = '"%s"' % fileName.replace('"', '\\042')
|
||||
for line in response:
|
||||
sys.stdout.write(quotedName)
|
||||
sys.stdout.write(line)
|
||||
else:
|
||||
sys.stdout.write(response.read())
|
||||
|
||||
connection.close()
|
34
W/tools/validate_xml_html5
Executable file
34
W/tools/validate_xml_html5
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: validate_xml_html5,v 1.3 2016/08/05 19:34:46 gilles Exp gilles $
|
||||
|
||||
#set -x
|
||||
|
||||
validate_xml_html5_one() {
|
||||
type=`file -b -i "$1"`
|
||||
echo $1 : $type
|
||||
if expr match "$type" '.*text/html.*' > /dev/null; then
|
||||
echo html5check.py -h "$1"
|
||||
html5check.py -h "$1"
|
||||
return $?
|
||||
fi
|
||||
if expr match "$type" '.*application/xml.*' > /dev/null; then
|
||||
echo validate --verbose "$1"
|
||||
validate --verbose "$1"
|
||||
return $?
|
||||
fi
|
||||
echo Unknown type
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
for f in "$@"; do
|
||||
validate_xml_html5_one "$f"
|
||||
cmd_status=$?
|
||||
echo cmd_status = $cmd_status
|
||||
test 0 != $cmd_status && return $cmd_status
|
||||
done
|
||||
|
||||
: # if here then good return
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue