'Pop search terms from the beginning of C{query} until there are none
left and apply them to the given message.
@param query: A list representing the parsed form of the search query.
@param id: The sequence number of the message being checked.
@param msg: The message being checked.
@type lastSequenceId: L{int}
@param lastSequenceId: The highest sequence number of any message in
the mailbox being searched.
@type lastMessageId: L{int}
@param lastMessageId: The highest UID of any message in the mailbox
being searched.
@return: Boolean indicating whether all of the query terms match the
message.'

def _searchFilter(self, query, id, msg, lastSequenceId, lastMessageId):

    while query:
        if (not self._singleSearchStep(query, id, msg, lastSequenceId, lastMessageId)):
            return False
    return True
