# Custom domain email with discourse DO setup

**URL:** <https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670>\
**Category:** Self-hosting\
**Created:** [2017年一月12日 21:01 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670 "2017-01-12T21:01:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![azaleas](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@azaleas](https://meta.discourse.org/u/azaleas)\
**Post date:** [2017年一月12日 21:01 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/1 "2017-01-12T21:01:51Z")

</div>

Hey guys,

I managed to install Discourse on digital ocean. I used [Pepipost](http://www.pepipost.com) as smtp provider.

I got my emails and I can login and register.

Currently I’m using gmail as admin email and I’d like to use my domain name instead, like [admin@mydomain.com](mailto:admin@mydomain.com). I can’t figure out how to do this.

My forum currently uses [forum.mydomain.com](http://forum.mydomain.com). I tried to add MX settings for the email on Digital Ocean domain tab, but my test emails were bounced.

How can I create emails like [admin@mydomain.com](mailto:admin@mydomain.com) and use them with my digital ocean setup?

ps: Before installing the discourse I managed to use MX settings on my domain dashboard at [namesilo](https://www.namesilo.com). But after changing the DNS addresses to digital ocean I couldnt add any valid changes and received the notification saying that my dns server names are changed and i have to add the changes from hosting provider.

DevOps really not my strong suite so help is appreciated.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2017年一月12日 21:47 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/2 "2017-01-12T21:47:06Z")

</div>

To set up email for your domain you will need to sign up with an email provider, per: [discourse/docs/INSTALL-email.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-email.md)

Whether you have it at `@forum.example.com` or `@example.com` does not matter so much, that is a configuration detail that will be set at your email provider.

---

<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:** [2017年一月12日 21:58 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/3 "2017-01-12T21:58:19Z")

</div>

If I understand correctly, Pepipost is delivering mail just fine, but you want to change your incoming mail.

One solution for incoming mail is

> [@Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver](https://meta.discourse.org/t/straightforward-direct-delivery-incoming-mail/49487):
>
> Discourse is all about enabling civilized discussion. While plenty of people like a web interface, e-mail is still the “hub” of many people’s online lives. That’s why sending e-mail is so important, and when you’re sending e-mail, you really want to be able to receive it, too. There are several reasons why: If e-mails “bounce” (they can’t be delivered for some reason), you need to know about that. Repeatedly sending e-mails that bounce will get your e-mails flagged as spam. Receiving e-ma…

Another is to set up another Gmail account just for Discourse and then configure Mailgun to receive and forward the email to the gmail account (that’s on the Routes page).

---

<div class="post-metadata">

**Author:** ![azaleas](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@azaleas](https://meta.discourse.org/u/azaleas)\
**Post date:** [2017年一月13日 08:06 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/4 "2017-01-13T08:06:02Z")

</div>

Yeap, PepiPost is delivering the mail fine. All I want is to create my custom domain email. PepiPost now delivers all mails from [forum.mydomainname.com](http://forum.mydomainname.com) (where I installed discourse). But I want a custom domain email, like [admin@mydomainname.com](mailto:admin@mydomainname.com) to use as admin user for discourse.

I couldnt get pass Mailgun’s verification process. They are constantly sending me emails to verify the account and then ask for mobile number, which I enter and after that, nothing happens. After couple of tries they just block the account. But its good today still..Yesterday I couldn’t even get pass registration process. Always time outs.

So, can I use a combination of PepiPost for smtp for the discourse and something like google or yandex for incoming mails for \*@mydomain.com ?

---

<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:** [2017年一月13日 12:49 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/5 "2017-01-13T12:49:09Z")

</div>

You might create a support ticket at mail guns and ask th approve the account. It’ll help if you give them a credit card number.

---

<div class="post-metadata">

**Author:** ![azaleas](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@azaleas](https://meta.discourse.org/u/azaleas)\
**Post date:** [2017年一月13日 12:56 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/6 "2017-01-13T12:56:16Z")

</div>

Hey @pfaffman. I gave it to them beforehead. But we figured everything out via support and now I enabled the mailgun. Plus,I added my domain email as well. So all is working. I just need to ad cloudflare CDN and I’m golden

---

<div class="post-metadata">

**Author:** ![Markabel](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Markabel](https://meta.discourse.org/u/Markabel)\
**Post date:** [2017年一月13日 13:18 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/7 "2017-01-13T13:18:20Z")

</div>

Just want to reconfirm are you facing issues with [Pepipost](http://pepipost.com) or it’s an email address creation setup which you are trying to do in digital ocean.

I am using Pepipost and the delivery and bounce backs are working properly. In fact, getting a good deliverability rate.

---

<div class="post-metadata">

**Author:** ![azaleas](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@azaleas](https://meta.discourse.org/u/azaleas)\
**Post date:** [2017年一月13日 13:39 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/8 "2017-01-13T13:39:00Z")

</div>

@Markabel, I would confirm that Pepipost works nicely. I just had some issues setting up the custom domain email. So i found some articles on mailgun and decided to try them.

---

<div class="post-metadata">

**Author:** ![Markabel](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Markabel](https://meta.discourse.org/u/Markabel)\
**Post date:** [2017年一月16日 04:50 UTC](https://meta.discourse.org/t/custom-domain-email-with-discourse-do-setup/55670/9 "2017-01-16T04:50:53Z")

</div>

ok @azaleas,

Find the below steps how to set custom domain in [Pepipost](http://pepipost.com/)

Step 1: Create a sub-domain  
[SUB-DOMAIN] = [delivery.yourdomain.com](http://delivery.yourdomain.com)

Example: If your main domain is [xyz.com](http://xyz.com), then create a sub-domain [delivery.xyz.com](http://delivery.xyz.com) and follow the next steps.

Step 2: Point the CNAME record of [SUB-DOMAIN] to [lnk.pepipost.net](http://lnk.pepipost.net)

Step 3: Add/Update the TXT record of pepipost.\_domainkey.[SUB-DOMAIN] to value  
“k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLMMExLiGRqzJkNdNIjUnLX7JL0wjbwwENDoXgJIBisIsrofLPetZM401dioNU8k/Qp6nIyi5oioyZh+1jDXoCPFa4nLGRNj3Nz785N7b76aTtHmy2wTgR2LFS/Yw5/iyzhyrWsIyINyyHs77EoCwSOQjJfhFxb6SmifLN51IIvwIDAQAB”

Read More : [http://support.pepipost.com/knowledge\_base/topics/how-to-set-custom-envelope-sender-slash-return-path-address-and-dkim](http://support.pepipost.com/knowledge_base/topics/how-to-set-custom-envelope-sender-slash-return-path-address-and-dkim)
