I'd like to write a small program that determines the settings used on an email server. What I'd need to find out is what port is it using, does it require authentication and/or SSL for the incoming and outgoing emails. I'm envisioning a very small app or shell script where I enter smtp.mailserver.com and it returns port 587, SSL required, no authentication. Basically I end up helping a lot of people set up mail and being able to get this info live from the servers rather than googling or calling them would be a huge time saver. Is the above even possible assuming I don't have an account on the server and where would I begin?