// https://www.rfc-editor.org/rfc/rfc7208#section-7.1 export function validateSpfDomain(domain) { return domain .split(".") .every(segment => segment.match(/^([^%]|%_|%%|%-|%\{[slodiphcrtv]\d*r?[-.+,\/_=]*})+$/)); }