diff --git a/locales/en.json b/locales/en.json index d2117b7d0..8fe555744 100644 --- a/locales/en.json +++ b/locales/en.json @@ -223,6 +223,7 @@ "diagnosis_unknown_categories": "The following categories are unknown: {categories}", "diagnosis_never_ran_yet": "It looks like this server was setup recently and there's no diagnosis report to show yet. You should start by running a full diagnosis, either from the webadmin or using 'yunohost diagnosis run' from the command line.", "domain_cannot_remove_main": "You cannot remove '{domain:s}' since it's the main domain, you first need to set another domain as the main domain using 'yunohost domain main-domain -n '; here is the list of candidate domains: {other_domains:s}", + "domain_cannot_add_xmpp_upload": "You cannot add domains starting with 'xmpp-upload.'. This kind of name is reserved for the XMPP upload feature integrated in YunoHost.", "domain_cannot_remove_main_add_new_one": "You cannot remove '{domain:s}' since it's the main domain and your only domain, you need to first add another domain using 'yunohost domain add ', then set is as the main domain using 'yunohost domain main-domain -n ' and then you can remove the domain '{domain:s}' using 'yunohost domain remove {domain:s}'.'", "domain_cert_gen_failed": "Could not generate certificate", "domain_created": "Domain created", diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index 5037e9334..eb84f27d0 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -79,6 +79,9 @@ def domain_add(operation_logger, domain, dyndns=False): from yunohost.app import app_ssowatconf from yunohost.utils.ldap import _get_ldap_interface + if domain.startswith("xmpp-upload."): + raise YunohostError("domain_cannot_add_xmpp_upload") + ldap = _get_ldap_interface() try: