The Complete Guide to Understanding SMTP, IMAP and POP3 Protocols and DNS Records

You are currently viewing The Complete Guide to Understanding SMTP, IMAP and POP3 Protocols and DNS Records
  • Post author:
  • Post last modified:October 30, 2022
  • Post comments:0 Comments
Reading Time: 8 minutes

What are email server protocols?

Email servers use protocols to communicate with each other. There are different protocols for different purposes. These are the most popular ones:

1) SMTP – for sending emails from one email server to another

2) POP3 – for downloading emails from a server and accessing them on your local computer or mobile phone

3) IMAP – for accessing emails from a server and organizing them in folders on your computer or mobile device

SMTP Server

SMTP popularly known as Simple Mail Transfer Protocol is used to send email messages from an email client to a mail server. The mail server then delivers the message to the recipient’s mailbox.

The sender’s email client connects to a mail server on port 25, and sends the message with HELO, MAIL FROM and RCPT TO commands. The recipient’s email client receives the message from the mail server with a 250 OK response code.

Setting up a SMTP Server

This guide will take you through the process of setting up a SMTP server on your machine.

Configuring SMTP is necessary for any application that sends email. It allows the application to relay messages to an external mail server, which then sends them to the recipient.

Setting up a SMTP server can be tricky and time-consuming, but we’ll walk you through it step by step so you can get your email flowing!

What is the Difference Between DNS Records and SMTP Protocol?

DNS is a protocol that translates domain names into IP addresses. SMTP, or Simple Mail Transfer Protocol, is a protocol for sending emails over the internet.

The differences between DNS records and SMTP are:

– DNS records are used to translate domain names into IP addresses, while SMTP is used to send emails over the internet.

– DNS records are hosted by domain registrar, maintained by authoritative DNS servers and can be found in your account settings.

– SMTP requires you to have an email account with an email service provider (ESP).

IMAP server

IMAP server aka Internet Mail Access Protocol allows users to access their email from multiple devices. Port 993 is the default port for this protocol.

IMAP is a protocol that allows the user to access email messages on different devices and store them in folders on the server. The advantage of this protocol is that it offers better security than POP3. It also allows for simultaneous use of different devices, so if you want to read your mail on your phone or tablet you can do so with IMAP.

IMAP server protocol. Mail client set up for email deliverability.

POP3 server

POP3 stands for Post Office Protocol version 3 and it’s a standard protocol for accessing email messages from an internet service provider (ISP). When emails are opened by the user, POP3 server downloads all messages from the server and stores them locally, meaning that if you log into your account from two different devices, only one device will be able to access your inbox at any given time. 

POP3 server protocol. Mail client set up.

How does a Mail Server Work?

A mail server is a computer that manages and delivers email messages. It is usually a software program or part of an operating system.

Mail servers provide several services to the Internet, such as:

  • receiving and delivering email messages
  • providing access to email databases and 
  • providing information for mail-based applications.

How to Connect Mail Server for Sending & Receiving Email Messages?

The email server is a computer that hosts one or more email domains. It is responsible for accepting, sending, and routing emails.

It also stores all the emails in an inbox and sorts them by date and sender.

There are many ways to connect mail servers for sending & receiving email messages.

You can use a POP3 or IMAP account to connect to the mail server, which is the most common way of connecting mail servers with email clients like Outlook and Thunderbird .

Also, you can use  webmail services like Roundcube , Horde and SquireMail to send and receive messages from your browser.

Another way is to configure your mobile phone’s email settings so that it syncs with your desktop’s inbox on the same account.

How to Connect Mail Server for Sending & Receiving Email Messages


What is a Nameserver and What Does it Do?

A name server is a computer that translates domain names into IP addresses. This means it is the most important part of the Domain Name System (DNS). Without this, we would not be able to go to websites or use email.

The DNS system was created in 1984 when the internet was first invented. It was originally designed to work with only one language and only one kind of character set. However, as the internet has grown, these limitations have become more and more problematic and it has become necessary for new standards to be introduced.


