Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am getting a connection closed by foreign host error on port 465 but working fine for another port 993. What could be the issue.

% telnet x.x.x.x 465 Trying x.x.x.x... Connected to x.x.x.x Escape character is '^]'. Connection closed by foreign host.

share|improve this question

Port 465 is the SMTPS port, SMTP over SSL. As such, your probably want to use the openssl tool rather than telnet if you are trying to debug SMTP. This won't solve your original issue though, which is that the remote host is immediately disconnecting you. This may be due to it only allowing connections from certain addresses. The way this is implemented is to accept connections and then close them if they don't originate from an accepted IP address. I would need more details on the SMTP server you are using, and its configuration, to help you more than that.

To use openssl, try:

openssl s_client -connect
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.