summary refs log tree commit diff
path: root/synapse/config/registration.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-08-23 12:40:00 +0100
committerGitHub <noreply@github.com>2022-08-23 11:40:00 +0000
commit956e015413d3da417c1058e3e72d97b3d1bc8170 (patch)
tree931927e3736155ea068c38254726b6f03ed51c29 /synapse/config/registration.py
parentUpdate changelog (diff)
downloadsynapse-956e015413d3da417c1058e3e72d97b3d1bc8170.tar.xz
Drop support for delegating email validation, round 2 (#13596)
Diffstat (limited to 'synapse/config/registration.py')
-rw-r--r--synapse/config/registration.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 01fb0331bc..a888d976f2 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -13,7 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import argparse
-import logging
 from typing import Any, Optional
 
 from synapse.api.constants import RoomCreationPreset
@@ -21,15 +20,11 @@ from synapse.config._base import Config, ConfigError
 from synapse.types import JsonDict, RoomAlias, UserID
 from synapse.util.stringutils import random_string_with_symbols, strtobool
 
-logger = logging.getLogger(__name__)
-
-LEGACY_EMAIL_DELEGATE_WARNING = """\
-Delegation of email verification to an identity server is now deprecated. To
+NO_EMAIL_DELEGATE_ERROR = """\
+Delegation of email verification to an identity server is no longer supported. To
 continue to allow users to add email addresses to their accounts, and use them for
 password resets, configure Synapse with an SMTP server via the `email` setting, and
 remove `account_threepid_delegates.email`.
-
-This will be an error in a future version.
 """
 
 
@@ -64,9 +59,7 @@ class RegistrationConfig(Config):
 
         account_threepid_delegates = config.get("account_threepid_delegates") or {}
         if "email" in account_threepid_delegates:
-            logger.warning(LEGACY_EMAIL_DELEGATE_WARNING)
-
-        self.account_threepid_delegate_email = account_threepid_delegates.get("email")
+            raise ConfigError(NO_EMAIL_DELEGATE_ERROR)
         self.account_threepid_delegate_msisdn = account_threepid_delegates.get("msisdn")
         self.default_identity_server = config.get("default_identity_server")
         self.allow_guest_access = config.get("allow_guest_access", False)