It depends on your provider, unfortunately. If you use their iCloud mail service, search works fine – it appears to have some way to do server-side search for their own email.
IMAP is a horrifically insufficient protocol. Literally every mail provider just implements their own custom JSON protocol to use with their own proprietary apps. Fastmail created JMAP which was meant to be an open source standard but so far only Fastmail uses it so it's just another provider specific protocol and client.
IMAP is a horrifically insufficient protocol. Literally every mail provider just implements their own custom JSON protocol to use with their own proprietary apps. Fastmail created JMAP which was meant to be an open source standard but so far only Fastmail uses it so it's just another provider specific protocol and client.