Start by getting this source code:
mkdir ~/src
git clone git@github.com:marlun/serverconf.git ~/src/serverconf
Get the Offlineimap source:
git clone https://github.com/OfflineIMAP/offlineimap.git ~/src/offlineimap
Install the configuration file:
ln -s ~/src/serverconf/offlineimaprc ~/.config/offlineimap/config
Done, you can now sync:
cd ~/src/offlineimap && ./offlineimap.py