DiscourseをUbuntu 18.04 LTSのAWS Lightsailにインストールしました。Zohoのメール認証はDiscourseで動作しませんが、Mailgunの認証は問題なく動作しています。この問題を解決するお手伝いをください。
サーバーからメール生成や関連するログを取得するにはどうすればよいですか?
DiscourseをUbuntu 18.04 LTSのAWS Lightsailにインストールしました。Zohoのメール認証はDiscourseで動作しませんが、Mailgunの認証は問題なく動作しています。この問題を解決するお手伝いをください。
サーバーからメール生成や関連するログを取得するにはどうすればよいですか?
hey @iackrishitech、meta へようこそ。
app.yml ファイルにある SMTP 設定(パスワードは削除してください)を共有いただけますか?
メールアカウントのいずれかで二段階認証(2FA)を有効にしていますか?
もしそうであれば、Discourse用にアプリパスワードを作成しましたか?
@iackrishitech のリーダーです。ここにいくつか情報を追加させてください。2FA は有効になっていません。それは確実です。なぜなら、別のウェブサーバー用に別の Zoho SMTP 設定(別の Zoho メール)も持っており、そちらはこれまで問題なく動作しているからです。
このサーバーを設定した @iackrishitech に、アプリパスワードについて回答してもらいます。
管理パネルでメールジョブが失敗しているのを確認しました。Sidekiq を確認すると、以下のようになります。
以下は、私が取得できたバックトレースです(新規ユーザーのためファイルを添付できませんでした)。
Message
Job exception: end of file reached
Backtrace
/usr/local/lib/ruby/2.6.0/net/protocol.rb:225:in `rbuf_fill'
/usr/local/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/usr/local/lib/ruby/2.6.0/net/protocol.rb:201:in `readline'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:950:in `recv_response'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:935:in `block in getok'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:960:in `critical'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:933:in `getok'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:919:in `quit'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:612:in `do_finish'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:521:in `ensure in start'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:521:in `start'
mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
mail-2.7.1/lib/mail/message.rb:2159:in `do_delivery'
mail-2.7.1/lib/mail/message.rb:260:in `block in deliver'
actionmailer-6.0.3.3/lib/action_mailer/base.rb:589:in `block in deliver_mail'
activesupport-6.0.3.3/lib/active_support/notifications.rb:180:in `block in instrument'
activesupport-6.0.3.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport-6.0.3.3/lib/active_support/notifications.rb:180:in `instrument'
actionmailer-6.0.3.3/lib/action_mailer/base.rb:587:in `deliver_mail'
mail-2.7.1/lib/mail/message.rb:260:in `deliver'
actionmailer-6.0.3.3/lib/action_mailer/message_delivery.rb:115:in `block in deliver_now'
actionmailer-6.0.3.3/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
actionmailer-6.0.3.3/lib/action_mailer/message_delivery.rb:114:in `deliver_now'
/var/www/discourse/lib/email/sender.rb:226:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:61:in `execute'
/var/www/discourse/app/jobs/regular/critical_user_email.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
rails_multisite-2.4.0/lib/rails_multisite/connection_management.rb:76:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'
/var/www/discourse/app/jobs/base.rb:217:in `each'
/var/www/discourse/app/jobs/base.rb:217:in `perform'
sidekiq-6.1.2/lib/sidekiq/processor.rb:196:in `execute_job'
sidekiq-6.1.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:138:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:143:in `invoke'
sidekiq-6.1.2/lib/sidekiq/processor.rb:163:in `block in process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:111:in `local'
sidekiq-6.1.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq.rb:38:in `block in <module:Sidekiq>'
sidekiq-6.1.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:257:in `stats'
sidekiq-6.1.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:13:in `call'
sidekiq-6.1.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:78:in `global'
sidekiq-6.1.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
sidekiq-6.1.2/lib/sidekiq/logger.rb:10:in `with'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:33:in `prepare'
sidekiq-6.1.2/lib/sidekiq/processor.rb:123:in `dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:162:in `process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:78:in `process_one'
sidekiq-6.1.2/lib/sidekiq/processor.rb:68:in `run'
sidekiq-6.1.2/lib/sidekiq/util.rb:15:in `watchdog'
sidekiq-6.1.2/lib/sidekiq/util.rb:24:in `block in safe_thread'
これは私たちにとって非常に深刻なブロック要因ですので、ご協力をお願いします(新規ユーザーの制限により、さらにスクリーンショットを追加できませんでした。これが参考になれば幸いです)。
Gavin、返信ありがとうございます。
このアカウントでは2段階認証(2FA)が有効化されていません。ただし、アカウント用にアプリパスワードを作成し、app.yml に同じものを適用して再ビルドを試みました。それでもメールは受信できていません。
SMTP 認証に関する正確なログはどこで確認できますか?
Zoho でのメール認証が成功しているかどうかをどのように確認すればよいでしょうか?
Zoho サポートチームにログなどの情報を提供して調査を依頼する場合、どのような情報を提供すればよいでしょうか?
よろしくお願いいたします、
Kumar P
こんにちは、Gavin さん、
以下の変更を行いました。
- exec: rails r “SiteSetting.notification_email=‘forum@iackrishitech.com’”
これでメール機能が正常に動作するようになりました。
Zoho でのアプリパスワードについてご指摘いただき、ありがとうございます。
@Paari_Vendhan さん、詳細を共有いただき、心より感謝申し上げます。
よろしくお願いいたします、
Kumar P
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.