DNS records are used by the internet to translate a domain name (e.g. into an IP address (e.g. 234.518.5.104).

A DNS record is a database entry that stores information about the domain and how it should be resolved on the internet by a DNS server, typically one provided by a hosting company that owns the domain name being queried for resolution.

DNS records are stored in zone files which are maintained on authoritative DNS servers and distributed to other DNS servers in a hierarchical manner according to their geographic location in order to ensure optimal performance of queries from different points of origin around the world and also maintain consistency of data across all zones if possible for redundancy purposes. 

Each zone file is made up of records for the various types of data stored in the corresponding zone. For this example, consider having a domain called “”, then the corresponding zone file might contain records for the canonical name-www, email server-mail, A record, TXT record and CNAME record. While different providers use different formats to create and store their zones, they all share some similarities. They store a list of authoritative DNS servers for that zone, and then distribute the zone file to other DNS servers for use.

TXT Records

Txt records are part of the Domain Name System (DNS) which is a system that allows us to find the IP address of a website. For example, when you type “” into your browser, it will automatically look for the corresponding IP address and show you PotentSky’s homepage.

The txt record is an important part of DNS zones because it tells us where to find the mail server for a domain name. Without one, we wouldn’t know where to send responses for that domain.If someone sends an email from, the receiving mail servers can find the correct location to send them by looking in the DNS zone’s TXT record .

Examples of TXT records

  • A records
  • SPF records
  • DKIM records
  • DMARC records
  • CNAME records
  • SOA records

Types of DNS Records

A records

The A record stores IP address information for a domain name associated with the record. For example, if you created an A record for “” it would store your IP address as and any traffic to “” would be routed through the corresponding IP address .

rDNS record

It is also known as reverse DNS. In other words rDNS is mapping the IP address to a domain name. Forward lookup zone maps domain name to an IP address.

The process of reverse lookup of IP addresses uses PTR records. It is worth remembering that the rDNS setting is done where you purchased your IP address (your hosting) and not where you obtained your domain name.Which means that rDNS records are set at server level.

PTR Record aka Pointer Records. This record stores the name of a host or an IP address for a host, for example if you created a PTR record for “” it would store the name “” which is then used to route traffic to that host. 

SPF Records

SPF is an acronym for Sender Policy Framework

A domain name is a sequence of labels separated by dots, like The part that comes after the last dot is called the domain name’s TLD or top-level domain.

An SPF record is a type of DNS record that identifies which servers(IP address) are authorized to send email on behalf of a particular domain. SPF records are an important part of your email security and you should have one for each domain you own. SPF records can be used to prevent unauthorized people from sending emails using your company’s email address, which can lead to spam complaints and delivery issues with your outbound messages. If unauthorized people use your company’s email address, it will hurt the mail deliverability score of your domain. Therefore, SPF record is a technique used in DNS TXT records to prevent spoofing and spam for your company’s domain name.

DKIM records

DKIM is an abbreviation for DomainKeys Identified Mail TXT rcords in DNS zones.

DKIM records are used to verify the authenticity of an email sender. They help to protect against a spoofing attack and they can be created as a result of a domain’s public key being published in DNS records. DKIM records are also used to validate that the email is not spam. When an email is sent, the message is encrypted with a private key and then the receiver decrypts it with the public key. If it fails, then this means that there has been some tampering with the message which would make it seem like spam.

DMARC records

DMARC stands for Domain-based Message Authentication Reporting and Conformance

DMARC records are instructions  set  by server admin  in the DNS TXT record that allow recipient mail servers to accept or reject emails from unauthorized sources.

They work by checking the DKIM and SPF records in an email and comparing them with the ones stored in the domain’s DNS settings. If they match, then the message is deemed authentic and delivered. If they don’t match, then it is rejected as spam or phishing email or accepted depending on the admin’s instructions in the TXT records.

For example, if an email has been sent from an unauthorized source, DMARC will check the DKIM signature and SPF record for authenticity before delivering it. If it doesn’t pass the test, then DMARC will notify the sender’s server that this email has been rejected as spam or phishing email.

MX records

Also known as Mail Exchanger records, MX records are one of the most crucial components in mail server systems.

MX records are responsible for directing the email traffic to the right mail server.The MX record stores the email server address for a domain, and any outgoing emails from that domain are routed through this email server.

CNAME records

CNAME simply mean Canonical Name records used to map an alias to a different name. They are used by web servers to provide a domain name in the place of its IP address and by mail servers to identify the domain name of a recipient.

CNAME records are important because they allow you to use an alias for your domain, which is easier for humans to remember than the IP address. CNAME records also allow you to change your IP address without having to update all of your DNS configuration, which can be time-consuming and inconvenient due to the  nature of DNS propagation.

Mail Delivery Ports

Port 587

Port 587 is the default port for SMTP mail submission agents(MSA).

The port is used to send mail from a client to an email server.

The mail server then uses the Simple Mail Transfer Protocol (SMTP) to deliver the mail.

A mail delivery agent (MDA) is a computer program that delivers e-mail messages to local recipients. The MDA is usually a part of the mail transfer agent (MTA). In some cases, the MDA and MTA are combined into one program.

Port 465

Port 465 is an SMTP service on a mail server. It is used for sending email to other mail servers.

The port 465 is the default port for the SMTP service. This service is used by email clients to send emails to another server and from there, it will be delivered to the recipient’s mailbox. Port 465 also works as a relay agent that routes messages between two servers that speak different protocols.

Port 995

Port 995 is a secure port for pop3 server. It is encrypted over TLS/SSL connection.

Port 993

Port 993 is the default port for IMAP server . Port 993 is encrypted over TLS/SSL. It is the secure port for IMAP server.

Port 25

Port 25 is used as a default port for relaying emails between mail server of the sender to mail server of the recipient .It is the only port that allows connection between SMTP server of the sender to SMTP server of the recipient. Mail servers only listens to port 25. This port is usually closed by hosting providers to prevent spammers from misusing their platform that could hamper their reputation.

Port 110

Port 110 is used by the POP3 protocol for unencrypted access to emails.Which means it is unsecure access of mails The port is intended for end-users,mail clients, to connect to a mail server to retrieve messages.

Leave a Reply