imap: factor out listRecent()