Help, do not send the email

Hello friends, good day.

First I want to clarify that I do not speak or write English. I speak and write Spanish. That’s why I’m using the google translator. Know apologize.

My experience is with shared hosting, use of emails with Gmail, that is, I have no experience in the use of this type of systems.

My problem is that I can not install the system. It is impossible to send the activation email.

I detail the steps and actions that I have carried out:

1 - I contracted the Digital Ocean service with the Discourse application installed.
2 - Active domain.
3 - Mailgun configuration. Creating subdomains to handle email.

Now I will try to explain step by step what I did:

1 - I get a Doplet in digitalocean with Ubuntu and discourse pre installed.

2 - The domain is configured with their respective dns provided by digitalocean.

3 - In mailgun I made the creation of the domain and two subdomains. In the Discourse installation I only use a single subdomain.

4 - Mailgun configuration was done with the dns in digitalocean.

5 - Each subdomain and domain is correctly active, according to mailgun.

6 - According to the guide on github and the discourse installation:

* Hostname for your Discourse? [discourse.example.com]:
      * ---- At this point can you place the root domain?
 * Email address for admin account (s)? [me @ example.com, you @ example.com]:
       * ----- In this section I put my email address, in this case gmail.
  • SMTP server address? [smtp.example.com]:
    SMTP port? [587]:
    SMTP user name? [user@example.com]:
    SMTP password? [pa $$ word]:
    Let’s Encrypt account email? (ENTER to skip) [me@example.com]:

  • ------ In these steps go the data provided by mailgun.

This is the true one:

DISCOURSE_HOSTNAME: ‘discourse.mecanicosargentinos.com

DISCOURSE_DEVELOPER_EMAILS: ‘xxxxxxxxx@gmail.com’

DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org # required
DISCOURSE_SMTP_PORT: 587 # (optional, default 587)
DISCOURSE_SMTP_USER_NAME: postmaster@discourse.mecanicosargentinos.com # required
DISCOURSE_SMTP_PASSWORD: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # required, WARNING the char ‘#’ in pw can cause problems!
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

Below is a subdomain log, keep in mind that the attempts are from Outlook.

7 - Following this guide:
https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/2

If I write this command

telnet smtp.mailgun.org 587

I get this result:

Captura2

There’s something I’m doing wrong. Can you help me? Thank you so much!!!

You have bounce rate 25% in your mailgun. It stops sending mail if bounce rate is above 5%. Contact mailgun support.

You might also try using port 2525. Digital ocean sometimes silently filters outgoing smtp traffic. I always often on port 2525.

@pfaffman You say open port 2525, it has nothing to do with port 587 where SMTP works? Sorry if it’s a very basic question.

Digital ocean sometimes filters outgoing smtp traffic.that method your server from being able to send spam (or any mail). Mailgun allows incoming mail to port 2525 to get around this.

Change 587 to 2525 in your discourse settings.

2 Likes

SMTP PORT 587 works ok with mailgun, no need to change it.

1 Like

It’s not mailgun that’s the issue. This server can’t connect to port 587 to any computer in the world. There could be some other problem, but I’m pretty sure this week fix it.

A test would be to see if you can telnet to a Gmail smtp server and have it also time out.

2 Likes

There’s one of two problems here:

  1. mailgun is dropping your incoming connection attempts to their port 587 (we don’t know if they ever do this)
  2. Digital Ocean is dropping your outgoing connections to port 587 (we KNOW this happens)

Given that we know that that (2) actually happens, it’s reasonable to assume it’s happening in this case and there are two ways to solve it:

  1. Contact Digital Ocean and ask them to remove the outbound port 587 block
  2. Switch to using port 2525 as @pfaffman suggests - Mailgun accepts mail on port 2525 for exactly this reason.
4 Likes

Captura3

What is skip reason at /admin/email/skipped

1 Like

Not 25, but 2525.

@ankur he can’t even connect to the mailserver

2 Likes

Should this be working? Ehído the installation again and does not send anything. Will it be that I have to perform an installation from scratch? and not doing ./launcher Rebuild App

Captura4

I was lucky, I only had to forward the email, it does not always work in the port by default. It worked for me with port 2525.
Great community, thank you very much! I am very grateful!

6 Likes