How to install imapsync on Ubuntu 12.04

Imapsync is a really useful script from syncing imap mail boxes.  I used it when migrating from Zimbra to Google Mail.  I wanted to install imapsync from source on my Ubuntu server but found the instructions a little ridiculous.  The start of the instructions are:

Go into the directory imapsync-x.xx and read the INSTALL file.
You’re already reading the INSTALL file.

Here is what I did it:

1) Download the source from github and extract it.

2) Install a few dependences:

aptitude install libmail-imapclient-perl libdigest-md5-file-perl libterm-readkey-perl libio-socket-ssl-perl libdigest-hmac-perl makepasswd

3) In the source folder run:

make -n install

make install

You should then have a working imapsync.  To test it try:

imapsync -version

Boot partition full of old kernels

I started getting an error message every time I booted into Ubuntu.  “‘The volume “boot” has only ….. bytes disk space remaining.”.   This is caused by old Linux kernels filling up the boot partition on the hard drive.  For most users, you don’t need to keep old kernels and therefore you can remove them to free up some space.   For simplicity sake – it did this using the Synaptic Package Manager.  Here is how:

1) First, you need to find the current kernel that you are was using – so that you don’t remove it!  Open a terminal and type:

uname -a

Linux toshiba 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:05:29 UTC 2013 i686 i686 i686 GNU/Linux

2) From the output, I was using 3.5.0-23-generic.  Therefore, I could remove all other kernels with version numbers lower than this.   There are three packages that make up the kernel:

  • linux-header-x-x-x-x-generic
  • linux-image-x-x-x-x-generic
  • linux-image-extra-x-x-x-x-generic

Using Synaptic Package Manager search for linux-header, then linux-image and select  the ones with a lower version number than your current kernel.  Mark each package for removal.  The linux-image-extra will automatically be removed when you remove a linux-image.

Then apply the changes and reboot your machine.

p.s. – it strikes me that it would be really good if Ubuntu could automatically do this.  Perhaps this could be built into the automatic update tool.