Hosting my own mailserver for Discourse?

I have looked around but all the tutorials say to use a service like Mailgun, but I would rather not.

Anyone know how I would host my own mailserver to use with Discourse.

3 Likes

This site has a good tutorial on setting up your own ISP-level mail server:

https://workaround.org/ispmail

All I’d say is that it’s not trivial, but the tutorial and the introduction should give you an idea on what’s necessary.

2 Likes

I ran mail servers for close to two decades. When I started, I started by porting Sendmail, UUCP, and listproc to Linux. For almost two years I’ve been considering running my own mail server again; I even have access to a Discourse forum that generates lots of mail (that I’m paying Mailgun to deliver) that I could use to warm up an IP, and it wouldn’t be the end of the world if some of that mail got classified as spam while things were getting started. I have a server that’s on an IP block that is not likely to be on lots of blacklist.

Those a near-perfect conditions for setting up a mail server. I haven’t done it.

If you’re sending fewer than 10K messages per month and have access to a credit card there is almost no reason to run your own mail server.

Another “easy” way to do it appears to be Mail in a Box. You can get help on getting it working from https://discourse.mailinabox.email/

3 Likes

I’ve looked into mailinabox but it only supports Ubuntu 14.04

1 Like

Indeed, that doesn’t bode well for the project. Perhaps running a mail server isn’t as easy as they thought. :slight_smile:

As a former IT guy, I echo @pfaffman’s advice. There’s a lot of unnecessary and troublesome work ahead if you choose to roll your own mail server.

2 Likes

Mass emailing is not recommended through mailinabox and mailcow (and even docker-mailserver)

The reason is that all of them are built as a communication suite not as a mass mail sender.

While the easiest will be to set up an MTA and just use it to send emails I haven’t had much success in getting things like EXIM to work nicely with discourse.

3 Likes