Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepowershell
titleTest connection with curl (Unix, Windows)
# test plain text port
curl --ssl --url mail.example.com:25

# output returned
#   can indicate that the port is not available:
#     curl: (7) Failed to connect to mail.example.com port 25 after 2186 ms: Connection refused
#   can indicate that the port is available: 
#     220 mail.example.com ESMTP Postfix (Debian/GNU)
#     221 2.7.0 Error: I can break rules, too. Goodbye.

# test SMTP over SSL
curl --ssl --url mail.example.com:465
# output returned can indicate that the port is available:
#   curl: (56) Recv failure: Connection reset by peer

# test SMTP over TLS
curl --ssl --url mail.example.com:587
# output returned can indicate that the port is not available:
#   curl: (7) Failed connect to mail.example.com:587; Connection refused

...