新規インストールメールが機能しない「shadowed so this will be ignored」

完全な新規インストール後、メールが機能しなくなっています。以下のトラブルシューティングガイドのすべての手順に従いました here

Zoho メールを使用しています。
メール設定は非常にシンプルです:

 DISCOURSE_SMTP_ADDRESS: smtp.zoho.com
 DISCOURSE_SMTP_PORT: 587
 DISCOURSE_SMTP_USER_NAME: forum@blockchainofthings.com
 DISCOURSE_SMTP_PASSWORD: "redeacted"
 DISCOURSE_SMTP_ENABLE_START_TLS: true       # (オプション、デフォルトは true)
 DISCOURSE_SMTP_DOMAIN: blockchainofthings.com
 DISCOURSE_NOTIFICATION_EMAIL: sys@blockchainofthings.com

カスタムコマンドセクションからコメントを削除しました。

- exec: rails r "SiteSetting.notification_email='forum@blockchainofthings.com'"

Discourse がインストールされている EC2 インスタンスから SMTP サーバーへ telnet 接続は問題なく行えます。

./discourse-doctor を実行すると以下のようになります:

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [sys@blockchainofthings.com]: sue@rightclick.com
Sending mail to sue@rightclick.com. . . 
Testing sending to sue@rightclick.com using smtp.zoho.com:587, username:forum@blockchainofthings.com with plain auth.
SMTP server connection successful.
Sending to sue@rightclick.com. . . 
Sending mail failed.
end of file reached

ログには奇妙な記述があります:An attempt was to change notification_email SiteSetting to forum@blockchainofthings.com however it is shadowed so this will be ignored!(notification_email の SiteSetting を forum@blockchainofthings.com に変更しようとしたが、シャドウされているため無視されます)。これが問題の原因かもしれませんが、なぜそうなっているのか、またどのように修正すればよいのか確信が持てません。

ログの続きは以下の通りです:

An attempt was to change notification_email SiteSetting to forum@blockchainofthings.com however it is shadowed so this will be ignored!
Creating scope :open. Overwriting existing method Poll.open.
Started GET "/privacy" for 18.204.103.32 at 2021-09-15 20:22:27 +0000
Processing by StaticController#show as */*
 Parameters: {"id"="privacy"}
 Rendered static/show.html.erb within layouts/crawler (Duration: 7.7ms | Allocations: 963)
 Rendered layout layouts/crawler.html.erb (Duration: 41.8ms | Allocations: 8467)
Completed 200 OK in 114ms (Views: 45.2ms | ActiveRecord: 0.0ms | Allocations: 18560)
Started GET "/privacy" for 18.204.103.32 at 2021-09-15 20:22:27 +0000
Processing by StaticController#show as */*
 Parameters: {"id"="privacy"}
 Rendered static/show.html.erb within layouts/crawler (Duration: 5.2ms | Allocations: 931)
 Rendered layout layouts/crawler.html.erb (Duration: 26.5ms | Allocations: 6343)
Completed 200 OK in 59ms (Views: 30.1ms | ActiveRecord: 0.0ms | Allocations: 12955)
 Rendered layouts/email_template.html.erb (Duration: 0.8ms | Allocations: 273)
Delivered mail ac1148f5-a79f-4892-8982-8e6f512a3b04@forum.blockchainofthings.com (1462.1ms)
Job exception: end of file reached

Creating scope :open. Overwriting existing method Poll.open.
 Rendered layouts/email_template.html.erb (Duration: 2.1ms | Allocations: 487)
Delivered mail 5e74a41c-48ee-4e14-b669-091665840076@forum.blockchainofthings.com (544.7ms)

この新規インストールでの問題を解決する方法について、ご助力いただけますと幸いです。

app.yml で変更する必要があります。それが「shadowed(隠蔽されている)」という話の核心です。

 DISCOURSE_NOTIFICATION_EMAIL: sys@blockchainofthings.com

Zoho が forum@blockchainofthings.com からの送信を要求している場合、他のアドレスではなくこちらに変更する必要があります。その設定については app.yml を変更してください。(その設定については、再構築を行う代わりに ./launcher destroy app; ./launcher start app で済むと思いますが、今は完全に確信が持てません。コンテナ内の discourse.conf に記述する必要がある場合、その意味をすべて理解しているわけではない限り、再構築してしまった方が簡単でしょう)。

「end of file reached(ファイルの終端に到達しました)」というメッセージが何を意味し、何を示しているのかはわかりません。

Zoho とトランザクションメールについては存じ上げません。Reliable SMTP Relay & Transactional Email Sending API | Zoho ZeptoMail? のことをおっしゃっているのでしょうか?そうでないなら、かなり大変な目に遭うことになるでしょう。私がこれを入力している間に、Mailgun を設定して動作させることだってできていたはずです。

「いいね!」 2

ありがとうございます!以下のように変更したら、完璧に動作しました。

DISCOURSE_NOTIFICATION_EMAIL: forum@blockchainofthings.com
「いいね!」 2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.