Search
Close this search box.

Postal SMTP Server Send Bulk email Free mail Server in 2024

postal Smtp

Table of Contents

Postal SMTP refers to the Simple Mail Transfer Protocol tailored to suit the needs of postal services and professional mail carriers. It enhances the standard SMTP protocol with additional features to handle the delivery of mail. In this article, we will dive into Postal SMTP, a modern and efficient SMTP server that can help improve your email delivery rates.

What is Postal SMTP?

Postal SMTP is an open-source mail delivery platform designed to handle high volumes of email traffic. It is an effective and adaptable solution that can be utilized as a standalone SMTP server or integrated with current email infrastructure. With Postal SMTP, you can ensure that your emails are delivered quickly, securely, and reliably.

How does Postal SMTP Work?

Postal SMTP works by processing and delivering emails to their intended recipients. It does this by serving as a go-between for the recipient’s mail server and the sender’s email client. Postal SMTP processes incoming emails, applies custom routing rules (if any), and then forwards the email to the recipient’s mail server for delivery.

Key Features of Postal Server

Open Source Platform

Being an open-source platform, Postal Server has the benefit of being free to use and easily customizable to meet your individual needs..

Easy Integration with Existing Infrastructure

Postal Server can be easily integrated with your existing email infrastructure, making it a versatile solution for various email-related tasks.

High Volume Email Handling

Postal Server is designed to handle high volumes of email traffic efficiently, making it an ideal solution for businesses and individuals with heavy email communication.

Components of Postal SMTP

Postal Mail SMTP is built on several components that work together seamlessly to ensure efficient email delivery. These components include:

  • Message Transfer Agent (MTA): The MTA is responsible for transferring emails between mail servers. It follows the SMTP protocol to send and receive messages.
  • Message Queue: The message queue stores emails that are waiting to be delivered. Postal SMTP efficiently manages this queue to ensure that emails are sent as quickly as possible.
  • SMTP API: The API allows developers to integrate Postal SMTP with their applications, enabling them to send emails programmatically.

Setting up Postal SMTP Server

Prerequisites

Before you can set up Postal SMTP, you need to ensure that you have the necessary hardware and software.

Required Hardware

A dedicated server or virtual private server (VPS Server “open port 25”) with 20 GB of free disk space and a minimum of (2 GB RAM).
A domain name and an SSL certificate.

Required Software

A supported Linux distribution, such as Ubuntu.
Ruby, MySQL, and RabbitMQ installed on your server.

Installation Process

Step-by-Step install Postal Guide

You must establish a connection to the server before you can begin the installation process. Get an SSH client for this reason if you are online. Putty is one such SSH client. However, if you are using Linux or a Mac, open the terminal and enter ssh@xx.x.x.xx, where xx.x.x.xx is the IP address of your server.

First of all switch to root user

				
					sudo -i
				
			

After that update and upgrade your Ubuntu

				
					apt update -y
apt upgrade -y
				
			

Next set up the hostname. Replace “example.com” with your domain name.

				
					hostnamectl set-hostname postal.example.com
				
			

Updating DNS records

Create an A record for postal.example.com by logging in to the domain registrar.

Let’s now start the installation.

Note that this installation manual is brand-new.

Installing Docker and Docker-Compose

Recently, the postal team migrated to the Docker operating system to simplify end-user installation. As a result, we first need to install Docker and Docker-Compose. In-depth explanations of what Docker is, Docker-compose, and installation procedures have previously been provided. To learn docker in detail, feel free to read the article.

Installing Docker

Install a few items to get the Docker repository up and running first.

				
					sudo apt-get install ca-certificates curl gnupg lsb-release
				
			

Add the official GPG key for Docker.

				
					sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
				
			

Now, use the following commands to install the Docker repository.

				
					echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
				
			

next upgrade the operating system

				
					sudo apt-get update -y
				
			

Finally, execute the following command to install containerd and the Docker Engine.

				
					sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
				
			

Installing Docker-Compose

First of all download the current stable release of Docker Compose:

				
					curl -SL https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
				
			

The permission to binary should then be updated.

				
					sudo chmod +x /usr/local/bin/docker-compose
				
			

Additionally, build a symlink.

				
					sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
				
			

Finally, verify the installation of docker-compose

				
					docker compose version
				
			

The docker-compose version will be displayed. If you observe anything else, something is amiss.

Installing Additional Prerequisites for Postal SMTP

You must install a few other packages, such as Git, MariaDB, RabbitMQ, etc.

Let’s install them one at a time.

Setup git and git curl first

				
					apt install git -y
apt install git curl jq
				
			

Clone the postal helper repository after that.

				
					git clone https://postalserver.io/start/install /opt/postal/install
sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal
				
			

Installing MariaDB

In order to store all mails and other crucial configuration information, Postal needs a database engine. You must enter login information that gives you complete access to all databases, including the ability to create and delete new ones. For each mail server you create, Postal will automatically provision a database.

If you have Docker, you can use the following command to execute MariaDB in a container:

				
					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
				
			

Installing RabbitMQ

Message distribution across several processes, in this case, the workers, is handled by RabbitMQ. There are several ways for you to install this, just like MariaDB. We’re only going to use one RabbitMQ worker for this tutorial.

				
					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
				
			

Installing Postal

The postal repository that you previously installed can create various configuration files for use.

Execute the next command.

				
					postal bootstrap postal.yourdomain.com
				
			

The command shown above creates 3 files. Our focus is on postal.yml 

