Basically every serious mailserver package has imapsync included. I don't know what kind of hardware you're running and what you expect from the server doing the copying but running webmail, search indexes, antivirus, etc will cost you ram. There are solutions aimed at keeping backups of your mail though, I can't give you recommendations, the only thing I remember is that they don't give you a normal webmail or imap, instead you get a web-interface aimed at searching through the backup(s)
Walking, or running, is good for your brain in almost every way. My depression was/is coupled with social anxiety so it was hard to get myself to do it but things like walking to the grocery store instead of biking/car helped me change that into 'I'll take a detour'.
The worst hobbies for me are the ones that are done sitting still, or anything that 'creates' a different 'reality/world'. For me that was anything behind my pc. Woodworking is better for me and allows me not to worry about social stuff but walking is definitely better for my brain.