I’m looking at self hosting my email. I would also like to be able to backup my various personal email accounts and delete my gmail accounts. I would like to keep the email for historical purposes.
I’ve found two github repos that have tools that do just this. I run several unraid hosts to spread services across multiple systems on different electrical circuits throughout my house.
In the instance of this, I would run my email on my main server and this service on a secondary server.
^this guy has several other backup tools that are nifty
https:// www. offlineimap. org/