Go ahead. Write a client based on RFC 3501 that uses the search response sensibly, and isn't at all confused by that search response.
I already have. It's called the c-client library.
The only approach I can imagine is "try to tie the search response to a search command, and ignore it else"... which does not give me a warm fuzzy feeling.
I can do better. c-client lights the "searched" flag for that message, and passed up a mm_searched() event to the caller.
The main wart in IMAP with search is that the untagged SEARCH response does not indicate whether or not the messages are UIDs. UID SEARCH should be deprecated in favor of a command which returns a different response for UIDs.
PS: I bet you're impressed that I know your password ;)
I don't use such passwords. They give a false sense of security. Dictionary attacks have long ago accomodated such.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.