UPSes aren’t meant to keep things running for long periods of time.
If you’re trying to keep things on for hours, you need a generator. Then the UPS just needs to keep things running until the generator comes online.
I suspect it’ll be a lot cheaper to get a small generator than it would be to buy enough UPS and batteries to run things for multiple hours.
I use proxmox mail gateway (PMG) for my homelab, configured to relay through my Gmail domain using smtp auth.
I’ve also used PMG at the enterprise level. Never had an issue with it.
It’s postfix underneath.