What information do you have about the mail server? Are you able to log into it? This should provide you with the hostname, or you can use the
hostname command to get it when you are logged in. If that name doesn't correspond to the "real" hostname, then you can always look it up if you know the IP address of the server, by doing a domain name lookup on it (here is an example looking up 188.8.131.52):
$ nslookup 184.108.40.206
The netstat command provided above will tell you what ports the linux server is listening on, but the
-n tells it not to resolve IPs and Port names, and instead to display the raw numbers. If you leave off the
-n you'll see hostnames and port numbers, or you can just look for the ports that POP and IMAP use, 110 and 143 respectively. Of course it should be noted that those ports are not secure by default, and anything transmitted to them over the internet will be in the clear unless the email client is configured to do a TLS upgrade.
Hope some of that helps.