1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/INSTALL.d/INSTALL.Darwin.txt

252 lines
8.2 KiB
Plaintext
Raw Normal View History

2015-12-03 18:16:32 +01:00
#!/bin/cat
2022-02-15 19:29:45 +01:00
# $Id: INSTALL.Darwin.txt,v 1.36 2021/12/24 21:08:13 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
2021-08-04 21:14:36 +02:00
Usual users should follow the A) section only, with the exeption
of reading B) before if you use a Catalina system.
A) Installing imapsync binary on Darwin / Mac OS X
B) Installing imapsync on Catalina
C) Installing imapsync script on Darwin / Mac OS X with brew
D) Installing imapsync script on Darwin / Mac OS X the way I do
E) Building imapsync binary on Darwin / Mac OS X
2019-07-03 01:17:46 +02:00
=======================================================================
2021-08-04 21:14:36 +02:00
A) Installing imapsync binary on Darwin / Mac OS X
2019-07-03 01:17:46 +02:00
=======================================================================
2015-05-28 19:04:57 +02:00
2020-04-11 01:15:57 +02:00
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),
2022-02-15 19:29:45 +01:00
available in the compressed tarball called imapsync-2.140.tgz
where 2.140 is the imapsync version number.
2021-08-04 21:14:36 +02:00
In case you haven't buy it yet or forgot where the download link is,
check https://imapsync.lamiral.info/dist/
2022-02-15 19:29:45 +01:00
Download the tarball imapsync-2.140.tgz, not the binary imapsync_bin_Darwin
2021-08-04 21:14:36 +02:00
because the binary is also in the tarball and there are other useful files
in the tarball. The binary present in /dist/ is just there for a fast upgrade
when you need one.
2022-02-15 19:29:45 +01:00
I suppose this tarball imapsync-2.140.tgz is downloaded under your $HOME directory,
2021-08-04 21:14:36 +02:00
let say /Users/gilles/, but you can put it anywhere. In real, your $HOME directory
is not /Users/gilles/, it maybe /Users/john/ or /Users/zoey/ where John or Zoey
is you login name.
2015-05-28 19:04:57 +02:00
Open a terminal: /Applications/Utilities/Terminal double-click on Terminal.
2021-08-04 21:14:36 +02:00
Untar the tarball:
2015-05-28 19:04:57 +02:00
2015-12-03 18:16:32 +01:00
cd
2021-08-04 21:14:36 +02:00
pwd
2022-02-15 19:29:45 +01:00
tar xzvf imapsync-2.140.tgz
2015-05-28 19:04:57 +02:00
2022-02-15 19:29:45 +01:00
In case the previous command fails, it means the tarball file called imapsync-2.140.tgz
2021-08-04 21:14:36 +02:00
is not in your $HOME directory, you may have downloaded it elsewhere on the file system.
A way to find it is the command:
2015-05-28 19:04:57 +02:00
2021-08-04 21:14:36 +02:00
find / | grep imapsync
2022-02-15 19:29:45 +01:00
Now that the tarball is extracted, it created a directory called imapsync-2.140/
Go into the directory imapsync-2.140 with the command:
2021-08-04 21:14:36 +02:00
2022-02-15 19:29:45 +01:00
cd imapsync-2.140
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
2021-08-04 21:14:36 +02:00
The script examples/imapsync_example_darwin.sh is ready to use,
it is a copy of examples/imapsync_example.sh adapted to Mac users.
Be careful the way you edit the script files, use a text editor.
2020-04-11 01:15:57 +02:00
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.
2021-08-04 21:14:36 +02:00
In the terminal, try:
2020-04-11 01:15:57 +02:00
2021-08-04 21:14:36 +02:00
sh examples/imapsync_example_darwin.sh
2020-04-11 01:15:57 +02:00
2021-08-04 21:14:36 +02:00
or copy it and run your copy instead:
2020-04-11 01:15:57 +02:00
2021-08-04 21:14:36 +02:00
cp examples/imapsync_example_darwin.sh mysync.sh
2020-04-11 01:15:57 +02:00
sh mysync.sh
Now read on the tutorial
https://imapsync.lamiral.info/doc/TUTORIAL_Unix.html
2021-08-04 21:14:36 +02:00
in order to complete your formation on imapsync.
If you need to sync or migrate many accounts,
the script examples/sync_loop_darwin.sh is also ready to use.
2020-04-11 01:15:57 +02:00
2019-07-03 01:17:46 +02:00
=======================================================================
2021-08-04 21:14:36 +02:00
B) Installing imapsync on Catalina
=======================================================================
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. Imapsync is not a malware or similar.
All other Mac OS X releases are ok.
In order to pass away this detection, follow these steps:
Run imapsync_bin_Darwin
After this first launch, the security asks to authorize the unknown
developer program. Setup the root of the imapsync_bin_Darwin file
and then run it again or any of the .sh files, it should run ok
without any notice any more.
Sources of this tip:
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
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"
I don't own a Catalina computer so I can't experiment on this nor make
imapsync directly ok with Catalina. You're richer than me :-)
=======================================================================
C) Installing imapsync script on Darwin / Mac OS X with brew
2019-07-03 01:17:46 +02:00
=======================================================================
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
2021-08-04 21:14:36 +02:00
If you encouter an error like "String.c: loadable library and perl binaries
are mismatched (got handshake key 0xc500080, needed 0xc400080)",
then install imapsync from source with the command:
brew install -s imapsync
Thanks to Alessandro for this tip!
2015-05-28 19:04:57 +02:00
2019-07-03 01:17:46 +02:00
=======================================================================
2021-08-04 21:14:36 +02:00
D) Installing imapsync script on Darwin / Mac OS X the way I do
2019-07-03 01:17:46 +02:00
=======================================================================
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.
2021-08-04 21:14:36 +02:00
Install the "make" command 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
2022-02-15 19:29:45 +01:00
curl -L https://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
2022-02-15 19:29:45 +01:00
perl -I ~/perl5/lib/perl5 -Mlocal::lib # just to see the variables
eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` # doing the variables assigments
2017-09-23 23:54:48 +02:00
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
2022-02-15 19:29:45 +01:00
. ~/.profile
2017-09-23 23:54:48 +02:00
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
2022-02-15 19:29:45 +01:00
cpanm IO::Tee
cpanm Mail::IMAPClient # File::Copy::Recursive?
2017-09-23 23:54:48 +02:00
cpanm Unicode::String
2022-02-15 19:29:45 +01:00
cpanm Sys::MemInfo
cpanm File::Tail
cpanm Test::MockObject
cpanm Readonly
2017-09-23 23:54:48 +02:00
cpanm Data::Uniqid
cpanm JSON::WebToken
We're ready to install and test the latest imapsync
2022-02-15 19:29:45 +01:00
curl -L http://imapsync.lamiral.info/imapsync > imapsync
chmod +x imapsync
2017-09-23 23:54:48 +02:00
./imapsync
2022-02-15 19:29:45 +01:00
./imapsync --testslive
./imapsync --tests
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"
2019-07-03 01:17:46 +02:00
=======================================================================
2021-08-04 21:14:36 +02:00
E) Building imapsync binary on Darwin / Mac OS X
2019-07-03 01:17:46 +02:00
=======================================================================
2015-12-03 18:16:32 +01:00
cpanm Module::ScanDeps
cpanm PAR::Packer
2022-02-15 19:29:45 +01:00
pp -x -u -o imapsync.bin imapsync
2015-12-03 18:16:32 +01:00
./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
=======================================================================
=======================================================================