Skip to content

Instantly share code, notes, and snippets.

@oviniciusfeitosa
Created October 30, 2017 17:13
Show Gist options
  • Save oviniciusfeitosa/546ea7d837dcd7e2a5e8c559d85fe08e to your computer and use it in GitHub Desktop.
Save oviniciusfeitosa/546ea7d837dcd7e2a5e8c559d85fe08e to your computer and use it in GitHub Desktop.
check smtp port
Type the following command:
telnet example.com 25
If Port 25 is not blocked, you will get a successful 220 response (text may vary).
Trying 64.13.192.208...
Connected to example.com.
Escape character is '^]'.
220 cl34.gs01.gridserver.com ESMTP Exim 4.63 Tue, 24 Jun 2008 13:45:04 -0700
If Port 25 is blocked, you will get a connection error or no response at all.
Trying 64.13.192.208...
telnet: connect to address 64.13.192.208: Connection refused
telnet: Unable to connect to remote host
TIP:
You can use this same technique to check if Port 587 is blocked as well. Just use the following command:
telnet example.com 587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment