There's a lot of bad information in this thread.
It is quite possible to host your own email server on collocated equipment, or even a VPS.
I used the guides published by Stéphane Caron:https://scaron.info/blog/debian-mail-postfix-dovecot.htmlhttps://scaron.info/blog/debian-mail-spf-dkim.html
to set up Postfix and Dovecot, and to get everything working with DKIM and SPF. I am able to send emails to Gmail and other major providers, and my emails pass all of the tests at the services Caron links to.
A few caveats:
1. I said it was "quite possible", not "quite easy". Getting everything set up is a bit of a pain in the ass, and you WILL have to modify the instructions in Caron's guides if you're using anything other than Debian or perhaps Ubuntu. In addition, depending on your domain registrar, host, and DNS situation, you may have to fiddle with your DNS setup to get it to work. I have to host my own BIND server to get everything to work.
2. Running any machine with internet-facing daemons is a pain in the ass. The internet is a nasty place.
3. This probably won't work from a home connection. Most ISPs block port 25 and other mail ports on consumer lines.
4. If you allow other people to use your service, and you are not diligent about clamping down on abuse, emails from your service will eventually be filtered or blocked by most email providers, even if you have DKIM and SPF set up and you're otherwise doing everything right.
If you've never hosted an email server before, try that for just yourself and perhaps a few friends before offering a service that might become difficult or expensive to run.