{"id":9638,"date":"2019-09-03T05:47:11","date_gmt":"2019-09-03T05:47:11","guid":{"rendered":"https:\/\/www.gmass.co\/blog\/?p=9638"},"modified":"2020-09-07T23:26:26","modified_gmt":"2020-09-07T23:26:26","slug":"smtp-server-linux","status":"publish","type":"post","link":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/","title":{"rendered":"Setting up an SMTP Server on Linux &#8211; ultimate guide"},"content":{"rendered":"<h2><b>The Four Horsemen of Linux Mail Transfer: Exim, Postfix, Sendmail, and Qmail<\/b><\/h2>\n<p>Considering how important and popular email is today, it shouldn&#8217;t surprise anyone that there are millions of email servers currently operating on the public internet. According to a 2019 survey from securityspace.com (<a href=\"http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html\">http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html<\/a>), there are approximately 1.8 million email servers online!<\/p>\n<p>Given the long history of email (dating back to 1971), and the massive number of email servers online, you&#8217;d be right to assume that there are many different email server platforms available. However, according to the securityspace.com survey, three types of email servers account for more than 95% of the global market share:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Exim<\/li>\n<li>Postfix<\/li>\n<li>Sendmail<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>The top three email servers on the internet are Exim (with over 55%), Postfix (over 30%), and Sendmail (about 4%). All three of these email platforms, and Qmail, were originally developed for Unix-Like or Linux based Operating Systems.<\/p>\n<p>Today, with the widespread availability of easy and low-cost cloud-hosted server providers, anyone can setup their own email server. This guide focuses on deploying, configuring, and discussing best practices and security concerns for Exim, Postfix, Sendmail, and Qmail.<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Exim &#8211; Overview + Pros &amp; Cons<\/b><\/h3>\n<p>Exim is an MTA (Mail Transfer Agent) for Unix-like operating systems first written in 1995 by Philip Hazel. Exim is licensed under the GPLv2 license. Exim is used extensively all around the world. According to the study noted earlier\u00a0 (<a href=\"http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html\">http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html<\/a>), as of 2019 Exim accounted for approximately 57% of all online public email servers on the internet. Exim4 is currently the default MTA on all Debian-based GNU\/Linux systems, including Ubuntu.<\/p>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Pros<\/b><\/span><\/h4>\n<ul>\n<li>Default MTA on Debian-based Linux distributions<\/li>\n<li>Easy install, basic install is guided via user interface<\/li>\n<li>Popular and well documented<\/li>\n<li>Plenty of community support<\/li>\n<li>Secure<\/li>\n<\/ul>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Cons<\/b><\/span><\/h4>\n<ul>\n<li>Arguably more difficult to maintain\/administer post-deployment than Postfix<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Postfix &#8211; Overview + Pros &amp; Cons<\/b><\/h3>\n<p>Postfix is an MTA (mail transfer agent) for Unix-like operating systems developed by Wietse Venema in partnership with IBM in 1997. Postfix is licensed under the IBM Public License. As of 2019, Postfix is still under active development by its creator and a team of contributors. According to the following study (<a href=\"http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html\">http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html<\/a>),as of 2019 Postfix accounted for approximately 34% of all online public email servers on the internet.<\/p>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Pros<\/b><\/span><\/h4>\n<ul>\n<li>Easy to configure and use<\/li>\n<li>Elegant (author\u2019s opinion)<\/li>\n<li>Popular and well documented<\/li>\n<li>Plenty of community support<\/li>\n<li>Secure<\/li>\n<\/ul>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Cons<\/b><\/span><\/h4>\n<ul>\n<li>No Windows port<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Sendmail &#8211; Overview + Pros &amp; Cons<\/b><\/h3>\n<p>Sendmail is an MTA (mail transfer agent) for Unix-like operating systems first released in 1983. Sendmail is a descendant of the original ARPANET delivermail program written by Eric Allman. Allman developed Sendmail as a replacement for delivermail for BSD systems, starting with BSD version 4.1c in 1983. Sendmail is licensed under the Sendmail license. At one point (1996), Sendmail accounted for approximately 80% of all public email servers available on the internet. According to the Security Space study (<a href=\"http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html\">http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html<\/a>), in 2019 Sendmail accounted for approximately 4% of all online public email servers on the internet. Sendmail was acquired by Proofpoint in 2013.<\/p>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Pros<\/b><\/span><\/h4>\n<ul>\n<li>Native Windows port available<\/li>\n<\/ul>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Cons<\/b><\/span><\/h4>\n<ul>\n<li>Not as easy to configure as Exim or Postfix<\/li>\n<li>Not as efficient with resources<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Qmail &#8211; Overview + Pros &amp; Cons<\/b><\/h3>\n<p>Qmail is an MTA (mail transfer agent) for Unix-like operating systems first developed in 1995 by Daniel J. Bernstein. At its release, Qmail was touted as a more secure replacement for Sendmail. Qmail\u2019s source code was released to the public domain by its author. According to the Security Space study (<a href=\"http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html\">http:\/\/www.securityspace.com\/s_survey\/data\/man.201907\/mxsurvey.html<\/a>), in 2019 Qmail accounted for approximately 0.07% of all online public email servers on the internet.<\/p>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Pros<\/b><\/span><\/h4>\n<ul>\n<li>Secure<\/li>\n<li>Low resource requirements<\/li>\n<\/ul>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Cons<\/b><\/span><\/h4>\n<ul>\n<li>Unmaintained<\/li>\n<li>Most complicated of the four to install<\/li>\n<li>Config file structure and general operation is less elegant than Postfix or Exim<\/li>\n<li>Not as popular as the others (less than 1% market share)<\/li>\n<li>No Windows port<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Installation and Configuration Procedure &#8211; Environment Setup Notes<\/b><\/h3>\n<p>Unless otherwise specified, the following environment is used for all installation and configuration procedures to follow:<\/p>\n<ul>\n<li>Ubuntu Server 18.04.3 LTS\n<ul>\n<li>Kernel Version: 4.15.0-1045-aws<\/li>\n<\/ul>\n<\/li>\n<li>Running on an entry-level Amazon Lightsail instance (at the time of this writing, $3.50\/mo)\n<ul>\n<li>512 MB RAM<\/li>\n<li>1 vCPU<\/li>\n<li>20GB SSD<\/li>\n<li>1 TB Bandwidth<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>These procedures assume you are starting with a fresh installation of Ubuntu.<\/p>\n<p><strong>As always, don\u2019t forget to start by fully updating Ubuntu:<\/strong><\/p>\n<p><code>sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade<\/code><\/p>\n<p>Also, we will need to allow TCP port 25 (the default SMTP port) through the firewall. In our Amazon Lightsail environment, that looks like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9707 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1.png\" alt=\"lightsail1\" width=\"738\" height=\"297\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1.png 738w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1-300x121.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1-24x10.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1-36x14.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/lightsail1-48x19.png 48w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><b>How to Use Mutt Email Client to Send a Test Email<\/b><\/h3>\n<p>Mutt is a lightweight, CLI-only email client. It is very useful for testing and as a lightweight general purpose email client.<\/p>\n<p>To install Mutt:<\/p>\n<p><code>sudo apt-get install mutt<\/code><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9708 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1.png\" alt=\"mutt1\" width=\"562\" height=\"232\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1.png 562w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1-300x124.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1-24x10.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1-36x15.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt1-48x20.png 48w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a><\/p>\n<p>We\u2019re not going to go into a full configuration of Mutt. To manually launch Mutt and tell it to use our Maildir, run this:<\/p>\n<p><code>mutt -f ~\/Maildir<\/code><\/p>\n<p>Mutt will ask you if you want to create \/home\/ubuntu\/Mail (we don\u2019t) so just press n<\/p>\n<p>Once Mutt starts, it will look like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9709 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2.png\" alt=\"mutt2\" width=\"813\" height=\"322\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2.png 813w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2-300x119.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2-768x304.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2-24x10.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2-36x14.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt2-48x19.png 48w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/a><\/p>\n<p>To send a test email with Mutt, do the following:<\/p>\n<ol>\n<li>To start the mail, press m<\/li>\n<li>Enter the email address to which you want to send a test email<\/li>\n<li>Enter the subject of the test email<\/li>\n<li>You will then enter Nano text editor to write the body of your message. Write whatever you want.<\/li>\n<li>When finished writing your test message, press ctrl + x<\/li>\n<li>Then press y<\/li>\n<li>Then press enter<\/li>\n<\/ol>\n<p>If it has been done correctly, you should see something like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3.png\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9710 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3.png\" alt=\"mutt3\" width=\"813\" height=\"322\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3.png 813w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3-300x119.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3-768x304.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3-24x10.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3-36x14.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt3-48x19.png 48w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/a><\/p>\n<p>Finally, press y to send the email, and you should see \u201cmail sent.\u201d<\/p>\n<p>Now, let\u2019s go check our email to see if the message was delivered. Since this is a brand new email server with no DNS configuration or SPF, DKIM or DMARC, our test message will most likely be flagged as spam (if it gets delivered at all). For our tests, we used a Gmail account, and we were able to find our message in the spam folder:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4.png\" data-rel=\"lightbox-image-4\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9711 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4.png\" alt=\"mutt4\" width=\"616\" height=\"374\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4.png 616w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4-300x182.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4-24x15.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4-36x22.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/mutt4-48x29.png 48w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/a><\/p>\n<p>Our email was delivered! This means our email server is correctly sending outbound mail.<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Basic Install &amp; Config Procedure for Exim<\/b><\/h3>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Intro &amp; Unique Considerations<\/b><\/span><\/h4>\n<p>Exim version 4 is the default MTA for Debian-based Linux distributions, including Ubuntu 18. Therefore, installing Exim4 on Ubuntu is very straightforward.<\/p>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Common config files<\/b><\/span><\/h4>\n<p>\/etc\/exim4\/update-exim4.conf.conf &#8211; This is the config file where all settings configured via the configuration user interface are stored. You can either edit this file directly, or re-run <code>sudo dpkg-reconfigure exim4-config<\/code><\/p>\n<p>\/var\/lib\/exim4\/config.autogenerated &#8211; This is the master configuration file that is generated automatically every time you run <code>sudo update-exim4.conf<\/code><\/p>\n<p>This file should NOT be edited manually.<\/p>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Useful commands<\/b><\/span><\/h4>\n<p>To start the Exim4 daemon:<\/p>\n<p><code>sudo systemctl start exim4.service<\/code><\/p>\n<p>To stop the Exim4 daemon:<\/p>\n<p><code>sudo systemctl stop exim4.service<\/code><\/p>\n<p>To restart the Exim4 daemon:<\/p>\n<p><code>sudo systemctl restart exim4.service<\/code><\/p>\n<p>To generate main Exim4 config files:<\/p>\n<p><code>sudo update-exim4.conf<\/code><\/p>\n<p>Run the configuration user interface for Exim4:<\/p>\n<p><code>sudo dpkg-reconfigure exim4-config<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Procedure<\/b><\/span><\/h4>\n<p>First, see what Exim4 package is available in the default repositories:<\/p>\n<p><code>sudo apt-cache policy exim4<\/code><\/p>\n<p>(At the time of this writing, Exim version 4.90-1 is available in the default repositories.)<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1.png\" data-rel=\"lightbox-image-5\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9691 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1.png\" alt=\"exim1\" width=\"750\" height=\"145\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1.png 750w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1-300x58.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1-24x5.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1-36x7.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim1-48x9.png 48w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/p>\n<p>To install Exim4, run the following:<\/p>\n<p><code>sudo apt-get install exim4<\/code><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2.png\" data-rel=\"lightbox-image-6\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9692 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2.png\" alt=\"exim2\" width=\"961\" height=\"240\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2.png 961w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2-300x75.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2-768x192.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2-24x6.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2-36x9.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim2-48x12.png 48w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/a><\/p>\n<p>To configure Exim4, run the following, which will display a user interface for configuring many Exim parameters:<\/p>\n<p><code>sudo dpkg-reconfigure exim4-config<\/code><\/p>\n<p>You should see the following screen, allowing you to choose the type of mail server configuration you want. For this example, we will be configuring Exim as an \u201cinternet site\u201d or an email server that sends and receives email directly over the internet via SMTP.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3.png\" data-rel=\"lightbox-image-7\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9693 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3.png\" alt=\"exim3\" width=\"958\" height=\"392\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3.png 958w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3-300x123.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3-768x314.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3-24x10.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3-36x15.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim3-48x20.png 48w\" sizes=\"auto, (max-width: 958px) 100vw, 958px\" \/><\/a><\/p>\n<p>The next screen will prompt you to enter the \u201cmail name\u201d of the server. This should be the domain name where you want to receive email. We will use the name \u201csjno.net.\u201d<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4.png\" data-rel=\"lightbox-image-8\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9694 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4.png\" alt=\"exim4\" width=\"922\" height=\"309\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4.png 922w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4-300x101.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4-768x257.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim4-48x16.png 48w\" sizes=\"auto, (max-width: 922px) 100vw, 922px\" \/><\/a><\/p>\n<p>The next screen asks us to define on which IP addresses we want to listen for incoming SMTP connections. Since we want this server to be publicly available to the internet, we will set this to blank.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5.png\" data-rel=\"lightbox-image-9\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9695 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5.png\" alt=\"exim5\" width=\"950\" height=\"311\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5.png 950w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5-300x98.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5-768x251.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim5-48x16.png 48w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/a><\/p>\n<p>The next screen asks us to define our \u201clocal domains.\u201d Local domains are domains for which this email server should be considered the final destination. We will use the domain \u201csjno.net.\u201d<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6.png\" data-rel=\"lightbox-image-10\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9696 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6.png\" alt=\"exim6\" width=\"944\" height=\"282\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6.png 944w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6-300x90.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6-768x229.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6-24x7.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6-36x11.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim6-48x14.png 48w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/a><\/p>\n<p>The next screen asks us to define our \u201crelay domains.\u201d Relay domains are non-local domains. In our case, this is everything other than \u201csjno.net.\u201dFor now, we will leave this as the default value (blank).<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7.png\" data-rel=\"lightbox-image-11\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9697 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7.png\" alt=\"exim7\" width=\"951\" height=\"251\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7.png 951w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7-300x79.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7-768x203.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7-24x6.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7-36x10.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim7-48x13.png 48w\" sizes=\"auto, (max-width: 951px) 100vw, 951px\" \/><\/a><\/p>\n<p>The next screen asks us to define IP addresses for which this system will unconditionally relay email messages. This is useful if we are setting up this email server to be a dedicated \u201cMail Relay\u201d or \u201cSmarthost.\u201d For now, we will leave this as the default value (blank).<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8.png\" data-rel=\"lightbox-image-12\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9698 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8.png\" alt=\"exim8\" width=\"938\" height=\"265\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8.png 938w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8-300x85.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8-768x217.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8-24x7.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8-36x10.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim8-48x14.png 48w\" sizes=\"auto, (max-width: 938px) 100vw, 938px\" \/><\/a><\/p>\n<p>The next screen configures DNS lookup settings. For now, we will leave this as the default value (No).<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9.png\" data-rel=\"lightbox-image-13\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9699 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9.png\" alt=\"exim9\" width=\"952\" height=\"298\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9.png 952w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9-300x94.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9-768x240.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9-36x11.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim9-48x15.png 48w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/a><\/p>\n<p>The next screen asks us our preference between two common local mail formats. These two formats are called \u201cmbox\u201d and \u201cmaildir.\u201d This choice is mostly user preference. We prefer Maildir, so that is what we will select here.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10.png\" data-rel=\"lightbox-image-14\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9700 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10.png\" alt=\"exim10\" width=\"936\" height=\"281\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10.png 936w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10-300x90.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10-768x231.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10-24x7.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10-36x11.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim10-48x14.png 48w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>The next screen asks us whether or not we want to split Exim4\u2019s configuration into smaller files, as opposed to the default \u201cmonolithic\u201d configuration. There are pros and cons to each. For this example, we are going to choose not to split the config files (No).<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11.png\" data-rel=\"lightbox-image-15\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9701 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11.png\" alt=\"exim11\" width=\"943\" height=\"314\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11.png 943w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11-300x100.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11-768x256.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim11-48x16.png 48w\" sizes=\"auto, (max-width: 943px) 100vw, 943px\" \/><\/a><\/p>\n<p>The next screen asks us where mail addressed to postmaster@ and root@ should be delivered. If we leave this blank, mail for those recipients will be saved in \/var\/mail\/mail (not recommended). We will enter the username of our default user, which is \u201cubuntu.\u201d<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12.png\" data-rel=\"lightbox-image-16\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9702 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12.png\" alt=\"exim12\" width=\"950\" height=\"327\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12.png 950w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12-300x103.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12-768x264.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim12-48x17.png 48w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/a><\/p>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Testing Initial Installation<\/b><\/span><\/h4>\n<p>We now have a basic installation of Exim! Let\u2019s make sure it started and is running OK.<\/p>\n<p>Run this:<\/p>\n<p><code>ps aux | grep exim4<\/code><\/p>\n<p>If Exim is running, the above command should output something similar to this (we can see that there is a running process \/usr\/sbin\/exim4):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13.png\" data-rel=\"lightbox-image-17\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9703 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13.png\" alt=\"exim13\" width=\"733\" height=\"55\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13.png 733w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13-300x23.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13-24x2.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13-36x3.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim13-48x4.png 48w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/a><\/p>\n<p>Next, run this:<\/p>\n<p><code>sudo service exim4 status<\/code><\/p>\n<p>If Exim was started successfully, the command above should output something similar to this (we can see that the active status shows \u201cactive (running)\u201d ):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14.png\" data-rel=\"lightbox-image-18\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9704 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14.png\" alt=\"exim14\" width=\"658\" height=\"168\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14.png 658w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14-300x77.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14-24x6.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14-36x9.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim14-48x12.png 48w\" sizes=\"auto, (max-width: 658px) 100vw, 658px\" \/><\/a><\/p>\n<p>Next, run this:<\/p>\n<p><code>netstat -aln | grep 25<\/code><\/p>\n<p>We should see that our server is listening on port 25:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15.png\" data-rel=\"lightbox-image-19\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9705 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15.png\" alt=\"exim15\" width=\"697\" height=\"67\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15.png 697w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15-300x29.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15-24x2.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15-36x3.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim15-48x5.png 48w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/a><\/p>\n<p>Also, we should now be able to use a free web-based tool to verify that our server is up and listening to the world. We like to use the \u201cTest Email Server\u201d tool from mxtoolbox.com\u2019s SuperTool (<a href=\"https:\/\/mxtoolbox.com\/SuperTool.aspx#\">https:\/\/mxtoolbox.com\/SuperTool.aspx#<\/a>).<\/p>\n<p>If we point the \u201cTest Email Server\u201d test to the public IP address of our Amazon Lightsail instance, we should see something like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16.png\" data-rel=\"lightbox-image-20\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9706 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16.png\" alt=\"exim16\" width=\"618\" height=\"756\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16.png 618w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16-245x300.png 245w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16-20x24.png 20w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16-29x36.png 29w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/exim16-39x48.png 39w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/a><\/p>\n<p>To send a test email using the Mutt email client, refer to the section: <b>How to Use Mutt Email Client to Send a Test Email<\/b><\/p>\n<p>These tests prove that our basic Exim email server is up, listening, and can send mail. You may be thinking \u201cbut that\u2019s just an IP Address! What about DNS?\u201d Continue on to the <b>DNS Setup for Mail Server<\/b> section for steps on configuring the basic DNS-related settings.<\/p>\n<h4><span style=\"color: #000080;\"><b>Exim &#8211; Troubleshooting<\/b><\/span><\/h4>\n<p>Server doesn\u2019t appear to be listening or responding from the outside?<\/p>\n<p>Don\u2019t forget to open port 25 on your firewall. (See instructions for AWS in the environment notes section.)<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Basic Install &amp; Config Procedure for Postfix<\/b><\/h3>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Intro \/ Unique Considerations<\/b><\/span><\/h4>\n<p>Postfix is available in the default Ubuntu repositories, therefore installing Postfix is rather straightforward.<\/p>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Common config files<\/b><\/span><\/h4>\n<p>\/etc\/aliases<\/p>\n<p>\/etc\/postfix\/main.cf<\/p>\n<p>\/etc\/postfix\/master.cf<\/p>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Useful commands<\/b><\/span><\/h4>\n<p>To start Postfix:<\/p>\n<p><code>sudo postfix start<\/code><\/p>\n<p>To stop Postfix:<\/p>\n<p><code>sudo postfix stop<\/code><\/p>\n<p>To restart Postfix:<\/p>\n<p><code>sudo postfix restart<\/code><\/p>\n<p>After modifying main.cf, be sure to run:<\/p>\n<p><code>service postfix reload<\/code><\/p>\n<p>To modify Postfix config programmatically:<\/p>\n<p><code>sudo postconf<\/code><\/p>\n<p>To see how to use Postconf:<\/p>\n<p><code>man postconf<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Procedure<\/b><\/span><\/h4>\n<p>First, let\u2019s see what Postfix package is available in the default repositories:<\/p>\n<p><code>sudo apt-cache policy postfix<\/code><\/p>\n<p>(At the time of this writing, Postfix version 3.3.0 is available in the default repositories.)<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1.png\" data-rel=\"lightbox-image-21\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9714 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1.png\" alt=\"postfix1\" width=\"757\" height=\"127\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1.png 757w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1-300x50.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1-24x4.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1-36x6.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix1-48x8.png 48w\" sizes=\"auto, (max-width: 757px) 100vw, 757px\" \/><\/a><\/p>\n<p>To install Postfix, run the following:<\/p>\n<p><code>sudo apt-get install postfix<\/code><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2.png\" data-rel=\"lightbox-image-22\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9715 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2.png\" alt=\"postfix2\" width=\"948\" height=\"226\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2.png 948w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2-300x72.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2-768x183.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2-24x6.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2-36x9.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix2-48x11.png 48w\" sizes=\"auto, (max-width: 948px) 100vw, 948px\" \/><\/a><\/p>\n<p>You should immediately be greeted by Postfix\u2019s configuration user interface.<\/p>\n<p>You should see the following screen, allowing you to choose the type of mail server configuration you want. For this example, we will be configuring Postfix as an \u201cinternet site\u201d or an email server that sends and receives email directly over the internet via SMTP.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3.png\" data-rel=\"lightbox-image-23\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9716 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3.png\" alt=\"postfix3\" width=\"660\" height=\"452\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3.png 660w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3-300x205.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3-24x16.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3-36x25.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix3-48x33.png 48w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/a><\/p>\n<p>The next screen will prompt you to enter the \u201cmail name\u201d of the server. This should be the domain name where you want to receive email. We will use the name \u201csjno.net.\u201d<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4.png\" data-rel=\"lightbox-image-24\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9717 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4.png\" alt=\"postfix4\" width=\"946\" height=\"299\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4.png 946w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4-300x95.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4-768x243.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4-36x11.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix4-48x15.png 48w\" sizes=\"auto, (max-width: 946px) 100vw, 946px\" \/><\/a><\/p>\n<p>Immediately after hitting enter on this screen, the Postfix configuration user interface will close and Postfix will start scrolling through some automated configuration and startup output. Be sure to read this output for useful tips on performing additional Postfix configuration.<\/p>\n<p>By default, Postfix uses Mbox mail format. We prefer Maildir. First, let\u2019s manually create the Maildir directory structure for our Ubuntu user:<\/p>\n<p><code>mkdir -p \/home\/ubuntu\/Maildir\/{cur,new,tmp}<\/code><\/p>\n<p>Then configure Postfix to use Maildir:<\/p>\n<p><code>sudo postconf -e mailbox_command=<\/code><\/p>\n<p><code>sudo postconf -e home_mailbox=Maildir\/<\/code><\/p>\n<p>Then, tell Postfix to reload its config:<\/p>\n<p><code>sudo postfix reload<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Testing Initial Installation<\/b><\/span><\/h4>\n<p>We now have a basic installation of Postfix! Let\u2019s make sure it started and is running OK.<\/p>\n<p><code>ps aux | grep postfix<\/code><\/p>\n<p>If Postfix is running, the above command should output something similar to this (we can see that there are several Postfix processes running):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5.png\" data-rel=\"lightbox-image-25\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9718 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5.png\" alt=\"postfix5\" width=\"782\" height=\"81\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5.png 782w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5-300x31.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5-768x80.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5-24x2.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5-36x4.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix5-48x5.png 48w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/a><\/p>\n<p><code>sudo service postfix status<\/code><\/p>\n<p>If Postfix started successfully, the command above should output something similar to this (we can see that the active status shows \u201cactive (exited)\u201d):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix6.png\" data-rel=\"lightbox-image-26\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9719 size-thumbnail\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix6-150x146.png\" alt=\"postfix6\" width=\"150\" height=\"146\" \/><\/a><\/p>\n<p><code>netstat -aln | grep 25<\/code><\/p>\n<p>You should see that your server is listening on port 25:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7.png\" data-rel=\"lightbox-image-27\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9720 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7.png\" alt=\"postfix7\" width=\"618\" height=\"33\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7.png 618w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7-300x16.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7-24x1.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7-36x2.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix7-48x3.png 48w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/a><\/p>\n<p>Also, Postfix has its own status command:<\/p>\n<p><code>sudo postfix status<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9721\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix8-300x19.png\" alt=\"postfix8\" width=\"300\" height=\"19\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix8-300x19.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix8-24x1.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix8-36x2.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix8-48x3.png 48w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix8.png 563w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>We should now also be able to use a free web-based tool to verify that our server is up and listening to the world. We like to use the \u201cTest Email Server\u201d tool from mxtoolbox.com\u2019s SuperTool (https:\/\/mxtoolbox.com\/SuperTool.aspx#).<\/p>\n<p>If we point the \u201cTest Email Server\u201d tool to the public IP address of our Amazon Lightsail instance, we should see something like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9.png\" data-rel=\"lightbox-image-28\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9722 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9.png\" alt=\"postfix9\" width=\"609\" height=\"690\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9.png 609w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9-265x300.png 265w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9-21x24.png 21w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9-32x36.png 32w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/postfix9-42x48.png 42w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/a><\/p>\n<p>To send a test email using the Mutt email client, refer to the section <b>How to Use Mutt Email Client to Send a Test Email<\/b><\/p>\n<p>These tests prove that our basic Postfix email server is up, listening, and can send mail! You may be thinking \u201cbut that\u2019s just an IP Address. What about DNS?&#8221; Continue on to the <b>DNS Setup for Mail Server<\/b> section for steps on configuring the basic DNS-related settings.<\/p>\n<h4><span style=\"color: #000080;\"><b>Postfix &#8211; Troubleshooting<\/b><\/span><\/h4>\n<p>Server doesn\u2019t appear to be listening or responding from the outside?<\/p>\n<p>Don\u2019t forget to open port 25 on your firewall. (See instructions for AWS in the environment notes section.)<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Basic Install &amp; Config Procedure for Sendmail<\/b><\/h3>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Intro \/ Unique Considerations<\/b><\/span><\/h4>\n<p>Sendmail is available in the default Ubuntu repositories, therefore installing Sendmail is fairly straightforward, though not as simple as Exim or Postfix.<\/p>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Common config files<\/b><\/span><\/h4>\n<p>\/etc\/aliases<\/p>\n<p>\/etc\/hosts<\/p>\n<p>\/etc\/mail\/sendmail.mc<\/p>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Useful commands<\/b><\/span><\/h4>\n<p>To start Sendmail:<\/p>\n<p><code>sudo service sendmail start<\/code><\/p>\n<p>To stop Sendmail:<\/p>\n<p><code>sudo service sendmail stop<\/code><\/p>\n<p>To restart Sendmail:<\/p>\n<p><code>sudo service sendmail restart<\/code><\/p>\n<p>To run the Sendmail setup user interface:<\/p>\n<p><code>sudo sendmailconfig<\/code><\/p>\n<p>Run this command whenever you update the \/etc\/aliases file:<\/p>\n<p><code>sudo newaliases<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Procedure<\/b><\/span><\/h4>\n<p>First, let\u2019s see what Sendmail package is available in the default repositories:<\/p>\n<p><code>sudo apt-cache policy sendmail<\/code><\/p>\n<p>(At the time of this writing, Sendmail version 8.15.2 is available in the default repositories.)<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1.png\" data-rel=\"lightbox-image-29\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9731 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1.png\" alt=\"sendmail1\" width=\"723\" height=\"99\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1.png 723w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1-300x41.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1-24x3.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1-36x5.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail1-48x7.png 48w\" sizes=\"auto, (max-width: 723px) 100vw, 723px\" \/><\/a><\/p>\n<p>To install Sendmail, run the following:<\/p>\n<p><code>sudo apt-get install sendmail<\/code><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2.png\" data-rel=\"lightbox-image-30\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9732 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2.png\" alt=\"sendmail2\" width=\"924\" height=\"208\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2.png 924w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2-300x68.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2-768x173.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2-24x5.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2-36x8.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail2-48x11.png 48w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/a><\/p>\n<p>After install completes, we need to make a modification to our \/etc\/hosts file.<\/p>\n<p><code>sudo vim \/etc\/hosts<\/code><\/p>\n<p>We need to modify the first line that starts with \u201c127.0.0.1 localhost\u201d to include the FQDN (fully qualified domain name) or our mail server. For our example, we will use \u201cmail.sjno.net\u201d:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3.png\" data-rel=\"lightbox-image-31\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9733 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3.png\" alt=\"sendmail3\" width=\"476\" height=\"159\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3.png 476w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3-300x100.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail3-48x16.png 48w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/a><\/p>\n<p>Save the \/etc\/hosts file, then run the following command and answer \u201cY\u201d to every prompt:<\/p>\n<p><code>sudo sendmailconfig<\/code><\/p>\n<p>When it\u2019s finished, you should see something like this (note: the first part of the output is omitted):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4.png\" data-rel=\"lightbox-image-32\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9734 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4.png\" alt=\"sendmail4\" width=\"989\" height=\"642\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4.png 989w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4-300x195.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4-768x499.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4-24x16.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4-36x23.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail4-48x31.png 48w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/a><\/p>\n<p>By default, Sendmail only listens on the local loopback interface (127.0.0.1). To tell Sendmail to listen on all interfaces, we need to modify etc\/mail\/sendmail.mc:<\/p>\n<p><code>sudo vim \/etc\/mail\/sendmail.mc<\/code><\/p>\n<p>Find the line that looks like \u201cDAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1&#8242;)dnl\u201d and comment it out by adding \u201cdnl #&#8221; to the start of the line.<\/p>\n<p>Create a new line directly below that looks like \u201cDAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp&#8217;)dnl\u201d<\/p>\n<p>Refer to the screenshot:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5.png\" data-rel=\"lightbox-image-33\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9735 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5.png\" alt=\"sendmail5\" width=\"639\" height=\"35\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5.png 639w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5-300x16.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5-24x1.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5-36x2.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail5-48x3.png 48w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<p>Then, restart Sendmail:<\/p>\n<p><code>sudo service sendmail restart<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Testing Initial Installation<\/b><\/span><\/h4>\n<p>We now have a basic installation of Sendmail! Let\u2019s make sure it started and is running OK.<\/p>\n<p><code>ps aux | grep sendmail<\/code><\/p>\n<p>If Sendmail is running, the command above should output something similar to this (we can see that there is a running process \u201csendmail: MTA: accepting connections\u201d):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6.png\" data-rel=\"lightbox-image-34\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9736 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6.png\" alt=\"sendmail6\" width=\"819\" height=\"34\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6.png 819w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6-300x12.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6-768x32.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6-24x1.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6-36x1.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail6-48x2.png 48w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/a><\/p>\n<p><code>sudo service sendmail status<\/code><\/p>\n<p>If Sendmail was started successfully, the command above should output something similar to this (we can see that the active status shows \u201cactive (running)\u201d):<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7.png\" data-rel=\"lightbox-image-35\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9737 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7.png\" alt=\"sendmail7\" width=\"971\" height=\"340\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7.png 971w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7-300x105.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7-768x269.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7-36x13.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail7-48x17.png 48w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/a><\/p>\n<p><code>netstat -aln | grep 25<\/code><\/p>\n<p>We should see that our server is listening on port 25:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8.png\" data-rel=\"lightbox-image-36\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9738 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8.png\" alt=\"sendmail8\" width=\"616\" height=\"18\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8.png 616w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8-300x9.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8-24x1.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8-36x1.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail8-48x1.png 48w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/a><\/p>\n<p>Also, we should now be able to use a free web-based tool to verify that our server is up and listening to the world. We like to use the \u201cTest Email Server\u201d tool from mxtoolbox.com\u2019s SuperTool (https:\/\/mxtoolbox.com\/SuperTool.aspx#).<\/p>\n<p>If we point the \u201cTest Email Server\u201d tool to the public IP address of our Amazon Lightsail instance, we should see something like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9.png\" data-rel=\"lightbox-image-37\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9739 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9.png\" alt=\"sendmail9\" width=\"605\" height=\"806\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9.png 605w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9-225x300.png 225w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9-18x24.png 18w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9-27x36.png 27w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/sendmail9-36x48.png 36w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<p>To send a test email using the Mutt email client, refer to the section <b>How to Use Mutt Email Client to Send a Test Email<\/b><\/p>\n<p>These tests prove that our basic Exim email server is up, listening, and can send mail! You may be thinking \u201cbut that\u2019s just an IP Address. What about DNS?\u201d Continue on to the <b>DNS Setup for Mail Server<\/b> section for steps on configuring the basic DNS-related settings.<\/p>\n<h4><span style=\"color: #000080;\"><b>Sendmail &#8211; Troubleshooting<\/b><\/span><\/h4>\n<p>Server doesn\u2019t appear to be listening or responding from the outside?<\/p>\n<p>Don\u2019t forget to open port 25 on your firewall. (See instructions for AWS in the environment notes section.)<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Basic Install &amp; Config Procedure for Qmail<\/b><\/h3>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Intro \/ Unique Considerations<\/b><\/span><\/h4>\n<p>Qmail is definitely the most complicated and at least intuitive of the four to configure on Ubuntu. Pay attention to the bit regarding <code>daemontools-run<\/code> below.<\/p>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Common config files<\/b><\/span><\/h4>\n<p>Many files in \/etc\/qmail<\/p>\n<p>Many files in \/var\/ib\/qmail<\/p>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Useful commands<\/b><\/span><\/h4>\n<p>To start Qmail:<\/p>\n<p><code>sudo qmailctl restart<\/code><\/p>\n<p>To stop Qmail<\/p>\n<p><code>sudo qmailctl stop<\/code><\/p>\n<p>To restart Qmail:<\/p>\n<p><code>sudo qmailctl restart<\/code><\/p>\n<p>To check Qmail status:<\/p>\n<p><code>sudo qmailctl stat<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Procedure<\/b><\/span><\/h4>\n<p>First, let\u2019s see what Qmail package is available in the default repositories:<\/p>\n<p><code>sudo apt-cache policy qmail<\/code><\/p>\n<p>(At the time of this writing, Qmail version 1.06 is available in the default repositories.)<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1.png\" data-rel=\"lightbox-image-38\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9723 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1.png\" alt=\"qmail1\" width=\"716\" height=\"97\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1.png 716w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1-300x41.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1-24x3.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1-36x5.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail1-48x7.png 48w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><\/p>\n<p>At the time of this writing, installing the default Qmail package on Ubuntu 18.04 does not automatically install at least one necessary dependency to make Qmail work. Let\u2019s manually install that package:<\/p>\n<p><code>sudo apt-get install daemontools-run<\/code><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2.png\" data-rel=\"lightbox-image-39\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9724 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2.png\" alt=\"qmail2\" width=\"549\" height=\"183\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2.png 549w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2-300x100.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail2-48x16.png 48w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/a><\/p>\n<p>To install Qmail, run the following:<\/p>\n<p><code>sudo apt-get install qmail<\/code><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3.png\" data-rel=\"lightbox-image-40\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9725 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3.png\" alt=\"qmail3\" width=\"670\" height=\"191\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3.png 670w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3-300x86.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3-24x7.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3-36x10.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail3-48x14.png 48w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><\/p>\n<p>Let\u2019s create a Maildir directory for our user:<\/p>\n<p><code>mkdir -p \/home\/ubuntu\/Maildir\/{cur,new,tmp}<\/code><\/p>\n<p>Then, copy and paste the following to do some basic Qmail setup. Be sure to replace all instances of \u201csjno.net\u201d below with your domain.<\/p>\n<p><code>sudo sh -c \"echo 'sjno.net' &gt; \/etc\/qmail\/defaultdomain<\/code><\/p>\n<p><code>echo 'sjno.net' &gt; \/etc\/qmail\/locals<\/code><\/p>\n<p><code>echo 'mail.sjno.net' &gt; \/etc\/qmail\/me<\/code><\/p>\n<p><code>echo 'sjno.net' &gt; \/etc\/qmail\/rcpthosts<\/code><\/p>\n<p><code>echo '.\/Maildir\/' &gt; \/etc\/qmail\/defaultdelivery\"<\/code><\/p>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Testing Initial Installation<\/b><\/span><\/h4>\n<p>Restart Qmail:<\/p>\n<p><code>sudo qmailctl restart<\/code><\/p>\n<p>If Qmail is working properly, you should see output similar to this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4.png\" data-rel=\"lightbox-image-41\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9726 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4.png\" alt=\"qmail4\" width=\"376\" height=\"79\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4.png 376w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4-300x63.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4-24x5.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4-36x8.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail4-48x10.png 48w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><\/a><\/p>\n<p>Check Qmail status:<\/p>\n<p><code>sudo qmailctl stat<\/code><\/p>\n<p>If Qmail started properly, you should see output similar to this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5.png\" data-rel=\"lightbox-image-42\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9727 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5.png\" alt=\"qmail5\" width=\"478\" height=\"132\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5.png 478w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5-300x83.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5-24x7.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5-36x10.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail5-48x13.png 48w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p><code>ps aux | grep qmail<\/code><\/p>\n<p>If Qmail is running as expected, you will see output similar to this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6.png\" data-rel=\"lightbox-image-43\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9728 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6.png\" alt=\"qmail6\" width=\"997\" height=\"226\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6.png 997w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6-300x68.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6-768x174.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6-24x5.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6-36x8.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail6-48x11.png 48w\" sizes=\"auto, (max-width: 997px) 100vw, 997px\" \/><\/a><\/p>\n<p><code>netstat -aln | grep 25<\/code><\/p>\n<p>This output shows that Qmail is listening on port 25.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7.png\" data-rel=\"lightbox-image-44\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9729 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7.png\" alt=\"qmail7\" width=\"614\" height=\"21\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7.png 614w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7-300x10.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7-24x1.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7-36x1.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail7-48x2.png 48w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>Also, we should now be able to use a free web-based tool to verify that our server is up and listening to the world. We like to use the \u201cTest Email Server\u201d tool from mxtoolbox.com\u2019s SuperTool (https:\/\/mxtoolbox.com\/SuperTool.aspx#).<\/p>\n<p>If we point the \u201cTest Email Server\u201d tool to the public IP address of our Amazon Lightsail instance, we should see something like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8.png\" data-rel=\"lightbox-image-45\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9730 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8.png\" alt=\"qmail8\" width=\"642\" height=\"633\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8.png 642w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8-300x296.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8-24x24.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8-36x36.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/qmail8-48x48.png 48w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n<p>To send a test email using the Mutt email client, refer to the section <b>How to Use Mutt Email Client to Send a Test Email<\/b><\/p>\n<p>These tests prove that our basic Qmail email server is up, listening, and can send mail! You may be thinking \u201cbut that\u2019s just an IP Address. What about DNS?\u201d Continue on to the <b>DNS Setup for Mail Server<\/b> section for steps on configuring the basic DNS-related settings.<\/p>\n<h4><span style=\"color: #000080;\"><b>Qmail &#8211; Troubleshooting<\/b><\/span><\/h4>\n<p>If you see errors like this, make sure you have the \u201cdaemontools-run\u201d package installed:<\/p>\n<p><code>unable to open supervise\/ok: file does not exist<\/code><\/p>\n<p>Server doesn\u2019t appear to be listening or responding from the outside?<\/p>\n<p>Don\u2019t forget to open port 25 on your firewall. (See instructions for AWS in the environment notes section.)<\/p>\n<p>&nbsp;<\/p>\n<h3><b>DNS Setup for Mail Server<\/b><\/h3>\n<p>Testing our email server by sending outbound emails and running tools against our public IP address is great, but what about DNS?<\/p>\n<p>In order to tell the world how to get to your email server, we need to do some DNS setup. We will also setup SPF at the same time.<\/p>\n<p>Requirements to complete this section:<\/p>\n<ol>\n<li>You must own a domain name. In this example, we will use the domain sjno.net.<\/li>\n<li>You must have the domain name configured with DNS servers. This is configured at your registrar (for example, godaddy.com).<\/li>\n<li>You must have access to make changes \/ add records on your DNS servers for your domain.<\/li>\n<\/ol>\n<p>Assuming the three requirements above are met, we can create the necessary DNS records. There are many DNS providers available and all of their user interfaces will look different. Or, you could even be running your own CLI-only Linux DNS server with Bind9. Ignoring the differences between user interfaces, the concepts are the same. This example will show the DNS configuration with free DNS provider freedns.afraid.org.<\/p>\n<p>First, let\u2019s create an A Record for our new mail server. An A Record is the most basic type of DNS record. We are just creating a name for our mail server, and pointing it to the public IP address of our server. We\u2019re going to call our server \u201cmail.sjno.net\u201d:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1.png\" data-rel=\"lightbox-image-46\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9685 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1.png\" alt=\"dns1\" width=\"369\" height=\"202\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1.png 369w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1-300x164.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1-24x13.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1-36x20.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns1-48x26.png 48w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/a><\/p>\n<p>After saving our A Record and waiting a few minutes, we should be able to ping our mail server by name and see that the DNS is automatically resolving the IP address for us:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2.png\" data-rel=\"lightbox-image-47\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9686 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2.png\" alt=\"dns2\" width=\"479\" height=\"56\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2.png 479w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2-300x35.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2-24x3.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2-36x4.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns2-48x6.png 48w\" sizes=\"auto, (max-width: 479px) 100vw, 479px\" \/><\/a><\/p>\n<p>Next, we\u2019re going to create an MX Record. An MX Record tells the world where to send email destined for our domain. We\u2019re going to leave the \u201csubdomain\u201d blank (or @), and point it to the name of the A Record we created in the previous step:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3.png\" data-rel=\"lightbox-image-48\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9687 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3.png\" alt=\"dns3\" width=\"418\" height=\"205\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3.png 418w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3-300x147.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3-24x12.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3-36x18.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns3-48x24.png 48w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/a><\/p>\n<p>After saving our MX Record and waiting a few minutes, we should be able to use our trusty online tool (<a href=\"https:\/\/mxtoolbox.com\/SuperTool.aspx\">https:\/\/mxtoolbox.com\/SuperTool.aspx<\/a>) to do an \u201cMX Lookup\u201d for our domain:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4.png\" data-rel=\"lightbox-image-49\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9688 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4.png\" alt=\"dns4\" width=\"642\" height=\"469\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4.png 642w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4-300x219.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4-24x18.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4-36x26.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns4-48x35.png 48w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n<p>Next, we\u2019re going to configure an SPF Record to tell the world that our email server is an allowed and trusted sender for our domain. Even though this is an SPF Record, we\u2019re not going to use the SPF Record type, we\u2019re actually going to use a TXT Record to record our SPF info. There are a few different ways to configure SPF, but we\u2019re going to do it like this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5.png\" data-rel=\"lightbox-image-50\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9689 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5.png\" alt=\"dns5\" width=\"418\" height=\"205\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5.png 418w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5-300x147.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5-24x12.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5-36x18.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns5-48x24.png 48w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/a><\/p>\n<p>This is a shorthand way to say \u201ctrust the email server we have defined in the MX Record for this domain.\u201d The destination or \u201ccontent\u201d of your SPF TXT record must be wrapped in quotes. Some user interfaces will automatically add the quotes for you, and others won\u2019t, so watch out for that.<\/p>\n<p>Once again, using our trusty tool (<a href=\"https:\/\/mxtoolbox.com\/SuperTool.aspx\">https:\/\/mxtoolbox.com\/SuperTool.aspx<\/a>) and this time performing an \u201cSPF Record Lookup,\u201d we should see that our SPF Record has been published successfully for our domain:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6.png\" data-rel=\"lightbox-image-51\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9690 size-full\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6.png\" alt=\"dns6\" width=\"642\" height=\"639\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6.png 642w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6-150x150.png 150w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6-300x300.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6-24x24.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6-36x36.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/dns6-48x48.png 48w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n<h3><b>What is SMTP?<\/b><\/h3>\n<p>SMTP or Simple Mail Transfer Protocol is a communication protocol first defined in 1982. SMTP is the main protocol behind what we know as email. SMTP defines how email should be submitted to an email server from an email client, and also how email is sent and received between email servers. SMTP is an application layer protocol which requires that a TCP connection first be established to the email server before SMTP data can be sent across the connection.<\/p>\n<h4><span style=\"color: #000080;\"><b>Why is SMTP important? How is it used?<\/b><\/span><\/h4>\n<p>SMTP is important because it is the main internet standard behind email. The first email message was sent in 1971. Nearly 50 years later, email has become the single most important communication tool driving the modern world. Global communications today rely on email more than any other method of communication. The impact that email has had on global business is immeasurable.<\/p>\n<p>&nbsp;<\/p>\n<h4><span style=\"color: #000080;\"><b>Glossary of SMTP and Email Terminology<\/b><\/span><\/h4>\n<p><b>DKIM<\/b><\/p>\n<p>DKIM (DomainKeys Identified Mail) is an authentication method used to deter spam and phishing emails. DKIM utilizes cryptographic signatures to prove that an email was sent from a trusted email server and has not been tampered with. DKIM relies on DNS to publish DKIM information for a given email domain, usually via DNS TXT Record.<\/p>\n<p><b>DMARC<\/b><\/p>\n<p>DMARC (Domain-based Message Authentication, Reporting and Conformance) is an authentication method used to deter spam and phishing emails. DMARC complements SPF and DKIM by giving a recipient email server instructions on how to handle emails that do not pass SPF or DKIM for a given domain. DMARC relies on DNS to publish DMARC information for a given email domain, usually via DNS TXT Record.<\/p>\n<p><b>DNS<\/b><\/p>\n<p>DNS (Domain Name System) is arguably the most important protocol on the internet. To use a simple analogy, DNS is like the \u201cphone book\u201d of the internet. The DNS system allows computers to determine the IP Address for a given domain name.<\/p>\n<p><b>IMAP<\/b><\/p>\n<p>IMAP (Internet Message Access Protocol) is a protocol used by email clients to retrieve or download email messages from an email server to an email client. In most cases, IMAP is recommended as a better and more full-featured alternative to POP3.<\/p>\n<p><b>Mail Relay<\/b><\/p>\n<p>Mail Relay is both the service of routing email to another mail server for delivery, and a term for a mail server that provides that service.<\/p>\n<p><b>MTA<\/b><\/p>\n<p>An MTA (message transfer agent) is one component of an overall MHS (message handling system) or email server, that is responsible for transferring and routing email messages to the recipient\u2019s email server.<\/p>\n<p><b>Mutt<\/b><\/p>\n<p>Mutt is a CLI (command line interface) email client that is useful on CLI-only Linux email servers for sending and receiving emails and also for troubleshooting email functionality.<\/p>\n<p><b>MX Record<\/b><\/p>\n<p>An MX record is a specific type of DNS record that defines the email server where emails should be sent for a given domain. For example, if you want to send an email to <a href=\"mailto:info@gmass.co\">info@gmass.co<\/a>, your email client must first determine the email server used by the gmass.co domain. To make that determination, a DNS query will be made for the MX record for the gmass.co domain. Using a web-based MX lookup tool, we can see this information for ourselves. Refer to the screenshot (mx_lookup_1.png or mx_lookup_2.png). (I used MXToolbox.com and dnschecker.org to generate these screenshots.)<\/p>\n<p><b>POP3<\/b><\/p>\n<p>POP3 (Post Office Protocol) is a protocol used by email clients to retrieve or download email messages from an email server to an email client. POP3 is a very basic protocol. In most cases, IMAP is recommended as a better and more full-featured alternative to POP3.<\/p>\n<p><b>SASL<\/b><\/p>\n<p>SASL (Simple Authentication and Security Layer) is a standardized method for adding authentication support to connection-based protocols. SASL decouples authentication from the application, allowing secure authentication to numerous compatible application layer protocols (including SMTP).<\/p>\n<p><b>SPF<\/b><\/p>\n<p>SPF (Sender Policy Framework) is a basic email authentication protocol that is used to deter spam and spoofed email on the internet. SPF utilizes DNS (typically via a DNS TXT Record) to publish trusted email servers for a given domain.<\/p>\n<p><b>SPF Record<\/b><\/p>\n<p>An SPF (Sender Policy Framework) record is a specific type of DNS record that is used to publish trusted email sending servers for a given email domain. SPF records have mostly been deprecated in favor of DNS TXT Records, which can contain the same information and serve the same purpose.<\/p>\n<p><b>STARTTLS<\/b><\/p>\n<p>STARTTLS is a protocol command that is issued by an email client to tell an email server that the client wants to upgrade the current connection to a secure connection utilizing SSL\/TLS certificates.<\/p>\n<p><b>TXT Record<\/b><\/p>\n<p>A TXT (or text) Record is a specific type of DNS record used to publish arbitrary text related to a given domain. TXT Records are often used to prove domain ownership. TXT Records are also used to publish SPF, DKIM, and DMARC information related to email service for a domain.<\/p>\n<p>&nbsp;<\/p>\n<p><em>If you&#8217;re a web developer and found this post useful, you might also like my <a href=\"https:\/\/www.gmass.co\/blog\/smtp-services-review\/\">technical review of popular SMTP services<\/a>.\u00a0<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Four Horsemen of Linux Mail Transfer: Exim, Postfix, Sendmail, and Qmail Considering how important and popular email is today, it shouldn&#8217;t surprise anyone that there are millions\u2026<\/p>\n","protected":false},"author":2,"featured_media":9757,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2432],"tags":[],"class_list":["post-9638","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sysadmins"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Setting up an SMTP Server on Linux - ultimate guide<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Setting up an SMTP Server on Linux - ultimate guide\" \/>\r\n<meta property=\"og:description\" content=\"The Four Horsemen of Linux Mail Transfer: Exim, Postfix, Sendmail, and Qmail Considering how important and popular email is today, it shouldn&#8217;t surprise anyone that there are millions\u2026\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/\" \/>\r\n<meta property=\"og:site_name\" content=\"GMass Blog\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GmailMailMerge\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2019-09-03T05:47:11+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2020-09-07T23:26:26+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/set-up-SMTP-server-148k.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"1001\" \/>\r\n\t<meta property=\"og:image:height\" content=\"467\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"Ajay Goel\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@PartTimeSnob\" \/>\r\n<meta name=\"twitter:site\" content=\"@GMassForGmail\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay Goel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"25 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/\"},\"author\":{\"name\":\"Ajay Goel\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"headline\":\"Setting up an SMTP Server on Linux &#8211; ultimate guide\",\"datePublished\":\"2019-09-03T05:47:11+00:00\",\"dateModified\":\"2020-09-07T23:26:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/\"},\"wordCount\":4715,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/set-up-SMTP-server-148k.png\",\"articleSection\":[\"Sysadmins\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/\",\"name\":\"Setting up an SMTP Server on Linux - ultimate guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/set-up-SMTP-server-148k.png\",\"datePublished\":\"2019-09-03T05:47:11+00:00\",\"dateModified\":\"2020-09-07T23:26:26+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/set-up-SMTP-server-148k.png\",\"contentUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/set-up-SMTP-server-148k.png\",\"width\":1001,\"height\":467,\"caption\":\"set up SMTP server\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/smtp-server-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting up an SMTP Server on Linux &#8211; ultimate guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\",\"name\":\"GMass Blog\",\"description\":\"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\",\"name\":\"Ajay Goel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"caption\":\"Ajay Goel\"},\"description\":\"Ajay is the founder of GMass and has been developing email sending software for 20 years.\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/PartTimeSnob\",\"https:\\\/\\\/x.com\\\/PartTimeSnob\"],\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/author\\\/ajay-goel\\\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting up an SMTP Server on Linux - ultimate guide","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/","og_locale":"en_US","og_type":"article","og_title":"Setting up an SMTP Server on Linux - ultimate guide","og_description":"The Four Horsemen of Linux Mail Transfer: Exim, Postfix, Sendmail, and Qmail Considering how important and popular email is today, it shouldn&#8217;t surprise anyone that there are millions\u2026","og_url":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/","og_site_name":"GMass Blog","article_publisher":"https:\/\/www.facebook.com\/GmailMailMerge\/","article_published_time":"2019-09-03T05:47:11+00:00","article_modified_time":"2020-09-07T23:26:26+00:00","og_image":[{"width":1001,"height":467,"url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/set-up-SMTP-server-148k.png","type":"image\/png"}],"author":"Ajay Goel","twitter_card":"summary_large_image","twitter_creator":"@PartTimeSnob","twitter_site":"@GMassForGmail","twitter_misc":{"Written by":"Ajay Goel","Est. reading time":"25 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#article","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/"},"author":{"name":"Ajay Goel","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"headline":"Setting up an SMTP Server on Linux &#8211; ultimate guide","datePublished":"2019-09-03T05:47:11+00:00","dateModified":"2020-09-07T23:26:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/"},"wordCount":4715,"commentCount":2,"image":{"@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/set-up-SMTP-server-148k.png","articleSection":["Sysadmins"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/","url":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/","name":"Setting up an SMTP Server on Linux - ultimate guide","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#primaryimage"},"image":{"@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/set-up-SMTP-server-148k.png","datePublished":"2019-09-03T05:47:11+00:00","dateModified":"2020-09-07T23:26:26+00:00","author":{"@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"breadcrumb":{"@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gmass.co\/blog\/smtp-server-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#primaryimage","url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/set-up-SMTP-server-148k.png","contentUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2019\/09\/set-up-SMTP-server-148k.png","width":1001,"height":467,"caption":"set up SMTP server"},{"@type":"BreadcrumbList","@id":"https:\/\/www.gmass.co\/blog\/smtp-server-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gmass.co\/blog\/"},{"@type":"ListItem","position":2,"name":"Setting up an SMTP Server on Linux &#8211; ultimate guide"}]},{"@type":"WebSite","@id":"https:\/\/www.gmass.co\/blog\/#website","url":"https:\/\/www.gmass.co\/blog\/","name":"GMass Blog","description":"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gmass.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8","name":"Ajay Goel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","caption":"Ajay Goel"},"description":"Ajay is the founder of GMass and has been developing email sending software for 20 years.","sameAs":["https:\/\/twitter.com\/PartTimeSnob","https:\/\/x.com\/PartTimeSnob"],"url":"https:\/\/www.gmass.co\/blog\/author\/ajay-goel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/9638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/comments?post=9638"}],"version-history":[{"count":29,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/9638\/revisions"}],"predecessor-version":[{"id":13397,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/9638\/revisions\/13397"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media\/9757"}],"wp:attachment":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media?parent=9638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/categories?post=9638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/tags?post=9638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}