You must modify postal.yml and make the necessary adjustments. But first, set up an editor. I advise downloading nano.

				
					apt install nano -y
				
			

To edit postal right now.Run the yml command below.

				
					nano /opt/postal/config/postal.yml
				
			
				
					You'll see output that resembles this.


# The host that the management interface will be available on
host: Postal.example.com
# The protocol that requests to the management interface should happen on
protocol: https

web_server:
# Specify configuration for the Postal web server
bind_address: 127.0.0.1
port: 5000

smtp_server:
# Specify configuration to the Postal SMTP server
port: 25

logging:
# Specify options for the logging
stdout: true

main_db:
# Specify the connection details for your MySQL database
host: 127.0.0.1
username: root
password: postal
database: postal

message_db:
# Specify the connection details for your MySQL server that will be house the
# message databases for mail servers.
host: 127.0.0.1
username: root
password: postal
prefix: postal

rabbitmq:
# Specify connection details for your RabbitMQ server
host: 127.0.0.1
username: postal
password: postal
vhost: postal

dns:
# Specify the DNS records that you have configured. Refer to the documentation at
# https://github.com/atech/postal/wiki/Domains-&-DNS-Configuration for further
# information about these.
mx_records:
- postal.example.com
smtp_server_hostname: postal.example.com
spf_include: spf.postal.example.com
return_path: rp.postal.example.com
route_domain: routes.postal.example.com
track_domain: track.postal.example.com

smtp:
# Specify an SMTP server that can be used to send messages from the Postal management
# system to users. You can configure this to use a Postal mail server once the
# your installation has been set up.
host: 127.0.0.1
port: 2525
username: # Complete when Postal is running and you can
password: # generate the credentials within the interface.
from_name: Postal
from_address: postal@example.com

rails:
# This is generated automatically by the config initialization. It should be a random
# string unique to your installation.
secret_key: b73a7e04571431c601d19a7688418eb395d059c1ada525dcfd337e978236be759e278367fb7c6773be625265d3d235ee98b4f8405957e4
				
			

Cross-check your configuration file, then press CTRL + X to save and close it.

Creating a Database

It’s really simple to initialize a database; simply run the following command, and you’ll see that database tables are being created in the output.

				
					postal initialize
				
			

Then it’s time to construct postal infrastructure

				
					postal make-user
				
			

The admin user’s name, email address, and password will be required of you. After typing the response, move on to the next action.

Starting & Running Postal

Additionally, running postal is really simple. Simply execute the next command.

				
					postal start
				
			

You can check the status of postal

				
					postal status
				
			

Installing Caddy

You will need to set up a web proxy in order to handle SSL termination and all web traffic. You can use nginx, Apache, HAProxy, or whatever else you choose here, but in this example, we’re going to utilize Caddy. It’s a fantastic tiny server that is incredibly simple to set up and takes very little configuration.

				
					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
				
			

Go to http://mail.yourdomain.com right away and log in with the admin credentials. The admin page will appear similar like this.

Benefits of Using Postal SMTP

Reliability

Postal SMTP is designed to handle high volumes of email traffic, ensuring that your emails are delivered quickly and reliably. It uses a robust message queue system to manage email delivery, preventing issues such as server overload or email loss.

Scalability

Postal SMTP can easily scale to handle growing email volumes. As your business grows and your email traffic increases, Postal SMTP can be scaled up to accommodate the increased load without compromising performance.

Security

Postal SMTP supports SSL/TLS encryption, ensuring that your emails are transmitted securely between mail servers. Additionally, it has built-in features to help protect your server from spam, such as rate limiting and automatic IP blocking.

Postal SMTP Use Cases

Transactional Emails

Postal SMTP is perfect for sending transactional emails, such as order confirmations, password resets, and account notifications. It ensures that these critical messages are delivered quickly and reliably, improving the user experience for your customers.

Email Marketing Campaigns

Postal SMTP can be used to send large-scale email marketing campaigns. Its powerful features, such as custom routing rules and API integration, make it easy to manage and track the success of your campaigns.

Email Notifications

Postal SMTP is also ideal for sending email notifications, such as alerts and updates, to your users. Its quick and dependable transmission makes sure that your users are informed and current at all times.

Conclusion

Postal SMTP is a powerful and flexible mail delivery platform that can help you improve your email delivery rates. With its reliable, scalable, and secure features, Postal SMTP is an excellent choice for businesses and individuals looking to enhance their email infrastructure. You can ensure that your emails are sent swiftly, safely, and effectively by configuring Postal SMTP, which will eventually enhance the experience for your users.

Postal smtp FAQs

Yes, Postal SMTP is an open-source platform, which means it is free to use. You only need to cover the costs associated with your server and domain.

Yes, Postal SMTP can be configured to handle email traffic for multiple domains. You can set up custom routing rules for each domain, ensuring that your emails are delivered correctly.

Postal SMTP has built-in features to help protect your server from spam and security threats. It supports SSL/TLS encryption, rate limiting, and automatic IP blocking to keep your email infrastructure secure.

Yes, Postal SMTP provides detailed statistics and tracking information to help you monitor the success of your email campaigns. You can use this data to optimize your campaigns and improve your email delivery rates.

Setting up Postal SMTP requires some technical knowledge, as you need to configure your server, install necessary software, and edit configuration files. However, once set up, Postal SMTP is easy to manage using its web-based interface or API.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe for fresh tips & top articles
Recent Post