Stuck at activating Admin account (mail not received)

Hi there,

So I have installed discourse on my VPS with success, however now I am stuck with finalizing the registration of the Admin account. Here is my app.yml settings for SMTP

DISCOURSE_SMTP_ADDRESS: smtp.yandex.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: *******@yandex.com
DISCOURSE_SMTP_PASSWORD: ***********
DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

telnet smtp.yandex.com 587 give me positive feedback with successful connection.

And here the log from discourse that the mail delivered, nothing failed but still the email is not received (supposed to receive an email in mailbox from yandex.com)

Completed 302 Found in 556ms (ActiveRecord: 0.0ms | Allocations: 141429)
Started GET “/finish-installation/confirm-email” for ***** at 2020-02-20 02:35:45 +0000
Processing by FinishInstallationController#confirm_email as HTML
Rendering finish_installation/confirm_email.html.erb within layouts/finish_installation
Rendered finish_installation/confirm_email.html.erb within layouts/finish_installation (Duration: 20.7ms | Allocations: 3146)
Rendered layouts/_head.html.erb (Duration: 27.7ms | Allocations: 3197)
Completed 200 OK in 69ms (Views: 63.9ms | ActiveRecord: 0.0ms | Allocations: 10086)
Rendering layouts/email_template.html.erb
Rendered layouts/email_template.html.erb (Duration: 2.8ms | Allocations: 387)
Delivered mail db02ab84-eebf-4b72-abb7-b7c5c054757d@*****.net (646.7ms)

Anyone can tell me what can I do next as I don’t have any ideas anymore how to solve this.

1 Like

Have you read this thread?

3 Likes

I’d assume it’s a bad notification email address. Check in Your admin to see if the notification address is correct.

1 Like

Hi Smrtey, Yes I read it through yesterday and that’s why I come here as I believe I did everything according to the thread. Just to be clear here, I did put my email and password in the DISCOURSE_SMTP_USER_NAME and PASSWORD field. Only for the sake of this case I have removed them and put something else (data protection sorry).

So I believe I did everything correctly. I have adjusted the values into stars to not bring confusion.

Hey Bhanu, I am sorry, I am new. Could you please specify where is that notification email address?

You need to edit app.yml by hand. There is a commented out line near the bottom that will let you change the notification email address.

Hi Jay.

Are you referring to this line?

## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

Just a question, what email should I put here exactly? Sam as what I set up here DISCOURSE_SMTP_USER_NAME: ?

It needs to be an address that your mail server will deliver mail from.

If I understand correctly (since Im using Yandex Connect), it would be something like for example “noreply@mydomain.com”) ?

Or can you please give me and example from Yandex or similar from MailGun? perhaps then I would understand. Thank you

I can’t guess how your mail server is configured. When I configure mailgun it’s for the forum hostname, so the default works.

You’ll need to either try some stuff or ask your provider for help.

I have an account in MailGun as well, which part of the settings in MailGun should I add into the notification line in app.yml? I just need an example to understand or at least the part where from MailGun is that “mail server” you mentioned above.

Now yandex appears as my entire website when I put my domain name in the URL bar of a browser. Im lost. xD

Your connection is not private

Attackers might be trying to steal your information from mydomain.net (for example, passwords, messages, or credit cards). Learn more

NET::ERR_CERT_COMMON_NAME_INVALID

Back to safetyHide advanced

This server could not prove that it is mydomain.net ; its security certificate is from mail.yandex.ru . This may be caused by a misconfiguration or an attacker intercepting your connection.

All I did was set up SMTP on my VPS provider and SMTP credentials on app.yml. I can’t figure out why instead of Discord forum, yandex.ru website is showing as my website. Discourse forum page to finish admin setup is gone ;/.

I disabled nginx but my website is still up which is strange.

Okay I fixed that one by removing everything from my VPS provider, which is strange cause after that I received the admin link verification from SMTP email.

Now Im facing this problem that I have installed SSL certification but when I enter my website it says that my website is not secure

sssl_notsecure

My nginx conf file

server {
    if ($host = www.[mydomaine].net) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80; listen [::]:80;
    server_name [mydomain].net www.[mydomain].net;  # <-- change this

    return 301 https://$host$request_uri;


}

server {
    listen 443 ssl http2;  listen [::]:443 ssl http2;
    server_name [mydomain].net www.[mydomain].net;  # <-- change this
    #root /var/www/[mydomain];
    include /etc/nginx/snippets/ssl.conf;
    ssl on;
    ssl_certificate /etc/letsencrypt/live/mydomain.net/fullchain.pem; # manage                                     d by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mydomain.net/privkey.pem; # mana                                     ged by Certbot

    http2_idle_timeout 5m; # up from 3m default

    location / {
        proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:                                     ;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Real-IP $remote_addr;
    }


}

Anyone can tell me what’s wrong? I can’t figure it out. I substitute my real domain name with “mydomain” just for the purpose to paste my code here.

Anyway can assist ? :cry: