Well I set up my email server thru cloudflare and managed to receive emails directly to my basement server. I could live with this and the various security threats incoming thru my unifi. But one thing is for sure, my wife won’t have any of it. She’s a total backwards thinking give me windows or I’ll jump kind of Gal. So I found that I could run a dockerized Thunderbird instance and I thought … Wow! I can just login to it from my computer or my phone, Surely this is it! I can have emails backed up from Gmail to my server and just access my server! And you know what? It works! I can access my Gmail on my browser! It’s beautiful!.. But then I login through my phone and wow! I can access my Gmail! Thru my phone! Except the interface is the same as my desktop. It’s literally a VNC to the server. I can login to it on my desktop and watch the mouse move as I move my finger on my phone! Great party trick, but…the text is microscopic. So is there another way to get IMAP and SMTP interface to Gmail, archiving all emails on my own server? I literally don’t want any of my emails to live on a Gmail server, but I want to be able to send receive and search emails I previously passed through Gmail but now live on my server.
I think I missed something in your description, but what are you running on your local server? I think most people set up postfix to relay the emails over to gmail or whoever, and there are options in postfix for backwards compatibility with Outlook or even Microsoft Mail so your wife could use whatever client she wants. If you don’t have a local mail server set up then this is probably what you want to do. This method allow a local or remote connection from any client so you could run K9 on your phone instead of a VPN.
For opening such a setup to the internet (and allowing access from anywhere), make sure you have strong passwords on your accounts, require SASL authentication, and set up fail2ban to block repeated attempts to hack your mailboxes. Don’t run anything else on the same server (or use virtual machines or strong containers) to reduce the chance of your mail server getting compromised other ways, and you should be good to go.