Install and Configure Postal Mail Server on Ubuntu 18.04 LTS

Having a fully featured email solution is a basic requirement of any business, institution or company. Here we will discuss the installation of Postal Mail Server on Ubuntu 18.04 LTS. Postal is a mail delivery platform for both incoming and outgoing emails. It is a complete and fully featured mail server that should satisfy all your websites & web servers email requirements.

Install Postal Mail Server on Ubuntu 18.04 LTS

The installation of Postal Mail Server on Ubuntu 18.04 is not as complicated as others say. By sparing some minutes and following below few steps, you should have Postal Mail Server running on Ubuntu 18.04 server.

Step 1: Update your system

Like all other installation guides available on Computingforgeeks, we start the installation by ensuring our system is updated.

Generate and Modify Postal Configuration files.

Generate Postal Configuration files using the command:

# postal initialize-config
Created example config file at /opt/postal/config/postal.yml
Created new private key for Let's Encrypt
Created new signing key for DKIM & HTTP requests
Created new private key for default fast server TLS connections
Created new self signed certificate for default fast server TLS connections

Open Postal configuration file.

vim /opt/postal/config/postal.yml

At the minimum, have the following settings:

web:
# 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
main_db:
# Specify the connection details for your MySQL database
host: localhost
username: postal
password: StrongPassword
database: postal
message_db:
# Specify the connection details for your MySQL server that will be house the
# message databases for mail servers.
host: localhost
username: postal
password: StrongPassword
prefix: postal
rabbitmq:
# Specify the connection details for your RabbitMQ server.
host: 127.0.0.1
username: postal
password: StrongPassword
vhost: /postal
dns:
# Specifies the DNS record 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:
- mx.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: [email protected]

Edit the file to fit your Postal settings.

For DNS, you can use DnsMasq if you’re looking for a self-hosted simple DNS solution.

Create your initial admin user

# postal make-user
Postal User Creator
Enter the information required to create a new Postal user.
This tool is usually only used to create your initial admin user.
E-Mail Address : [email protected]
First Name : Admin
Last Name : User
Initial Password: : ********
User has been created with e-mail address [email protected]