Okay, a quick search for CNAME or SRV is what you need. Essentially you rely on DNS to provide the correct server to go to based on the port number. This is a “poor” mans proxy or load balancer because if you don’‘t use the domain name (as opposed to the ip address) then it doesn’'t work.
If you have access to your DNS then it can be done:
This is related to subdomains, but might be relevent if you use mail.subdomain.co.uk, etc.