IMAP does support server-side full-text search of bodies. (In mutt, this is invoked with the =b operator of the l command.) Amusingly enough, this works well with real mail servers like dovecot, but it seems to sometimes miss matches with gmail, because gmail's indexes aren't very good.