FEATURE: Add email blocking using regex (PR #14481)

blocked_email_pattern site setting can block email matching a regular expression.

GitHub

Do we need these two methods? Or would just one be enough?

One accepts a regular expression and the other one accepts a list of domains and converts it to a regular expression. I’d say yes, because the alternative is to convert it to regular expression before calling the method.

There is another better implementation for the same problem FEATURE: Add email normalization rules setting by nbianca · Pull Request #14593 · discourse/discourse · GitHub.