Your Guide to SMTP

Simple Mail Transfer Protocol

What does SMTP mean?

A quick look at SMTP

When things happen on the Internet, they have to follow a set of rules. The Simple Mail Transfer Protocol (SMTP) is a standard way to send electronic mail (E-mail). Request For Comments (RFC) came up with the idea first. Request for Comments (RFCs) are a type of publication from the Internet Society (ISOC) and the Internet Engineering Task Force (IETF). These are the main groups that work on improving the Internet’s technology and setting its guidelines.

In simple terms, SMTP is the code that emails must follow in order to be sent over the Internet. SMTP can be thought of as a post office where people send email. The email is then delivered to the recipient’s local post office, which is another SMTP server.

History

A quick look at the past

In 1982, RFC 821 was the first to describe it. In 2008, RFC 5321 made the most recent changes. Extra SMTP, also called Enhanced SMTP (ESMTP), was added to the most recent version of SMTP. A list of protocol add-ons for the Simple Mail Transfer Protocol standard. In November 1995, the IETF published RFC 1869, which laid out the rules for the Extension format. This document sets the basic structure for all extensions, current and future.

Limitation

The Flaws

Email servers and other mail transfer agents send and receive emails using SMTP. However, most user mail clients only use SMTP to send messages to a mail server for relaying. And most user mail programs use either POP3 or IMAP to get messages back.

SMTP is only a delivery method. Other protocols, like the Post Office Protocol (POP) and the Internet Message Access Protocol (IMAP), are meant to help users get their messages and keep track of their mail boxes.

What You Need

Everything You Need to Set Up SMTP

Host Address

The server host address is needed to verify that the person or tool using your email address is who they say they are when they send emails.

Port Number

A port number tells the server which process to send an Internet or other network message to when it gets there.

Encryption

Email encryption is the process of encrypting emails so that only the people who are supposed to read them can read them.

Popular Smtp Configurations

Email Clients And Their Smtp Settings

Track & Schedule Unlimited Number Of Emails With Any Email Provider!

Port numbers and how they came to be

How the ports changed over time

When you talk to an operating system, a port is where the call ends. It tells you about a certain process or type of network service. An IP address and the type of protocol used for communication are always linked to a port. This completes the destination or source network address of a communication session.

A 16-bit number, called the port number, tells you which address and protocol a port is for. An address might say “protocol: TCP, IP address: 1.2.3.4, port number: 80,” which can be written as 1.2.3.4:80 if you know what protocol it is. A lot of the time, unique port numbers are used to find services.

And the SMTP method can be found by its four main port numbers. The numbers are 25, 465, 587, and 2525.

Port Number 25

  • For as long as SMTP has been used, Port 25 has been the standard way to send email over the Internet.
  • Even though it’s been more than 30 years, Port 25 is still the main way that email is sent between computers.
  • This is no longer the case, though. Because many ISPs and hosting companies block or limit SMTP connections on port 25, most SMTP apps don’t use it. This is done to stop spamming.

Port Number 465

  • After Port 25 The IANA set up 465 for SMTPS in 1997. In this case, SMTPS refers to an SMTP link that is protected by TLS and can be set up with STARTTLS.
  • It was first planned for SMTPS to “wrap” encryption and identification around SMTP. But this was taken away at the end of 1998 so that STARTTLS could be used instead of SMTP (RFC 3207). This port can be used with or without TLS if STARTTLS is set up.
  • For now, SMTPS and its use on Port 465 are just a blip in history.

Port Number 587

  • After Port 465 failed badly, R. Gellens and J. Klensin put in RFC 2476 in December 1998.
  • According to the RFC stated above, Port 587 is only used for sending emails. This port is being used as a usual way to send mail.
  • Email clients and servers should use this port when they want to send email and make sure it gets served correctly and without any problems.
  • When combined with TLS security, this port makes sure that the email is sent safely and in line with IETF rules. 

Port Number 2525

  • When all the other ports are closed or can’t do their job, port 2525 is used.
  • There is no legal reason to use port 2525 as a backup to SMTP port 25.
  • This can be used as a separate port for VPN clients or people whose ISP blocks port 25 and makes it impossible to send mail to a mail server outside of their ISP’s network.
  • Even though it’s not an official SMTP port and isn’t backed by either the IETF or the IANA, almost all ESPs let you use Port 2525.

SMTP Configurations with TLS/SSL

When configuring SMTP (Simple Mail Transfer Protocol) for secure email transmission, it’s essential to use encryption to protect your messages. Secure Sockets Layer (SSL) and its successor, Transport Layer Security (TLS), are critical for this purpose.

SMTP Configuration Steps:

  1. Choose the Right Port:
    • For SSL: Port 465 is commonly used.
    • For TLS: Port 587 is generally used.
  2. Enable Encryption:
    • SSL/TLS Settings: Ensure that your email client or server settings are configured to use SSL or TLS. This will typically involve selecting an option for secure connections in the SMTP settings.
  3. Update Server Settings:
    • Enter your SMTP server address and enable the SSL/TLS option.
    • Example SMTP server configurations might include settings like smtp.yourdomain.com with SSL/TLS enabled.
  4. Authenticate:
    • Provide the necessary authentication credentials (username and password) for your SMTP server.
  5. Verify Configuration:
    • Test your email setup to ensure that encryption is correctly applied and that emails are sent securely.

Using SSL/TLS in your SMTP configuration is vital for protecting email communications and maintaining data privacy.

What encryption is and why it's important?

Full Picture of SSL and TLS

Secure Sockets Layer, or SSL, is a type of encryption that makes it safe to send and receive messages over a computer network. Our old name for SSL is now Transport Layer Security. The main goal of the Transport Layer Security protocol is to protect privacy and the accuracy of data sent between two computer programs that are talking to each other.

There are two parts to the TLS protocol: the TLS record protocol and the TLS exchange protocol.

Protocol for TLS handshake

The record holds the handshake messaging protocol, which is a “control” protocol that is used to start the link.
During the TLS sharing of application data, this protocol is used to send all the information that both sides need. It says how messages should be written and how they should be sent.
When two computers connect securely, the Handshake Protocol handles setting up the cipher suite, making sure the server is real, and, if needed, exchanging information between the client and the session key.
These can be different depending on what the client and server need. In other words, there are different ways to set up the link.

TLS algorithm for records

The keys made during the Handshake are used by the Transport Layer Security (TLS) Record protocol to protect application data.
The Record Protocol is in charge of keeping application data safe and making sure that it is correct and comes from the right place.
It breaks up outgoing messages into pieces that are easier to handle and puts together received messages again.
It can optionally compact blocks that are sent out and decompress blocks that are received.
It adds a Message Authentication Code (MAC) to messages that are sent and checks received messages with the MAC. It can also encrypt messages sent and decrypt messages received.
The Internet Engineering Task Force (IETF) first suggested TLS in 1999. It was updated in RFC 5246 (August 2008) and RFC 6176 (March 2011). Netscape Communications made the SSL standards (1994, 1995, and 1996) so that their Navigator web browser could support the HTTPS protocol. This new version builds on those.

Schedule a Demo floating-button-arrow