# Hosting my own mailserver for Discourse?

**URL:** <https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316>\
**Category:** Self-hosting\
**Created:** [December 30, 2018, 3:25pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316 "2018-12-30T15:25:05Z")\
**Posts on this page:** 7\
**Page:** 1

## AI-generated summary

The discussion is about hosting a personal mailserver for use with Discourse. [Benjamin_Johnston](/t/-/105316/1) wants to avoid using services like Mailgun, but others are warning about the difficulties of self-hosting a mailserver. [fhe](/t/-/105316/2) shared a tutorial on setting up an ISP-level mail server, but [pfaffman](/t/-/105316/3) advised against it, citing the complexity and potential issues with spam classification, unless sending a very large volume of emails. [pfaffman](/t/-/105316/3) also suggested Mail in a Box as an "easy" alternative, but [Benjamin_Johnston](/t/-/105316/4) noted it only supports outdated Ubuntu 14.04. [justin](/t/-/105316/6) and [pfaffman](/t/-/105316/5) echoed the advice to avoid self-hosting due to the unnecessary work involved. [itsbhanusharma](/t/-/105316/7) added that mass emailing is not recommended with solutions like mailinabox and mailcow, as they are meant for communication suites rather than mass mail sending.

<div class="post-metadata">

**Author:** ![Benjamin\_Johnston](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@Benjamin\_Johnston](https://meta.discourse.org/u/Benjamin_Johnston)\
**Post date:** [December 30, 2018, 3:25pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/1 "2018-12-30T15:25:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fhe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fhe/32/113345_2.png) [@fhe](https://meta.discourse.org/u/fhe)\
**Post date:** [December 30, 2018, 3:38pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/2 "2018-12-30T15:38:44Z")

</div>

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

[https://workaround.org/ispmail](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.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [December 30, 2018, 6:18pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/3 "2018-12-30T18:18:15Z")

</div>

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/](https://discourse.mailinabox.email/)

---

<div class="post-metadata">

**Author:** ![Benjamin\_Johnston](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@Benjamin\_Johnston](https://meta.discourse.org/u/Benjamin_Johnston)\
**Post date:** [December 30, 2018, 6:23pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/4 "2018-12-30T18:23:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [December 30, 2018, 7:33pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/5 "2018-12-30T19:33:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)\
**Post date:** [December 30, 2018, 7:41pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/6 "2018-12-30T19:41:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)\
**Post date:** [December 30, 2018, 7:42pm UTC](https://meta.discourse.org/t/hosting-my-own-mailserver-for-discourse/105316/7 "2018-12-30T19:42:01Z")

</div>

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.
