セルフホストサイトでメールによる返信を可能にするために、discourse mail-receiver をインストールしました。ログに以下の非推奨警告が表示されます。
Deprecation notice: warning: the email parameter is deprecated. all POST requests to this route should be sent with a base64 strict encoded email_encoded parameter instead. email has been received and is queued for processing (removal in Discourse 3.3.0)
At /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/basic_implicit_render.rb:8:in `send_action`
最新の Discourse 3.5.0.beta3-dev を実行しているため、非推奨バージョンは間違っていますが、いつでも壊れる可能性があるようで不安です。
ソースコードでの非推奨はこちら です。
そして、base64 エンコーディングを使用するように mail-receiver で変更する必要がある行はこちら です。PR を希望される場合はお知らせください。
one1
2026 年 8 月 10 日午後 3:16
2
[注: ask.discourse.org にトラブルシューティングの会話に基づいてこの投稿を作成するように依頼しました。]
セルフホスト型サイトにおける「mail-receiver の ‘email’ パラメータに関する非推奨警告 」の問題を調査しており、修正版のリリースに役立てばと思い、確認した内容を共有します。
症状
mail-receiver 経由で受信されるすべてのメールについて、ログに以下が出力されます。
DEPRECATION NOTICE: warning: the email parameter is deprecated. all POST requests to this route should be sent with a base64 strict encoded email_encoded parameter instead. email has been received and is queued for processing (removal in Discourse 3.3.0)
At /var/www/discourse/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.5.1/lib/action_controller/metal/basic_implicit_render.rb:8:in `ActionController::BasicImplicitRender#send_action`
私のサーバーで確認した事項
/var/discourse/containers/mail-receiver.yml に base_image: discourse/mail-receiver:release が設定されているため、古いバージョンに固定されているのではなく、release ブランチを実行しています。
docker ps の出力に、標準のアプリコンテナと並んで local_discourse/mail-receiver が実行されていることが表示されます。
docker image inspect local_discourse/mail-receiver --format '{{.Created}}' → 2026-08-08T08:41:54Z — 数日前に ./launcher rebuild mail-receiver で新しく再構築されました。
release での新規再構築後も、非推奨警告は残っています 。
結論
この警告は、mail-receiver の現在の最新リリース 自体から発生しており、エンドポイントが現在期待している base64 厳密エンコードされた email_encoded パラメータではなく、非推奨の email パラメータの下に生のメールを送信しています。私が把握している限り、実行中の release イメージにはこの問題を解決するものが含まれていません。
これは非推奨警告(エラーではありません)であり、メールは通常通りキューに積まれて処理されているため、サイトは破損していません。ただし、この警告が消えるように mail-receiver のコードを更新してほしいと考えています。問題の行は discourse_mail_receiver.rb にあり、email_encoded ではなく email パラメータを投稿しています。
mail-receiver の release イメージにこの修正を組み込む予定のタイムラインはありますか?
「いいね!」 1
Ethsim2
(Ethan )
2026 年 8 月 11 日午後 1:32
3
更新:この件についてPRを作成しました:
main ← Ethsim12:fix-email-encoded
merged 01:09PM - 11 Aug 26 UTC
## What does this change?
Updates mail-receiver to send incoming MIME messages … using the
`email_encoded` parameter expected by Discourse's `/admin/email/handle_mail`
endpoint.
The message is encoded with `Base64.strict_encode64` before being added to
the form data.
This removes use of the deprecated raw `email` parameter.
## Why?
Discourse currently logs a deprecation notice for every incoming email sent
by mail-receiver:
> the email parameter is deprecated. all POST requests to this route should
> be sent with a base64 strict encoded email_encoded parameter instead
A freshly rebuilt `discourse/mail-receiver:release` still reproduces the
warning because the current mail-receiver code continues to send `email`.
## Tests
Adds regression coverage which verifies that:
- the deprecated `email` parameter is not sent
- `email_encoded` is sent
- the encoded value represents the original MIME message
Tested locally with Ruby 3.2.11:
- `bundle exec rake test` — 16 examples, 0 failures
- `bundle exec rubocop` — no offenses
- `bundle exec stree check ...` — all files matched expected format
This is related to #13, which proposed the same API migration in 2023.
This PR refreshes that change against current `main` and adds regression
coverage.
mail-receiverは、非推奨のemailパラメータを使用して生メッセージを投稿し続けていました。このPRでは、Discourseの/admin/email/handle_mailエンドポイントの要求に応じて、代わりにemail_encoded: Base64.strict_encode64(...)を使用してメッセージを送信するように変更しています。
また、email_encodedが送信され、非推奨のemailパラメータがもはや使用されていないことを確認するリグレッションテストも追加しました。
mail-receiverのテストスイートとフォーマット/リンチチェックはローカルでパスしました。