How to find hostname to POP or IMAP request

Hi,
How can I capture the hostname address from a POP or IMAP request?
I want to go to haproxy with email address. I want it to direct me to the relevant backend according to haproxy mapping.
I go to port 110 with name@mydomain.net.

I was able to map for http in the settings below. The hostname can be captured from the request from the subdomain.

/etc/haproxy/haproxy.cfg
frontend ft_pop_map
bind *:110
log 127.0.0.1 local6 info
mode tcp
option tcplog
use_backend %[req.hdr(host),lower,map_dom(/etc/haproxy/maps/pop.map,be_default)]

backend bk_mail1_pop_map
log 127.0.0.1 local1 info
mode tcp
option tcplog
balance roundrobin
server s1 192.168.1.6:110 check

backend bk_mail2_pop_map
log 127.0.0.1 local1 info
mode tcp
option tcplog
balance roundrobin
server s1 192.168.1.7:110 check

/etc/haproxy/maps/pop.map
#domainname backendname
mydomain.net bk_mail1_pop_map
otherdomain.xyz bk_mail2_pop_map

This will never work for the reason mentioned in this thread: