# Configure Mailgun for email when using Digital Ocean for DNS

**URL:** https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590
**Category:** Sysadmins
**Tags:** email, how-to
**Created:** [4 maart 2016 om 19:57 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590 "2016-03-04T19:57:40Z")
**Posts on this page:** 9
**Page:** 2

<div class="post-metadata">

### Author: ![LiveLikeLastDay](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/livelikelastday/32/81400_2.png) [@LiveLikeLastDay](https://meta.discourse.org/u/LiveLikeLastDay)
#### Post date: [31 oktober 2017 om 03:59 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/21 "2017-10-31T03:59:16Z")

</div>

> [@Steven](#):
>
> DISCOURSE\_SMTP\_USER\_NAME: [noreply@yourdomaine.com](mailto:noreply@yourdomaine.com) # (optional)

Thanks for you post, my testing shows that above line is not optional. Should be something like postmaster@[[YourDoamin.com](http://YourDoamin.com)], this is the default SMTP Login in Mailgun.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [31 oktober 2017 om 14:35 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/22 "2017-10-31T14:35:47Z")

</div>

With Mailgun it’s mandatary you’re right. You can use postmaster or create a new smtp account in Mailgun with the option `Manage SMTP credentials`

I created a [noreply@mydomain.com](mailto:noreply@mydomain.com) for example.

---

<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: [11 mei 2018 om 16:20 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/23 "2018-05-11T16:20:55Z")

</div>

Digital Ocean often blocks outgoing SMTP ports (25, 587), so using port 2525 with Mailgun is a way to ensure that you don’t get caught up if they do decide to block you. I use port 2525 for all of my installs to avoid having to worry about whether they decide to block those ports for a given droplet.

---

<div class="post-metadata">

### Author: ![WebByHoward](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@WebByHoward](https://meta.discourse.org/u/WebByHoward)
#### Post date: [5 juni 2019 om 15:30 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/24 "2019-06-05T15:30:36Z")

</div>

I’m having an issue with DKIM and verifying the dns server. When I enter the DNS sending settings from mailgun into the DNS Zone Editor on BlueHost and then try to verify the settings on Mailgun, I see a green checkmark next to everything except the **domainkey**. There is a red ‘x’ there, so i’m assuming this means that it will not be verified or that I cannot even start the process of being verified.

edit: to add to this, I tried using **‘mailo’** instead of **‘k1’** preceeding the ‘.’ for the **domainkey**. I’m still seeing a red x. So i’m not sure what’s happening at this point.

 ![1](https://global.discourse-cdn.com/meta/original/3X/f/5/f5221e1fc1e228163aa7f17040213210082166bf.png) ![2](https://global.discourse-cdn.com/meta/original/3X/1/0/10a461b027710e608f09ecf31269c88a68156ec1.png)

---

<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: [5 juni 2019 om 16:05 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/25 "2019-06-05T16:05:41Z")

</div>

You need to create the the records required by mailgun. When you do, that checkbox will turn green like the others. It can take a while for those records to propagate.

We can’t guess here what you’ve done wrong. You should ask mailgun for help.

---

<div class="post-metadata">

### Author: ![WebByHoward](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@WebByHoward](https://meta.discourse.org/u/WebByHoward)
#### Post date: [5 juni 2019 om 16:19 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/26 "2019-06-05T16:19:15Z")

</div>

I understand. I’ve added screenshots just for clarification. Everything seems to check out EXCEPT for domainkey.

I guess I will take your advice and contact them about the issue.

---

<div class="post-metadata">

### Author: ![bacionBOI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bacionboi/32/187965_2.png) [@bacionBOI](https://meta.discourse.org/u/bacionBOI)
#### Post date: [30 september 2020 om 16:23 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/27 "2020-09-30T16:23:10Z")

</div>

> [@Steven](#):
>
> - Now, you can change the email adresse you want to use (if you don’t want `postmaster@yourdomain` created by mailgun). In Mailgun \> Domains, you should have this on top of the page :

Do you have an Image to Change the Domain to `noreply@yourdomain.com`?

---

<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: [14 oktober 2020 om 00:26 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/30 "2020-10-14T00:26:10Z")

</div>

The launcher script does a `git pull`, there is no need for that to be an explicit step any more. Removed.

---

<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: [14 oktober 2020 om 15:38 UTC](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590/31 "2020-10-14T15:38:22Z")

</div>

FWIW, `./launcher rebuild app` does the pull, but `./launcher bootstrap web_only` does not.

[Previous page](https://meta.discourse.org/t/configure-mailgun-for-email-when-using-digital-ocean-for-dns/40590.md?page=1)
