It looks to me like we'll first fetch message IDs above in all circumstances (via `_get_unread_message_ids`) and then, if `MAX_MSG_SIZE` is defined, we'll throw that information away and fetch message IDs using this method?

At the moment, I'm wondering what you are accomplishing in `_get_small_message_ids` and how that differs from `_get_all_message_ids` -- care to clarify?