MailSafeSegment
function MailSafeSegment(const aName: string; out aSegment: string): Boolean;
THE ALLOWLIST for any name that becomes a path segment. Letters, digits, dot, underscore and hyphen; no leading dot; bounded length; and no name a Windows filesystem reserves. False means it does not get a directory - there is no escaping or mangling fallback, because a mangling that is wrong once is a path traversal.