diff -r f65302ea37b0 util/jid.lua
--- a/util/jid.lua	Mon Jan 05 11:35:32 2026 +0000
+++ b/util/jid.lua	Wed Jan 07 16:21:19 2026 -0600
@@ -15,6 +15,7 @@
 local resourceprep = require "prosody.util.encodings".stringprep.resourceprep;
 local idna_to_ascii = require "prosody.util.encodings".idna.to_ascii;
 local net = require "prosody.util.net";
+local config_get = require "prosody.core.configmanager".get;
 
 local escapes = {
 	[" "] = "\\20"; ['"'] = "\\22";
@@ -63,7 +64,9 @@
 		end
 		host = nameprep(host, strict);
 		if host == nil then return; end
-		if not (valid_ip(host) or idna_to_ascii(host)) then return; end
+		if config_get("*", "validate_domainparts") ~= false then
+			if not (valid_ip(host) or idna_to_ascii(host)) then return; end
+		end
 		if node ~= nil then
 			node = nodeprep(node, strict);
 			if node == nil then return; end
