# How to create my own SMTP server for discourse

**URL:** <https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339>\
**Category:** Product Support\
**Created:** [October 6, 2019, 1:31pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339 "2019-10-06T13:31:39Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

[Brajmohan_Kumar](/t/-/130339/1) inquires about setting up a self-hosted SMTP server on the same machine as Discourse to handle administrative emails, such as admin registration and password resets, explicitly avoiding third-party services like Mailgun or Sendgrid. [Dannii](/t/-/130339/2) suggests using "Mail-in-a-Box" as a potential solution, providing a link to the relevant Meta Discourse topic. However, [SouperC](/t/-/130339/3) warns that rolling your own email server may negatively impact email deliverability. [danb35](/t/-/130339/4) challenges the necessity of a self-hosted server for these specific functions, noting that third-party SMTPs are sufficient for account registration and password recovery, and questions the need for a dedicated self-hosted instance for such tasks.

<div class="post-metadata">

**Author:** ![Brajmohan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brajmohan_kumar/32/138760_2.png) [@Brajmohan\_Kumar](https://meta.discourse.org/u/Brajmohan_Kumar)\
**Post date:** [October 6, 2019, 1:31pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339/1 "2019-10-06T13:31:39Z")

</div>

I know about Mailgun, Sendgrid and many more third-party SMTP mail servers for Discourse. But I want to have my own SMTP server so that all E-mail functionality will work like registering Admin account and getting emails for new Sign Up, Forgot Password, etc I don’t want a third party e-mail SMTP.

Can you please guide me on how to set up my own e-mail SMTP for discourse in the same server where discourse is installed?

Thank you!

---

<div class="post-metadata">

**Author:** ![Dannii](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dannii/32/129087_2.png) [@Dannii](https://meta.discourse.org/u/Dannii)\
**Post date:** [October 6, 2019, 3:08pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339/2 "2019-10-06T15:08:59Z")

</div>

This is an option

> [@Mail-in-a-Box email](https://meta.discourse.org/t/mail-in-a-box-email/63443):
>
> I used Mail-in-a-Box email during setup to use with Discourse. Mail-in-a-Box is an automatic self hosted email system where you run the script on a new Ubuntu 14.04 box with a dedicated domain name for email and it sets up everything for you and all you need to do is create email accounts and update the software regularly. I recommend it for managing your own email and it works for setting up an account for use with websites. I made [server@r3df0x.net](mailto:server@r3df0x.net) and I use that to send email from websites…

---

<div class="post-metadata">

**Author:** ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)\
**Post date:** [October 6, 2019, 7:37pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339/3 "2019-10-06T19:37:02Z")

</div>

Keep in mind deliverability of emails will likely suffer if you roll your own email server.

---

<div class="post-metadata">

**Author:** ![danb35](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@danb35](https://meta.discourse.org/u/danb35)\
**Post date:** [October 6, 2019, 11:52pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339/4 "2019-10-06T23:52:45Z")

</div>

> [@Brajmohan\_Kumar](#):
>
> so that all E-mail functionality will work like registering Admin account and getting emails for new Sign Up, Forgot Password, etc

Why do you think you need to run your own server for any of this to work? If you just want to set up your own SMTP server, go for it, but I haven’t found it necessary for any of these things to work.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [June 6, 2023, 12:34pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339/5 "2023-06-06T12:34:10Z")

</div>

Automatically bumped on June 6, 2023, 12:34pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [July 6, 2023, 12:34pm UTC](https://meta.discourse.org/t/how-to-create-my-own-smtp-server-for-discourse/130339/6 "2023-07-06T12:34:28Z")

</div>

Closed on July 6, 2023, 12:34pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
