I’m describing it as a “Hacker’s Replacement for GMail” as opposed to just a “Replacement for GMail” because it involves a good deal of familiarity with Unix (or at least, to set up and debug the whole system it did. Perhaps following along is easier). But, the end result is powerful enough that for me, it is worth it. I finally switched over to using it primarily recently, confirming that all works as expected. I wanted to share the instructions in case they prove useful to someone else setting up a similar system.
To approach an IMAP mailserver from within Emacs, you need to install additional software in Emacs. Wanderlust is an proven solution to add IMAP capabilities to Emacs.
Now that Gmail has bested the Outlooks of the world, it's a good time to assess the state of desktop software. There are some things that work better on your computer (your music app, your photo editor, your spreadsheets), and there are some that work better online (everything else). Over the last few years, we've seen many programs shifting from the first category to the second—now you can get spreadsheets and photo editors online, though they're still not as good as programs hosted on your computer. But e-mail has crossed the line completely.