Handle socket errors in IMAP mail segment
Merging upstream
Install bzr before running tests