Skip to content

Instantly share code, notes, and snippets.

@mkropat
Last active June 23, 2018 22:39
Show Gist options
  • Save mkropat/a7aead7136a2ba219356890b7250e469 to your computer and use it in GitHub Desktop.
Save mkropat/a7aead7136a2ba219356890b7250e469 to your computer and use it in GitHub Desktop.

Some (possibly incomplete) notes on how to install and use imapsync.

Installation

Pre-requisites

sudo apt install -y build-essential cpanimus libperl-dev libssl-dev

Install

git clone https://github.com/imapsync/imapsync.git
cd imapsync
make && make "PREFIX=$HOME" install

The install step will fail at first. Take note of the cpanm command the installer outputs. We'll need it later.

Perl Dependencies

Enable Local Perl Modules

Rather than pollute Ubuntu directories with random Perl files, let's install them into ~/perl5 so that they are cleanly separated.]

You only need to run these commands once:

eval $(perl -I ~/perl5/lib/perl5 -Mlocal::lib)
echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile
Install Perl Dependencies

Take the cpanm command that was output earlier and run it, taking care to strip out the double quotes the installer incorrectly adds for some reason:

cpanm Authen::NTLM CGI Crypt::OpenSSL::RSA Data::Uniqid Digest::HMAC Digest::HMAC_MD5 Dist::CheckConflicts File::Copy::Recursive IO::Socket::INET6 IO::Tee JSON JSON::WebToken JSON::WebToken::Crypt::RSA Mail::IMAPClient Module::ScanDeps PAR::Packer Parse::RecDescent Readonly Sys::MemInfo Term::ReadKey Test::Fatal Test::Mock::Guard Test::MockObject Test::Pod Test::Requires Test::NoWarnings Test::Deep Test::Warn Unicode::String

Install - Part 2

Back in the imapsync directory, run this command again:

make "PREFIX=$HOME" install

The command should succeed this time. If not, check the output to see if there are any dependencies that are any missing dependencies.

See Also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment