You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow blocking some email domains from registering an account (#14667)
Gitea allows to whitelist email domains so that only email addresses from certain domains are allowed to register an account, but does not currently allows to do the opposite: blacklisting email domains so that addresses from certain domains are *forbidden* to register an account.
The idea has been briefly mentioned in the discussion about issue #6350, but never implemented. This PR does that.
The rationale is that, in my experience of running a Gitea instance, *a single email domain* is responsible for *most* of the spam accounts, and for *all* of the spam accounts that manage to get past the email confirmation step. So on top of the other spam mitigation measures already available (email confirmation, CAPTCHA, etc.), having the option to block a particularly annoying domain would be helpful.
close#13628
Copy file name to clipboardExpand all lines: docs/content/doc/help/faq.en-us.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -120,13 +120,14 @@ For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api
120
120
121
121
There are multiple things you can combine to prevent spammers.
122
122
123
-
1. By only whitelisting certain domains with OpenID (see below)
124
-
2. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
125
-
3. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/usage/command-line.en-us.md" >}}), [API]({{< relref "doc/developers/api-usage.en-us.md" >}}), or Gitea's Admin UI
123
+
1. By whitelisting or blocklisting certain email domains
124
+
2. By only whitelisting certain domains with OpenID (see below)
125
+
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
126
+
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/usage/command-line.en-us.md" >}}), [API]({{< relref "doc/developers/api-usage.en-us.md" >}}), or Gitea's Admin UI
126
127
127
-
### Only allow certain email domains
128
+
### Only allow/block certain email domains
128
129
129
-
You can configure `EMAIL_DOMAIN_WHITELIST` in your app.ini under `[service]`
130
+
You can configure `EMAIL_DOMAIN_WHITELIST`or `EMAIL_DOMAIN_BLOCKLIST`in your app.ini under `[service]`
0 commit comments