# DigitalOcean + Siteground E-Mail funktioniert nicht

**URL:** https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [26. Februar 2019 um 23:46 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187 "2019-02-26T23:46:26Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![acronkright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/acronkright/32/132469_2.png) [@acronkright](https://meta.discourse.org/u/acronkright)
#### Post date: [26. Februar 2019 um 23:46 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/1 "2019-02-26T23:46:27Z")

</div>

Hey everyone, I’m new here and new to working with the server side of things.

I’m 4.5 hours into DigitalOcean’s ‘One-click’ Discourse install. So much for 1 click. Everything works fine but emails NEVER send. I’ve destroyed my droplet and started over 2 times. I’ve adjusted app.xml info and rebuilt several times. Email and Password are definitely correct. I’ve sought out Siteground’s support and they say all DNS records are properly configured, and I have SPF and DKIM properly configured. I’ve tried Siteground’s suggested port 465, port 25, and port 2525, rebuilding each time.

From what I can tell, I currently have no Firewall setup in DO, so I don’t think it’s DO blocking email connections, but I’ve created a ticket with them just in case.

But nothing. I get no email from creating an admin user, and when I sign in and try to send a test email I ALWAYS get the same error:

_There was a problem sending the test email. Please double-check your mail settings, verify that your host is not blocking mail connections, and try again._

Here is the log:

```
root@DRD-Forum:/var/discourse# tail shared/standalone/log/rails/production.log
Completed 200 OK in 150ms (Views: 0.4ms | ActiveRecord: 1.3ms)
Started GET "/admin/email.json?_=1551222026511" for 190.181.36.183 at 2019-02-26 23:00:37 +0000
Processing by Admin::EmailController#index as JSON
  Parameters: {"_"=>"1551222026511"}
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 1.3ms)
Started POST "/admin/email/test" for 190.181.36.183 at 2019-02-26 23:00:44 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"adcronkright@gmail.com"}
Sent mail to adcronkright@gmail.com (877.1ms)
Completed 422 Unprocessable Entity in 956ms (Views: 0.4ms | ActiveRecord: 7.2ms)
root@DRD-Forum:/var/discourse# 

```

Is it because my forum is at the subdomain ([forum.democracyrd.org](http://forum.democracyrd.org)), while my admin and system email is on the main domain ([admin@democracyrd.org](mailto:admin@democracyrd.org))?

Didn’t expect the setup to be so easy and then to beat my head against the wall for hours trying to get a single lousy email to send. Any help is appreciated.

Adam

---

<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: [27. Februar 2019 um 02:46 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/2 "2019-02-27T02:46:46Z")

</div>

> [@acronkright](#):
>
> Is it because my forum is at the subdomain ([forum.democracyrd.org](http://forum.democracyrd.org)), while my admin and system email is on the main domain ([admin@democracyrd.org](mailto:admin@democracyrd.org))?

Yes. There is a line near the bottom of the app.yml the will let you change the notification email address.

---

<div class="post-metadata">

### Author: ![acronkright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/acronkright/32/132469_2.png) [@acronkright](https://meta.discourse.org/u/acronkright)
#### Post date: [28. Februar 2019 um 10:51 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/3 "2019-02-28T10:51:55Z")

</div>

Hey Jay, thanks for your response!

I can change the notification email address in the ‘Settings’ within my Discourse Admin account as well, I assume this is the same?

So it would have to be something like [admin@forum.democracyrd.org](mailto:admin@forum.democracyrd.org)? This seems strange given that the 30-min install guide states that you have to:

- Select a subdomain such as `discourse.example.com` or `talk.example.com` or `forum.example.com` for your Discourse instance.

- Add an email address for admin account(s) and provides these examples (which don’t use subdomains) `[me@example.com,you@example.com]`

I can give it a try but it is a bit of a hassle and given the above documentation it’s a little hard to believe that this is my problem and not something to do with firewalls, etc. (which I’m also troubleshooting with DO).

Any thoughts?  
Adam

---

<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: [28. Februar 2019 um 13:50 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/4 "2019-02-28T13:50:27Z")

</div>

The notification email address that you chose must be one that your mail server will accept and deliver mail for. The default is `noreply@your.discourse.domain`, but can be anything at all. The key is that your mail server is configured to use that address.

---

<div class="post-metadata">

### Author: ![acronkright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/acronkright/32/132469_2.png) [@acronkright](https://meta.discourse.org/u/acronkright)
#### Post date: [1. März 2019 um 17:03 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/5 "2019-03-01T17:03:37Z")

</div>

My mail server is configured to send and receive from both [admin@democracyrd.org](mailto:admin@democracyrd.org) and [system@democracyrd.org](mailto:system@democracyrd.org), and I have tested it outside of Discourse. I tried to setup the smtp email ass [system@democracyrd.org](mailto:system@democracyrd.org) and the admin email as [admin@democracyrd.org](mailto:admin@democracyrd.org), but when I test inside discourse I get the following error:

```
Testing sending to a *********@protonmail.com using system@democracyrd.org:O**************** A1@mail.democracyrd.org:465.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

Net::ReadTimeout

====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!

Please report the exact error message above to https://meta.discourse.org/
(And a solution, if you find one!)
=======================================================================================

```

---

<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: [1. März 2019 um 17:07 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/6 "2019-03-01T17:07:12Z")

</div>

> [@acronkright](#):
>
> This is not a common error. No recommended solution exists!

Well, that’s not quite true. This is a common error. Digital Ocean is blocking whatever port your mail server is on. Mail services like Mailgun accept SMTP traffic on port 2525, so when I do an install I always use port 2525. If you don’t have that option, you’ll need to contact Digital Ocean and ask them to not block that port.

---

<div class="post-metadata">

### Author: ![acronkright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/acronkright/32/132469_2.png) [@acronkright](https://meta.discourse.org/u/acronkright)
#### Post date: [1. März 2019 um 17:23 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/7 "2019-03-01T17:23:45Z")

</div>

As mentioned above, I tried port 2525, rebuilt, and still no luck. DO claimed that ports 24, 465, and 587 were blocked/filtered, but said it wasn’t on their end and suggested I edit iptables -nvL. I don’t really understand iptables -nvL, and I tried my best. No change. So I just went off on DO in an email requesting again that they unblock those ports. We’ll see if they help at all.

Their ‘1-click’ Discourse install has been a nightmare. SSH key didn’t work (permissions denied) and when I went to edit permissions through their consul I was asked for a password (which they never sent me because I was using an SSH key I had uploaded to my DO account)! I ended up destroying that droplet and starting over following the 30-min guide on Git. But problem persists. I don’t understand why DO would default to blocking SMTP ports on a ‘1-click’ Discourse install when Discourse can’t function without an outgoing SMTP email. That seems soooooo stupid to me. Anyways… done with my rant.

Appreciate you taking the time. Adam

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [1. März 2019 um 18:35 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/8 "2019-03-01T18:35:36Z")

</div>

> [@acronkright](#):
>
> My mail server is configured to send and receive from both [admin@democracyrd.org](mailto:admin@democracyrd.org) and [system@democracyrd.org](mailto:system@democracyrd.org), and I have tested it outside of Discourse.

How have you tested it? Can you reach port 465 on [mail.democracyrd.org](http://mail.democracyrd.org) from a shell on the droplet?

---

<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: [2. März 2019 um 02:41 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/9 "2019-03-02T02:41:22Z")

</div>

> [@acronkright](#):
>
> Their ‘1-click’ Discourse install has been a nightmare

You should follow [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) or [have me do it](https://www.literatecomputing.com/product/discourse-install/).

To check if you can access the port you

```
telnet hostname port

```

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2. März 2019 um 03:11 UTC](https://meta.discourse.org/t/digitalocean-siteground-email-wont-work/110187/10 "2019-03-02T03:11:12Z")

</div>

> [@pfaffman](#):
>
> You should follow [discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) or [have me do it](https://www.literatecomputing.com/product/discourse-install/).

This is crucial if we’re going to help you. We can’t support the 1-click install here, you would need to work with DigitalOcean if you wanted to continue to use that.
