Teste de e-mail passou, mas não envia outros e-mails

For some background information, I am running the latest nightly version Discourse in Windows WSL and self-hosted an mail server with Stalwart. I have tested my mail service through Thunderbird and other email clients, all things worked correctly.

Some days ago, I created a new email user, then made it used by Discourse. When I clicked Send test email in Discourse admin menu to send test mails to all of my own email accounts (gmail.com, qq.com, 163.com, etc.), all of them received test mails. But when I was trying to register an account, all my emails could not receive registration mail and other messages except test mail, I could not see any mails sent except test_message in Email Logs, and in Stalwart, I also could not see other mails’ logs except test mails.

I was stuck here for several days and have no any more ideas, so creating a topic here.

Here are my configurations:

SMTP server domain: mail.example.com
SMTP port: 465
SMTP force TLS: true
SMTP auto STARTTLS: true
Email domain: example.com
Email username: notice@example.com
Notification email: notice@example.com

I have followed this post, entering notice@example.com in notification_email in discourse.conf, then trying running rake emails:test[my_email@gmail.com]. Okay, I received a test message, but Discourse itself still did not send emails.

I kind of expected some other smarter folks to jump in and help you but anyhow… in the mean time, have you try sending the new user a test email using the interface in discourse admin section as below?

Also check the email logs as below

all available via the left side menu as below

hope it helps a little until better help arrives

I’ve solved this. I am using Puma to run Discourse, but official puma.rb was never updated following unicorn.conf.rb (so my Sidekiq was not running at all). I use ChatGPT to do some convertions to make it aligned to Unicorn’s.

1 curtida