SSOで特定のアカウントのメールを一時的に停止する方法は?

SSO のドキュメントでは、SSO プロバイダー側で事前にメールの検証を行うべきであり、それ以外の方法は推奨されていないと明確に示されています。これは理にかなっています。

ただし、その検証状態は後から変化する可能性があります。例えば、SSO プロバイダーがそのユーザー宛てに送信したメールでハードバウンスが頻発したり、FBL(フィードバックループ)が発生したりした場合などが考えられます。SSO 環境において、Discourse が特定のユーザーのメールアドレスへのメール送信を一時的に停止するためのベストプラクティスは何かご教示ください。

アカウントのすべてのメール関連設定を「メール送信しない」に設定することでメール送信を停止するという提案も見かけましたが、それは恒久的なものか、あるいは元に戻すのが難しいものです。SSO プロバイダーが再度検証するまでの一時的な解決策を探しています。

Discourse には、メールのバウンス数が一定の閾値を超えるとメール送信を停止する仕組みがありますが、このデータを操作してメール送信を停止させることは可能でしょうか?API を確認しましたが、該当する変更方法は見つかりませんでした。もしかしたら見落としているかもしれません。

要するに、特定の SSO アカウントからのメール送信を停止するにはどうすればよいでしょうか?

もしすでにどこかで回答されているのであればお詫び申し上げますが、見つからなかったため質問いたしました。

「いいね!」 3

We don’t have a direct API for setting bounce score, I guess that is what you would want to do here. I am open to a PR that adds support so admins can manually set bounce score for a user to an arbitrary value.

There may be other reasons to stop emails for a specific account other than email bounces: email feedback loops, legal requests in the context of GDPR to not use that private data (temporarily); there may be other legal/business reasons for the SSO provider to need this.

I mentioned fiddling with the bounce score because it could be way to achieve this, although it is maybe a bit of a workaround. If nothing else, I would use that.

But if that’s not already made available, would it make sense to consider, instead, having a user field to globally enable/disable all emails for an account, that could be controlled not just via the API but maybe by staff too? I don’t know if this would imply a too large change or if there’s a central place where this could be checked on the code, however, I think this could be a more generic approach that could be used in more use cases than the bounce score route to stop emails for an account.