SMTP stands for Simple Mail Transfer Protocol. SMTP is a set of communication guidelines that allow the software to transmit electronic mail over the internet is called Simple Mail Transfer Protocol. It is a program used for sending messages to other computer users based on email addresses.

IMAP and POP3 are other protocols used for email transmission, but email clients mainly use them, whereas SMTP is used for email servers.


So let's see, What is SMTP(Simple Mail Transfer Protocol)?


SMTP or Simple Mail Transfer Protocol is a mail transfer protocol used to transfer email between servers in a simple text-based mechanism. Email servers and some email clients use SMTP for email transfer and communication.

SMTP Ports

Ports 25, 465, 587, or 2525 for SMTP have all been considered standard SMTP ports at some point, but only 587 or 2525 really should be regarded for everyday use.



SMTP  Ports 25

SMTP port 25 was the first official port and continues to be used primarily for SMTP relaying. SMTP relaying is the transmission of email from email server to email server. In most cases, modern SMTP email clients (Microsoft Outlook, Mail, Thunderbird, etc.)

As an old, popular, and well-known port, Port 25 is abused widely. Some ISP, Network, and Cloud providers automatically or by default block the TCP 25 SMTP port to prevent abuses and security attacks.


SMTP Port 587

Port 587 is another SMTP submission port supported by the vast majority of servers and will reduce the rate of rejected messages. If you do not know the default port of the remote email server, the best choice to start for submission using the SMTP port 587. It also provides a secure email submission by using TLS encryption.


SMTP Port 465

 Port 465 is for SMTPS. SSL encryption is started automatically before any SMTP level communication. SMTP port was the first secure and encrypted email submission port which is using SMTP over SSL methodology.


SMTP Port 2525

SMTP Port 2525 is used for the secure submission of emails for delivery by modern ESPs. Port 2525 is an alternate port, which mirrors port 587, in the case the other mentioned ports blocked. This port is not endorsed by the IETF nor IANA.


How can you find out what your SMTP port is?


The configuration files can be found in /etc/pmta/config on a Linux server and C:\pmta\config. that on Windows Server.

smtp-listener # listens on port 587 and IP


We can use telnet to check the remote SMTP ports like 25, 587, 465, 2525 or another port. Telnet is a simple command-line tool that is used for remote shell connection and management.


For example, we will check the Gmail SMTP ports where the SMTP service is provided with the domain name.

$ telnet 25
$ telnet 587
$ telnet 465
$ telnet 2525 


SMTP Port Communication Example

SMTP is mainly a text-based protocol where management is done via text or ASCII command. When connected, an SMTP port commands like EHLO, STARTTLS, SIZE, etc can be used.


  • EHLO command is the reverse form of the helo and used to get command information about the SMTP server.
  • SIZE command is used to set the email message or data size we want to send.
  • STARTTLS command is used to start TLS encrypted secure communication. 250 – STARTTLS means the SMTP port can accept TLS connections.
$ telnet 587
Connected to
Escape character is '^]'.

500 5.5.2 Error: bad syntax
250-SIZE 50000000
250 DSN
220 2.0.0 Ready to start TLS


SMTP Port Security and SSL/TLS Connection

SMTP uses the SSL/TLS certificates to secure and encrypt SMTP connection. OpenSSL command provides the s_client command to test and connect remote SMTP service with an SSL/TLS connection. We will also provide the removed SMTP server domain name and port number like below using the -connect option. SSL/TLS encrypted SMTP connection is named as SMTPS.

$ openssl s_client -starttls smtp -crlf -connect




Popular Mail Service Providers SMTP Port Numbers

There is a lot of different email service and server providers which provides SMTP service via SMTP ports. Below you can find popular SMTP service providers SMTP port numbers.


SMTP Provider SMTP Server Address SMTP Ports
Google or Gmail 465, 87
Outlook 587
Office 365 587
Yahoo Mail 465
Yahoo Mail Plus 465
Yahoo UK 465
YahooGermany/Deutschland 465
Yahoo Austraila/NewZelland 465
O2 25
O2UK 25 587
AT&T 465
Hotmail 465
zoho Mail 465 587


Var dette svaret til hjelp? 0 brukere syntes dette svaret var til hjelp (0 Stemmer)