I'm trying to figure out if IMAP's search
(with args: "unseen all"
) command works by searching all folders in a mailbox, or just the currently selected folder?
I.e. when selecting INBOX
and issuing search
command, it doesn't find any new messages.
a select "INBOX" * 383 EXISTS * 0 RECENT [...] a search unseen all * SEARCH a OK Success
But when I move into a folder which has a new message, it works:
a select "inbox/test1/test2" [...] a uid search unseen all * SEARCH 7 8 9
It detects three new messages, which is the truth. So my question is, is this behavior correct? Shouldn't search unseen all
search all folders for new messages?