HACKER Q&A
📣 gl-prod

How to run my own mail server?


What's good practices on running my own mail server? What software?


  👤 therealmarv Accepted Answer ✓
https://mailinabox.email/ probably. The name is what it promises... an out of a box experience for a full email server.

👤 sys42590
My suggestion is to select a solid (non-rolling) distro for your mail server, and look for a suitable tutorial for your distro that involves Postfix and Dovecot software.

You'll need a fixed IP address and the ability to have your ISP / hoster configure a sensible reverse DNS entry for that IP address that matches a forward DNS entry that points to the same IP address.

You should at least configure some DNS records to have a proper MX and SPF configuration, too. Your preferred search engine (e.g. Google / DuckDuckGo) is your friend.

For inbound spam filtering it makes sense to configure Spamassassin as a milter (=mail filter).

If you are a perfectionist, you should look into setting up DKIM for your mail domain.


👤 boplicity
Cpanel may not be "cool" but it basically has everything you need built in already. It makes it super easy to run your own mail server. You would then use it to set up DKIM/SPF/etc.

Before setting it up, I would first do a blacklist check on the server's IP address. I would also avoid using any shared IP address, as that could cause long term problems.

Reputation is important, and is a combination of IP reputation, domain reputation, and mail volume. I don't have experience running a low-volume mail server, though I suspect that sending mail to people you already know, and making sure that it gets through to them would be helpful. (Ask them to remove it from spam/whitelist/etc.) The main challenge is to get mail accepted from Microsoft/Yahoo/Google. That accounts for 90%+ of recipients.


👤 DamonHD
It may be an unpopular choice, but having run my own mail since the mid '90s I still use sendmail as my MTA. I now also use dovecot for POP3 access to read mail.

I just had to move it all in a hurry when my server died...

https://www.earth.org.uk/note-on-site-technicals-67.html#202...


👤 yuppie_scum
Look into AWS SES. You can run a serverless email server for pretty darn cheap.