This is a bit time consuming...but the only way I know of to do this is with zmmboxsearch
This will dump (-d) the messages that match the query (-q) for the mailbox (-m) with a limit of 25000 results returned.
zmmboxsearch -d /tmp/somedir -m email@example.com -l25000 -q "in:\"Inbox\""
From there, you will have all the messages in the /tmp/somedir that will be named:
So, if you were able to fine-tune the problems with the search, you will have all the message ids to get rid of. Otherwise, you will have all messages that you can then go through w/ normal command-line tools, and then make a list of the message IDs that you want to get rid of.
From that you can then use zmmailbox to operate on the specific message ids. So, if you want to remove items, you can do:
zmmailbox -z -m firstname.lastname@example.org di itemid itemid itemid