If your Exchange server’s IMAP or POP3 protocol are enabled and the service is running, yet the IMAP banner only works when a connection is run from the localhost and not from the network, it’s possible that the PROXY service is the cause.
This is assuming that the usual suspects have been eliminated, i.e. the firewall, AV or IDS services, etc.
Run the following command from an elevated Exchange Powershell:
Set-ServerComponentState -Identity $connectedfqdn -State Active -Requester HealthAPI -Component ImapProxy
Then retry the IMAP/POP3 service.