As another poster pointed out, it sounds like you want more of a mail search and archival tool than a mail server. I would suggest you pull the emails in maildir format from Google Takeout, and then index/search them with the amazing Notmuch. Notmuch is way more capable than Gmail search ever has been. Look at the Arch Wiki page page as well for info, the official docs are a bit obtuse but it’s not actually hard to use.
No, I used it with Alot mostly in the terminal. Can’t really speak to the front ends, I was kind of assuming you don’t need to search your old emails that often.