Added IMAP annotations support - patch from #2688