I used "MAIB" (mail-in-a-box) to setup a mail server on DigitalOcean.
I can't really recommend doing that there, and DigitalOcean advises against it for some good reasons. There are a lot of "gotchas" involved that require hoops to jump through to resolve, and they're not just related to DigitalOcean.
You're pretty much blacklisted by most of the big email providers before you send your first email because you're "untrusted", and you have to deal with them on an individual basis.
But, after having it up and running for over a year now and jumping through those hoops it's pretty awesome. I don't have to worry about my provider raising their prices, changing their services, or selling out to another company.
I can have and make as many email accounts as I want and don't have to pay extra for that, and I've got boilerplate code to integrate with any apps I make.
MAIB also has a built-in web base email client, and a "Cloud" app, that's available for each email account. It also has a built-in SSL cert manager that uses Certbot, and it has a built-in DNS server that I've really grown fond of and use for all my DNS needs now.
MAIB goes a long way to make it easier to setup and manage, and great community support, but it's still a fairly extensive ordeal to setup unless you're already familiar with the processes required to do that, and I wasn't when I started out.
All that said, I'm glad I did it. For me, it was well worth it.