EXPORTED struct entryattlist *mailbox_extract_annots(const struct mailbox *mailbox,
                                                     const struct index_record *record)
{
    struct entryattlist *annots = NULL;
    int r = annotatemore_findall_mailbox(mailbox, record->uid, "*", /*modseq*/0,
                                         load_annot_cb, &annots, /*flags*/0);
    if (r) return NULL;
    return annots;
}
EXPORTED struct entryattlist *mailbox_extract_annots(const struct mailbox *mailbox,
                                                     const struct index_record *record)
{
    struct entryattlist *annots = NULL;
    int r = annotatemore_findall_mailbox(mailbox, record->uid, "*",  0,
                                         load_annot_cb, &annots,  0);
    if (r) return NULL;
    return annots;
}