In this lesson,
we're going to discuss email ports and protocols.
Email ports and protocols
refer to the conventions and numerical gateways
that govern the transmission of emails across the internet.
These protocols are the backbone of email communication,
and they ensure that messages are sent, received,
and managed efficiently.
Now, email communication primarily involves
three main protocols, this is SMTP, POP3, and IMAP.
Each of these plays a unique role
in the email delivery and retrieval process,
and they operate using specific ports
that facilitate these operations.
First, let's talk about SMTP.
Now, SMTP or the Simple Mail Transfer Protocol,
is the standard protocol used for sending emails
across the internet.
SMTP operates over Port 25,
which is the default port used by email servers
to relay messages to one another.
SMTP is used for the transmission of outbound emails,
and it's the protocol that your email server
is going to use to send your message
to the recipient email server.
It's important to note that SMTP
is only used for sending emails from your server
and not for receiving them.
Now, SMTP is operating over port 25,
and it's considered to be an insecure protocol
because the data is going to be sent in plain text.
Due to the increasing concerns over email security,
though, SMTPS was introduced as a secure variant of SMTP
SMTPS or SMTP Secure is not really a protocol itself,
but rather it's a way to secure the SMTP protocol
by transporting it via the secure socket layer
or transport layer security protocols.
This creates an encrypted tunnel,
and then the SMTP protocol can tunnel its data
through that encryption tunnel.
SMTPS is going to operate over port 465 or port 587
to ensure that the email messages are being encrypted
during transit
and they're protected from being read or tampered with
by unauthorized parties or attackers.
Second, we have POP3.
Now, POP3 or Post Office Protocol Version Three
is used to retrieve emails
from a remote server to a local client over port 110.
The POP3 protocol is designed
to download messages from the server to the email client
and then delete those messages
from the email server after they were downloaded.
Now, this was the primary way
that email was received in the 1990s and the early 2000s
when most people only had access to a single computer
that they used on a daily basis,
like their desktop computer at work.
Now, this was great back in the old days
when we didn't have the always on internet connections,
we have today because back then you'd actually have to make
a phone call using your computer
by using a dial up modem to call that server,
and then you download emails
and then access them from your computer,
whether you were online or offline,
because those emails were now located
on your local machine after you downloaded them.
The problem with this is that you were then limited
if you wanted to access your email from multiple devices,
because the messages might only be available
on the first device that downloaded them.
Now, in subsequent updates to the POP3 protocol,
they now have the option to download the emails
from the server
and to still keep the original copy on that server,
but the read or delete status
was not synchronized across devices,
which still made it a less usable option than IMAP,
which we're going to discuss shortly.
Now, before we move into IMAP though,
it's important to point out that POP3 by default
does transmit the emails in plain text
because it is considered to be an insecure protocol.
To overcome this limitation,
there was a secure variant called POP3S or POP3 Secure
that was created.
POP3 Secure typically operates over Port 995
using an SSL or TLS tunnel to encrypt the POP3 data
as it moves between an email server and an email client.
Third, we have IMAP.
Now IMAP stands for the Internet Message Access Protocol,
and it offers more flexibility than POP3
when you're receiving your emails.
IMAP is going to operate over Port 143,
and it allows you to manage your emails
directly on the email server.
This means that you can access and synchronize your messages
across multiple devices
as long as you have an available internet connection.
IMAP was really developed for the always on internet age
that we currently live in,
and IMAP in particular is useful
if you frequently check your email from different devices
such as your work computer, your laptop, your tablet,
and your smartphone,
because it ensures that your inbox, your set items,
and your organization are consistent across
all of those devices, including your read, delete,
and send status for each of those emails.
Like POP3, though,
IMAP was not initially created with security in mind
and it transmits the emails in plain text
between the server and the client.
To increase our email security,
we should instead select IMAPS, also known as IMAP Secure,
instead of the original IMAP protocol,
IMAP Secure operates over Port 993
to provide a secure and encrypted connection
between the email server and the email client
by transmitting data inside of an encrypted
SSL or TLS tunnel,
and then sending the data through the encryption tunnel
using the standard IMAP protocol.
So remember, when it comes to email ports and protocols,
SMTP and SMTPS are going to be used for setting emails.
With SMTPS, providing a secure and encrypted path
for the data to be transmitted.
POP3 and IMAP are both used for receiving emails,
but IMAP offers more sophisticated email management
if you're going to be accessing your email
from multiple devices.
Anytime you're configuring your email systems,
you should set them up to provide the more secure variants
like SMTPS, POP3S and IMAPS
to increase your level of security
and prevent a successful eavesdropping
or an on-path attack from occurring.
By understanding these protocols,
you can ensure that your messages
are being sent and received securely and efficiently.