バックアップ復元後、すべてのメールが無効になりましたか?

I wanted to do some testing with Discourse so I took a backup of my instance, wiped the DB (rm -fr /var/discourse/shared) and rebuilt the container.

I then created an admin user again and instead of following the setup wizard I went straight to admin, enabled restores, uploaded the backup and restored.

For whatever reason the outgoing email is disabled by an administrator message appeared.

I can confirm that the outgoing email was never disabled on the instance where the backup was made.

I did tick the option to enable readonly mode when performing backup operations.

Is this a bug or did I mess up somewhere?

「いいね!」 2

このメッセージは短時間だけ表示されるはずです。バックアップ作成時に送信メールが無効にされていない限り、復元が完了すると自動的に消えるはずです。もし通知が消えない場合は、ブラウザでページを更新してみてください。


これは #contribute:bug として残しておきます。現在、復元前に送信メールを無効にする方法があまりにも役立たないからです。Sidekiq は復元中に無効化されるため、その間は何も起こりません。また、復元処理は disable_email 設定の値を上書きしてしまいます。このバグを修正するには、復元後にサイト設定を変更する必要があります。

@eviltrout この変更は When restoring a backup, disable emails. · discourse/discourse@ccf9b70 · GitHub で追加されました。この件についてどうお考えですか?バグを修正すべきでしょうか、それともコードを削除すべきでしょうか?私の意見では、復元後にサイト設定を変更するのは非常に予期せぬ動作なので、削除に賛成です。さらに、この問題についてほぼ 3 年間誰も文句を言っていないのも事実です… :wink:

「いいね!」 3

I think the idea was that when a restore finishes the administrator might want to poke around and make sure everything is OK. Right now emails will start going out the second it finishes and the site might not be “approved.”

「いいね!」 4

So therefore this is not a bug @gerhard

Maybe Discourse should make it a bit more clear to the admin (e.g. entry inserted in the backup log panel). The site setting for disable_emails is set to no while the message renders and this is confusing (admin panel says disable emails is off while the message on the top of the screen still says its disabled)

Well, I consider it a bug when a line of code doesn’t do what it’s supposed to do. :wink: Anyway, it’s fixed: FIX: Outgoing emails were not disabled after restoring backup · discourse/discourse@dc961fe · GitHub

I made a small adjustment, because I think it’s better to disable outgoing emails only for non-staff users instead of all of them.

「いいね!」 7

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