Activation email not being delivered, test email working

Hi,

I’m having a problem with the activation mail. It is being sent from what i can see in the logs, however I’m not receiving anything. When I use the discourse doctor Im receiving the mail just fine.
Is there a difference between the two?

To add to the confusion, last week I was receiving the activation mail, but because DNS propogation was not working, the activation button could not be pressed. This has since been fixed. However no other changes were made, but the added A-record to point to the IP, so I’m confused as to what changed so that email is no longer being delivered?

1 Like

Check your mail provider logs, do they show the email as traversing their system?

Have you checked junk mail?

2 Likes

Not sure i have acces to email provider logs, I’ve used Microsoft365 Enterprise for email so far (I know it’s not optimal, and we are planning on changing it). But i do not have admin acces, which i think is required to find the logs? I can’t find any from my acces point atleast.

Nothing in Junk.

Tried looking at the production log again, does this look correct to you?:

Processing by FinishInstallationController#register as HTML
Parameters: {“utf8”=>“✓”, “authenticity_token”=>"***==", “email”=>“my@email”, “username”=>“PappaK”, “password”=>"[FILTERED]", “commit”=>“Register”}
Redirected to mydomain. com
Completed 302 Found in 24ms (ActiveRecord: 0.0ms | Allocations: 4888)
Started GET “/finish-installation/confirm-email” for IP at 2020-09-21 05:37:43 +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: 1.0ms | Allocations: 388)
Rendered layouts/_head.html.erb (Duration: 13.4ms | Allocations: 2930)
Completed 200 OK in 18ms (Views: 16.5ms | ActiveRecord: 0.0ms | Allocations: 4738)

Seems odd that there isn’t a confirm that email has been sent like from the email test:

Delivered mail my@email. com (682.5ms)

Removed som identifying details from the logs.

Just tried using mail-tester with the Discours-doctor test and it failed aswell it did however establish SMTP connection first:

SMTP server connection successful.
Sending to test-2g0mti7f5@srv1.mail-tester.com. . .
Sending mail failed.

Using the Discourse-doctor test for my company mail still works just fine - using my personal mail it says it was accepted by the SMTP server but I’m not recieving the mail.

Did you check the spam folder?

Yes, not receiving anything in spam in any mailbox.

Is the O365 account authorized to send email using the address that you’ve configured for Discourse?

1 Like

Followed the advice from this thread:


Added the connector and used the MX-adress given from O365 admin site.

I decided to rebuild the entire Droplet (from DigitalOcean) after having rebuild the app, to see if that would help. And it did! I now have the forum running and could receive the activation email on my admin account.
However i still can’t receive email when i try to create an account with my personal gmail, I’m getting the following error message in the ‘skipped’ section under email settings in the forum admin page:
5…4 TenantAttribution; Relay Access Denied [HE…-eur04.prod.protection.outlook.com]

Looks like this might be the solution:


But i haven’t tried it yet. I will update once i have time to implement the change from the link.

Quick sidenote - will rebuilding the app mess with any settings i made after activation my admin account?

By default discourse will send from noreply@discourse.domain.com A common problem is that your mail host insists that you send from domain.com. Troubleshooting email on a new Discourse install describes how to change it.

3 Likes