2015-12-03 18:16:32 +01:00
|
|
|
|
#!/bin/cat
|
2020-04-11 01:15:57 +02:00
|
|
|
|
# $Id: INSTALL.Darwin.txt,v 1.24 2019/11/28 14:42:52 gilles Exp gilles $
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2019-07-03 01:17:46 +02:00
|
|
|
|
This documentation is also located online at
|
|
|
|
|
https://imapsync.lamiral.info/INSTALL.d/
|
|
|
|
|
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Darwin.txt
|
|
|
|
|
|
|
|
|
|
=======================================================================
|
|
|
|
|
Installing imapsync binary on Darwin / Mac OS X
|
|
|
|
|
=======================================================================
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2020-04-11 01:15:57 +02:00
|
|
|
|
Caveat Catalina: The binary imapsync_bin_Darwin is detected as a malware
|
|
|
|
|
or similar on the latest Mac OS X named Catalina.
|
|
|
|
|
It's Catalina new security policy. I'm working on it.
|
|
|
|
|
All other Mac OS X releases are ok.
|
|
|
|
|
So far I found
|
|
|
|
|
https://www.quora.com/What-does-Can-t-be-opened-because-it-s-integrity-cannot-be-verified-mean-on-OSX-Catalina
|
|
|
|
|
https://github.com/fastlane/fastlane/issues/15186#issuecomment-532047545
|
|
|
|
|
https://github.com/neovim/neovim/issues/11011#issuecomment-531369505
|
|
|
|
|
Other way, on the binary: Control + Right Click -> Open
|
|
|
|
|
(I don't know if it adds imapsync in the ok apps)
|
|
|
|
|
See also the last section of https://support.apple.com/en-us/HT202491
|
|
|
|
|
"How to open an app that hasn’t been notarized or is from an unidentified developer"
|
|
|
|
|
|
|
|
|
|
Now, let's forget Catalina for the rest of this document
|
|
|
|
|
|
2016-09-19 17:17:24 +02:00
|
|
|
|
There is a standalone imapsync binary for Mac OS X
|
|
|
|
|
called "imapsync_bin_Darwin" (without the quotes),
|
2015-12-03 18:16:32 +01:00
|
|
|
|
available in the compressed tarball called imapsync-1.xxx.tgz
|
|
|
|
|
where 1.xxx is the version number. I suppose this tarball is put
|
|
|
|
|
under your $HOME directory, let say /Users/gilles/, but you can
|
|
|
|
|
put it anywhere.
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
|
|
|
|
Open a terminal: /Applications/Utilities/Terminal double-click on Terminal.
|
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
Untar the tarball where you want:
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
cd
|
|
|
|
|
tar xzvf /Users/gilles/imapsync-1.xxx.tgz
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
Go into the directory imapsync-1.xxx
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
cd imapsync-1.xxx
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
First let's have a simple run to see if imapsync_bin_Darwin works.
|
|
|
|
|
You should see some help about options and an example at the end
|
|
|
|
|
of this run:
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
./imapsync_bin_Darwin
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
To go further, perform a complete test with two
|
|
|
|
|
real IMAP server accounts:
|
|
|
|
|
|
|
|
|
|
./imapsync_bin_Darwin --testslive
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2015-12-03 18:16:32 +01:00
|
|
|
|
If this sync works fine then imapsync_bin_Darwin is ready for any
|
2016-09-19 17:17:24 +02:00
|
|
|
|
imap account synchronization.
|
|
|
|
|
|
2020-04-11 01:15:57 +02:00
|
|
|
|
When reading the documentation with imapsync command lines examples,
|
|
|
|
|
you have to replace the command "imapsync" by "imapsync_bin_Darwin"
|
2016-09-19 17:17:24 +02:00
|
|
|
|
For example, instead of the command:
|
|
|
|
|
|
|
|
|
|
./imapsync \
|
|
|
|
|
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
|
|
|
|
|
--host2 test2.lamiral.info --user2 test2 --password2 secret2
|
|
|
|
|
|
|
|
|
|
you have to use:
|
|
|
|
|
|
|
|
|
|
./imapsync_bin_Darwin \
|
|
|
|
|
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
|
|
|
|
|
--host2 test2.lamiral.info --user2 test2 --password2 secret2
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2020-04-11 01:15:57 +02:00
|
|
|
|
You also may have to edit the examples you use, like
|
|
|
|
|
examples/imapsync_example.sh
|
|
|
|
|
and replace in there the command ./imapsync by ./imapsync_bin_Darwin
|
|
|
|
|
in case it is not already done.
|
|
|
|
|
|
|
|
|
|
Be careful the way you edit the files, use a text editor.
|
|
|
|
|
Do not use a word processor because word processors add
|
|
|
|
|
or use special formating characters that will break the shell
|
|
|
|
|
scripts. If you use TextEdit, use the text mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The script examples/imapsync_example_darwin.sh is ready to use,
|
|
|
|
|
it is a copy of examples/imapsync_example.sh adapted to Mac users.
|
|
|
|
|
|
|
|
|
|
The script examples/sync_loop_darwin.sh is also ready to use.
|
|
|
|
|
Try:
|
|
|
|
|
|
|
|
|
|
sh examples/sync_loop_darwin.sh
|
|
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
|
|
cp examples/sync_loop_darwin.sh mysync.sh
|
|
|
|
|
sh mysync.sh
|
|
|
|
|
|
|
|
|
|
Now read on the tutorial
|
|
|
|
|
https://imapsync.lamiral.info/doc/TUTORIAL_Unix.html
|
|
|
|
|
|
2019-07-03 01:17:46 +02:00
|
|
|
|
=======================================================================
|
|
|
|
|
Installing imapsync script on Darwin / Mac OS X with brew
|
|
|
|
|
=======================================================================
|
|
|
|
|
|
|
|
|
|
In case you have brew installed on your system ( see https://brew.sh/ ),
|
|
|
|
|
install imapsync with the command:
|
|
|
|
|
|
|
|
|
|
brew install imapsync
|
|
|
|
|
|
|
|
|
|
Do a real test with imap server test.lamiral.info:
|
|
|
|
|
|
|
|
|
|
imapsync --testslive
|
|
|
|
|
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2019-07-03 01:17:46 +02:00
|
|
|
|
=======================================================================
|
|
|
|
|
Installing imapsync script on Darwin / Mac OS X the way I do
|
|
|
|
|
=======================================================================
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
This part is only for advanced Unix users, or brave users.
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
The "make" command is a prerequisite to build some Perl modules.
|
|
|
|
|
Install make in case it is not already installed.
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
First let us install cpanminus locally in ~/perl5
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
wget --no-check-certificate -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
Then take this install into account in the current environment
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
|
|
|
|
|
perl -I ~/perl5/lib/perl5 -Mlocal::lib
|
|
|
|
|
|
|
|
|
|
If you want to have always this setting in your environment then run the commands
|
|
|
|
|
|
|
|
|
|
echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile
|
|
|
|
|
echo 'export MANPATH=$HOME/perl5/man:$MANPATH' >> ~/.profile
|
|
|
|
|
cat ~/.profile
|
|
|
|
|
|
|
|
|
|
Now let's update the standard CPAN Perl module
|
|
|
|
|
|
|
|
|
|
cpanm CPAN
|
|
|
|
|
|
|
|
|
|
The specific install part for imapsync begins, the script "prerequisites_imapsync"
|
|
|
|
|
helps to verify what is needed to install on your system
|
|
|
|
|
|
|
|
|
|
curl -L http://imapsync.lamiral.info/INSTALL.d/prerequisites_imapsync > prerequisites_imapsync
|
|
|
|
|
sh prerequisites_imapsync
|
|
|
|
|
|
|
|
|
|
cpanm Authen::NTLM
|
|
|
|
|
cpanm File::Copy::Recursive IO::Tee
|
|
|
|
|
cpanm Mail::IMAPClient
|
|
|
|
|
cpanm Readonly
|
|
|
|
|
cpanm Unicode::String
|
|
|
|
|
cpanm Data::Uniqid
|
|
|
|
|
cpanm JSON::WebToken
|
|
|
|
|
|
|
|
|
|
We're ready to install and test the latest imapsync
|
|
|
|
|
|
|
|
|
|
wget -c http://imapsync.lamiral.info/imapsync
|
|
|
|
|
./imapsync
|
|
|
|
|
./imapsync --modules
|
2015-12-03 18:16:32 +01:00
|
|
|
|
|
|
|
|
|
You can rerun "sh prerequisites_imapsync"
|
2015-05-28 19:04:57 +02:00
|
|
|
|
to verify everything is ok:
|
|
|
|
|
|
|
|
|
|
sh prerequisites_imapsync
|
|
|
|
|
|
|
|
|
|
When everything is ok the script execution ends with this sentence
|
|
|
|
|
"All needed modules are already installed"
|
|
|
|
|
|
|
|
|
|
Now imapsync should work on your system.
|
|
|
|
|
|
2017-09-23 23:54:48 +02:00
|
|
|
|
./imapsync --testslive
|
|
|
|
|
|
2019-07-03 01:17:46 +02:00
|
|
|
|
=======================================================================
|
|
|
|
|
Building imapsync binary on Darwin / Mac OS X
|
|
|
|
|
=======================================================================
|
2015-12-03 18:16:32 +01:00
|
|
|
|
|
|
|
|
|
cpanm Module::ScanDeps
|
|
|
|
|
cpanm PAR::Packer
|
|
|
|
|
|
|
|
|
|
pp -o imapsync.bin imapsync
|
|
|
|
|
|
|
|
|
|
./imapsync.bin
|
|
|
|
|
./imapsync.bin --testslive
|
|
|
|
|
./imapsync.bin --tests
|
|
|
|
|
./imapsync.bin --module
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
|
|
|
|
|
2019-07-03 01:17:46 +02:00
|
|
|
|
=======================================================================
|
|
|
|
|
Installing imapsync Mac OS X Leopard
|
|
|
|
|
=======================================================================
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
|
|
|
|
Mac OS X Leopard has perl 5.8.8 and an old openssl version.
|
|
|
|
|
|
|
|
|
|
|
2019-07-03 01:17:46 +02:00
|
|
|
|
=======================================================================
|
|
|
|
|
=======================================================================
|