There are several methods to build SMTP servers, in this guide I will build the SMTP server using a free open source software called “Postal“.
Postal is a fully-featured open source mail delivery platform for incoming & outgoing e-mail and gives you all the tools and features needed to build a full mailing system for your business.
What is the SMTP Server?
I don’t like robotic definitions like Wikipedia, I love to make things simple.
Simply, SMTP is that thing that allows you to send emails over the internet.
SMTP stands for “Simple Mail Transfer Protocol”. It’s a Concept in Networking that you don’t have to worry about.
Just Know that SMTP is the technical thing that is responsible for delivering emails over the internet.
Let’s connect things, how this is related to email marketing?
Email marketing system consists of two parts:
- The sender: (SMTP service) this is the technical part. It allows you to send emails over the internet.
- The Management Application, where you can configure and manage your Email Lists, Marketing Campaigns, monitor and analyze results, manage your sending servers, and so on.
So we connect both together to get an Email Marketing System.
What do we mean by Sending Unlimited Emails?
When we say unlimited emails, this means that we can send unlimited emails from our server, there are no restrictions by companies or monthly plans to buy or so.
It’s your own server, u can send as much your server can handle in terms of resources. so when you have more (CPU and RAM), you can send more emails and so on.
Setup the SMTP Server, Let’s Start!
Ok, So Let’s start the real work! but before, you need to know what is required.
Requirements to Setup SMTP Server.
In order to Build and Setup an SMTP Server, you will mainly need two things:
- A Domain name
- VPS Server with port 25 opened.
1. Domain name
When you send emails, you will be sending from an email address like this one:
So in my case, “H-educate.com” is the domain name that I use to send my emails. so simply it’s required to have a domain name to use when you send emails from your SMTP server.
Usually, it’s your website domain name, except if you are working with cold emails, then it’s better to get and use another domain in case it got blacklisted, to keep your main business domain safe.
So if you don’t have a domain yet, go and get one NOW! in order to continue the Setup.
How to get a domain? simply you buy one! and it costs around 11$ per year, so it’s not that big deal!
We have a lot of DOMAIN REGISTRATION PROVIDERS where you can get a domain from like:
- Google Domain.
Here in the course, I will be using Namecheap to get my domain, but you can use any other service if you want, all work in the same way, and if you need any help, I will be here 🙂
2. VPS Server with Port 25 opened.
The second thing you will need is a VPS server. a public server to install & Setup SMTP on.
What is a VPS server?
If you don’t know what is a VPS server, simply its a computer (a server) running in the cloud that you buy from a Web Hosting or Cloud Services company. And it’s publicly accessible with a Public IP.
A VPS can be used to host your websites with higher performance, can be used to run a machine 24/7 in the cloud to do any task you want.
Note: If you are interested in learning how to host your own websites on a VPS server, you can
Anyway, In our case, we will be using the VPS Server for Building an SMTP server.
Port 25 open??
I mentioned that the VPS must have port 25 opened, what does this mean?
I don’t want to bother your head within deal technical stuff but in short. Any network service or software uses a certain port to communicate over the internet or network. Examples:
- Connecting remotely to another Windows Machine using RDP software works over port 3389.
- SQL database systems like MYSQL on our computer works over port 3306.
- Connecting to a Linux machine remotely to manage it with SSH, uses port 22.
- When you surf the web and open websites, we use port 80. and so on.
By default, all servers and computers have a firewall running which blocks all ports except the ones you want. so In order to use a certain service, we need to open that port in the firewall.
So, in our case, we are building an SMTP server, and the SMTP software or protocol communicates over port 25. so we need to have port 25 opened.
So when you get a VPS server, just make sure that the company allows Port 25 an don’t block it, because some companies do this to protect from spammers.
Here is a list of some companies that allows port 25 by default:
- Host wind.
- Digital Ocean*
- AWS (some accounts are blocked)
*Digital Ocean Sometimes block some accounts and restrict port 25, but in general they allow all ports.
Are there any other Companies?? yes, simply you can contact the support of any company you want and ask if they block any ports by default. if not, then perfect, you can go with it.
Feel free to use any VPS company you want, It’s up to you!
After you select your VPS company, just create a VPS Server with the following specifications:
- Ubuntu 18 x64 as your operating system
- You can start with 1 CPU/2 GB RAM (And resize later).
VPS Server basic configuration.
Now we have our new Ubuntu VPS server, Let’s prepare it for out Setup.
First, check your hostname:
If you don’t see a form of ANYTING.YOURDOMAIN.COM, then you need to change the hostname using the following command:
sudo hostname host.domain.tld
Where the host is anything you want. so in my case, my sample domain for this tutorial is mailknock.net, the command will look like this:
sudo hostname postal.mailknock.net
Map your domain name.
Now we have our VPS server and we set its name. Go to your Domain Provider and map your Domain to your VPS server. simply open DNS management zone and add a new A record like this:
Host: Postal points: YOUR SERVER IP.
*postal is in my case, you can choose whatever you want for your server name.
Setup Free SMTP Server
The VPS is ready, and we can start the installation process. So in order to setup SMTP Server on our VPS, we need to install an SMTP software.
Install Postal Free SMTP Software
Postal runs entirely using containers which means to run Postal you’ll need some software to run these containers. We recommend using Docker for this purpose but you can use whatever software you wish.
To install docker, run below commands. (NOTE: Each command starts with a – )
-sudo apt-get update -sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg -echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null -sudo apt-get update -sudo apt-get install docker-ce docker-ce-cli containerd.io -sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -sudo chmod +x /usr/local/bin/docker-compose -docker-compose --version
There are a few system utilities that you need to have installed before you’ll be able to run some of the Postal commands.
apt install git curl jq
Git & installation helper repository
Make sure you have git installed on the server by running below commands.
-git clone https://postalserver.io/start/install /opt/postal/install -sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal
You can run MariaDB in a container, assuming you have Docker, using this command. Copy and paste this all in Putty.
docker run -d \ --name postal-mariadb \ -p 127.0.0.1:3306:3306 \ --restart always \ -e MARIADB_DATABASE=postal \ -e MARIADB_ROOT_PASSWORD=postal \ mariadb
This will install your postal database on MariaDB.
RabbitMQ is responsible for dispatching messages between different processes. As with MariaDB, there are numerous ways for you to install this. For this guide, we’re just going to run a single RabbitMQ worker. Copy all the below as one command and paste on putty.
docker run -d \ --name postal-rabbitmq \ -p 127.0.0.1:5672:5672 \ --restart always \ -e RABBITMQ_DEFAULT_USER=postal \ -e RABBITMQ_DEFAULT_PASS=postal \ -e RABBITMQ_DEFAULT_VHOST=postal \ rabbitmq:3.8
Run the command below and replace
postal.yourdomain.com with the actual hostname you want to access your Postal web interface at. Make sure you have set up this domain with your DNS provider before continuing.
postal bootstrap postal.YOURDOMAIN.COM
Initializing the database
Run the following commands to create the schema and then create your first admin user.
postal initialize postal make-user
You’re now ready to run Postal. You can do this by running:
This will run a number of containers on your machine. You can use
postal status to see details of these components.
Installing WEB Client
You can use any web client to run postal on your web, but in this guide, we are going to use Caddy. Install it with an SSL using below command.
docker run -d \ --name postal-caddy \ --restart always \ --network host \ -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \ -v /opt/postal/caddy-data:/data \ caddy
Once this has started, Caddy will issue an SSL certificate for your domain and you’ll be able to immediately access the Postal web interface and login with the user you created in one of the previous steps.
I have divided it into three major parts. First, you’ll get to know the basics. In the second part, you’ll learn how to earn $67 per day at least.
To make money with Google AdSense, you need to create a website, get approved for AdSense, and start displaying ads. But let’s get to know the basics first.
Google AdSense: Things You Need to Know
In this section, I’ll help you understand the basics of Google AdSense. It includes what AdSense is, how it works, and much more. Skip this section only if you’re here for the AdSense tutorial.
What is Google AdSense
Google AdSense is a program run by Google through which you as a website publisher make money by displaying ads. These ads may be text, images, videos, or any interactive media. They are targeted to the site based on the content and audience.
There are tons of benefits of using AdSense ads on your site. For example, there’s no limit to how much you can make with AdSense. It doesn’t require any specific product for a user to sell. And it doesn’t require a complicated process to get started on the platform.
One of the biggest advantages of using AdSense is that you can manage your ads on several sites. There’s no charge to get into the program. So, if you’re looking to make money using your site, look no further than AdSense.
Google AdSense Metrics: What Are the KPIs
But how will you measure your success? Yes, you got it. Using the most important AdSense metrics or KPIs, you can measure the progress. Metrics refers to the values you’re measuring. Understanding them will help you act accordingly and earn money effectively.
Some of the most important Google AdSense metrics include:
- Ad Views
- Number of clicks
- Clickthrough Ratio (CTR)
- AdSense revenue per visit
- AdSense eCPM (Cost Per Mille)
And you can add all these metrics to your Google Analytics (GA) to measure your progress in real-time. But first, you need to link your AdSense account to your GA account. Here’s the giveaway; pick the right AdSense metrics for measuring your success.
The entire process of making money with Google AdSense is straightforward. It’s a brilliant way for publishers like you to make money using the power of quality content. Advertisers want to display their ads on Google and Google-approved sites. Google displays them and gets a little money in return. And you get your money as a publisher as well.
And this is how it works for you:
- You make ad spaces available on your site
- Advertisers bid to show ads in those ad spaces
- The highest paying ads get displayed on your site
- Your website visitors start seeing and clicking on those ads
- And you get paid by the Google AdSense program in return
As you can see, Google AdSense works on a cost-per-click revenue sharing basis. Isn’t it simple? Comment under this post if it’s not! And I’ll shed more light on the subject. But how much can you get paid?
How Much Does AdSense Pay
Google AdSense pays 68% of the revenue generated by the number of ad clicks on your site. Google keeps the remaining revenue. This is how mainly Google makes money. And just to give you a number, it has made $146.9 billion in 2020.
Website owners get 51% of the revenue generated by the number of ad clicks using Google Search. So how much will you earn with AdSense? It’s hard to say exactly. Why? It’s because your earnings depend on a lot of factors:
- Type of content
- CPM, CTR, and CPC
- Location of your audience
- Your ad placements and sizes
- The niche of your site
And more. However, you can use Google’s revenue calculator to estimate how much your site might earn. As per my experience, it lets you know a little more than you should really expect. Based on a number of factors, CPM (cost per 1000 ad impressions) can range from $0.3 to $2.
But if you create content around high CPC keywords, you may get as much as $50 revenue per click. And that’s huge!
For displaying AdSense ads, you need to apply for the program first. And for getting approved, you need to fulfil the minimum eligibility requirements for AdSense. For example, you must have your own unique content and abide by the AdSense policies.
Let me reveal a few more criteria for you to follow:
- You must be 18 years of age
- Own your site
- Your site must have unique content
- It must have clear navigation
- Don’t go for fake traffic
- Abide by Google Content Policies
- Respect the copyright law
- Use the AdSense supported language
- Have technical pages like Privacy, Contact or About pages
Also, your site should be at least six months old before you apply to AdSense. But it’s not a requirement. You can apply for AdSense anytime. But I recommend going for it once you have at least 100 visitors per day. The more, the better!
3 Types of Website for Quality AdSense Revenue
There are three types of sites that have quality AdSense revenue, according to Google. And it’s important to understand this because this is how you’ll monetize your site effectively. These website types include:
- A blog site
- Forum site
- Free online tool site
You need to create quality content regardless of the type of sites you choose. And you can use Google Keyword Planner to see if your kind of topic gets traction on Google Search. After that, you would want to create your site and run ads on it to make money.
AdSense Tutorial: How to Make Money With Google AdSense
This step-by-step guide will help you learn how to earn money with Google AdSense. From picking your niche to making bucks, I’ll outline everything for you here. Sounds exciting? Let’s get started right now.
Pick Your Niche
Picking your niche is probably the first step of starting almost anything online. Why? It’s because the general horizon is pretty too competitive for you. Also, in this noisy world, you want to have your voice heard.
So choose a niche or theme you want to create content around. Even the tools have specific niches.
This is how you can choose a niche for your blog:
- Explore yourself – pay attention to what you enjoy
- Do the market research and monitor the gaps
- And fill in those gaps by creating content
What ads will be shown on your website and how much money you’ll get depends on the ads displayed in your blog. Ads should be related to the contents of your site but not too general or specific either.
Buy Domain & Hosting
After you choose your niche, go for the perfect domain name and hosting as well. AdSense is a text-based Ad Network, so make sure your domain name has relevant keywords in it. But it’s not a must, of course.
Branding domain names work just fine. Choose a hosting service that’s reliable, fast, and secure. These are some of the top hosting services
I have been using their hosting services, and I vouch for their reliability. Connect the domain name with your hosting account. And set up WordPress to manage your blog’s content.
Don’t forget to benefit from these top WordPress plugins and tools to increase your site’s functionality. After that, you would want to start creating awesome content.
Start Creating Quality Content
Content is the backbone of all the businesses in the world. Now that your site is ready with all the necessary tools, it’s time to start creating quality content.
You don’t want your blog visitors bouncing away in just a few seconds, right? So how do you create quality content?
By following these tips:
- Research and back up your claims with data or sources
- Write in a way that’s easy to understand
- Break up your content into shorter, readable paragraphs
- Use images, infographics, and videos to break the monotony and add value
- Stick to a publishing schedule
Your blog will start getting traction. This is how you start a publishing business online. Now is the time to get started with Google AdSense.
Get Started with Google AdSense
Well, it’s quite easy. Just create an AdSense account and add the AdSense code to your blog. This is how it will look like:
- Read and implement the Google AdSense requirements
- Go to Google AdSense
- Click on ‘Get Started’
- Choose your payment country
- Read and accept the terms and conditions
- Start using AdSense
Some people find it challenging to get approved for AdSense ads. Let’s understand why and how you can avoid disapproval from Google.
Get Your Site Approved for AdSense
If you are honest with your job, it’s unlikely for your blog to get disapproved from Google AdSense. But for that, you must know how things work here. Let me share a few tips on avoiding any disapproval from Google.
- Provide all the correct information when applying for Google AdSense
- Create high-quality content that adds value to your readers
- Build some must-have pages like about, contact, and privacy
- Don’t use any copyrighted content at all
- Ensure your website doesn’t have illegal or pornographic content
- Remove other ads when applying for AdSense
- Create at least 30 posts before your apply (it’s not a must but a recommendation)
Wait after you’ve done everything right. Google AdSense has never rejected me. And the tips given above are the reasons for that. After getting approval, your site will start making money.
Earn More Money With Your AdSense Site
Google AdSense is a great way to monetize your website and start making money. But it’s not just enough to place the ads on your site and wait for the money to start rolling in.
Here are a few things you can do to increase your ad revenue.
Place AdSense ads on high-traffic pages.
Place AdSense ads on pages that get a lot of traffic. This will ensure that as many people see your ads as possible. The more people who see your ads, the more money you’ll make.
Select appropriate ad formats and sizes
AdSense provides a variety of ad formats and sizes to choose from. Select the ad formats and sizes that work best for your site. This will help you maximize your AdSense earnings.
Place ads above the fold
It’s important to place your AdSense ads to be seen easily. Placing the ads above the fold will ensure that many people see them as possible.
Use AdSense optimized themes.
There are several AdSense optimized themes available that you can use on your website. These themes have been designed to help you get the most out of your AdSense ads.
Place ads in appropriate locations
Place your AdSense ads in appropriate locations on your website. AdSense allows you to place ads on various locations, including the header, footer, sidebar, and within the content. Experiment with different locations to see which ones work best for you.
Create AdSense optimized content
Google AdSense is a text-based Ad Network. So it’s important to create AdSense optimized content. This means using the right keywords and writing content relevant to your AdSense ads.
Use AdSense channels
AdSense channels allow you to group your AdSense ads. This makes it easier to track your AdSense performance and identify which ads perform the best.
Try new AdSense ad formats.
Google AdSense has AdSense ad formats that you can use on your AdSense optimized content. Experiment with new layouts and ad units to help you create a better AdSense experience for your users.
Use these AdSense optimization tips to increase your AdSense revenue.
- Monitor your progress and keep improving yourself
- Do the A/B testing for the ad units
- Optimize the color of your Google AdSense ads
- Implement responsive ads
- Work on your niche and the quality of content