1 . Installation of the mail server (exim/Postfix) PowerMTA, Sendmail or settings on a paid option (gmail, yandex, etc.).
The 2nd Set up DNS records during the work of mail (10/10). (MX, Dkim, Dmarc, SPF, rDNS, etc.)
3 . Check the work of the mail and on the spam base.