How to Install Postal Mail Server on Ubuntu 18.04 | 16.04

0
Install Postal Mail Server on Ubuntu
Install Postal Mail Server on Ubuntu

1. What is Postal Mail Server ?


2.How To Install Postal Mail Server
?

What is Postal all about?

Postal was developed by aTech Media to serve its own mail processing requirements. It includes everything you need to start sending and receiving emails in your own web apps.

-Send email from your sites and servers

-Run on your own hardware

-Easy to set up with comprehensive docs

-Spam and virus checking

-Message Retention

-IP pools

How To Install Postal Mail Server on Ubuntu

  1. Domain
  2. Vps Server
  3. Software Need
  4. Install Process

1. Domain

When you send emails, you will be sending from an email address like this one:

i recommend to buy high reputation domain.

We have a lot of DOMAIN REGISTRATION PROVIDERS where you can get a domain from like:

Godaddy.
Namecheap.
freenom.
Enom.
Google Domain.

2. Vps Server

The second thing you will need is a VPS server. a public server to install & Setup SMTP.

In My Post i Am Using Digitalocean Vps Server.

Here is a list of some companies:

  1. Host wind.
  2. Contabo.
  3. Interserver.
  4. OVH.
  5. Digital Ocean*
  6. AWS 

3. Software Need

-Putty

PuTTY is a free and open-source terminal emulator, serial console and network file transfer application.

-Winscp

WinSCP is a free and open-source SFTP, FTP, WebDAV, Amazon S3 and SCP client for Microsoft Windows.

-Notepad++

Notepad++ is a text and source code editor for use with Microsoft Windows.

4. Install Process

:-First Create a Vps Server.

  1. Go to Digitalocean And Create A Droplet
digitalocean Droplet

2. Choose an image

digitalocean Choose an image

3.Choose a plan (i am using $10 machine)

digitalocean Choose a plan

4.Choose a hostname

In Hostname Put Your Domain Name. i am Using Server.icsindiahost.tk. server is sub domain. Server.yourdomain.com

digitalocean Choose a hostname

5.Now Click Create droplet. Few Minutes After You Receive a Email.

digitalocean email

:-Install Postal Mail Server Using Putty

  1. First Open Putty Software And Put Your Server Ip Address.
putty

2. Now Login as Root User And Create New Password. You Not Understand Then Watch My YouTube Video.

root login

3. Now Run This Simple Command line.

hostname -f

sudo hostname xyz.com
-------xx-------------
sudo apt update
sudo apt install mariadb-server libmysqlclient-dev
-------xx-------------
sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
-------xx-------------
sudo mysql_secure_installation

sudo mysql -u root -p

Exit;

-------xx-------------
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:brightbox/ruby-ng

-------xx-------------
sudo apt update
sudo apt install ruby2.3 ruby2.3-dev build-essential

-------xx-------------
wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -
echo "deb https://packages.erlang-solutions.com/ubuntu bionic contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
sudo apt-get update
sudo apt-get install erlang
sudo apt-get update

-------xx-------------
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | sudo bash
sudo apt-get install rabbitmq-server

-------xx-------------

sudo systemctl stop rabbitmq-server
sudo systemctl start rabbitmq-server
sudo systemctl enable rabbitmq-server

-------xx-------------

sudo rabbitmqctl add_vhost /postal
sudo rabbitmqctl add_user postal p0stalpassw0rd
sudo rabbitmqctl set_permissions -p /postal postal "." "." ".*"

-------xx-------------

sudo apt install nodejs
sudo apt install git

-------xx-------------
sudo mysql -u root -p 
CREATE DATABASE postal CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;

CREATE USER 'postal'@'127.0.0.1' IDENTIFIED BY 'p0stalpassw0rd';

GRANT ALL ON `postal`.* TO `postal`@`127.0.0.1` IDENTIFIED BY "p0stalpassw0rd";
GRANT ALL PRIVILEGES ON `postal-%` . * to `postal`@`127.0.0.1`  IDENTIFIED BY "p0stalpassw0rd";

FLUSH PRIVILEGES;
EXIT;


-------xx-------------
sudo useradd -r -m -d /opt/postal -s /bin/bash postal
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/ruby2.3

-------xx-------------
sudo gem install bundler
sudo gem install procodile
sudo gem install nokogiri -v '1.7.2'

-------xx-------------
sudo mkdir -p /opt/postal/app
sudo wget https://postal.atech.media/packages/stable/latest.tgz
sudo tar xvf latest.tgz -C /opt/postal/app
sudo chown -R postal:postal /opt/postal
sudo ln -s /opt/postal/app/bin/postal /usr/bin/postal

-------xx-------------

cd /opt/postal/app
bundle update mimemagic
bundle install
cd ~
-------xx-------------

postal bundle /opt/postal/vendor/bundle
postal initialize-config
postal initialize

-------xx-------------
postal make-user
-------xx-------------
sudo -u postal postal start
sudo -u postal postal status
-------xx-------------
sudo apt install nginx
sudo cp /opt/postal/app/resource/nginx.cfg /etc/nginx/sites-available/default
-------xx-------------
sudo mkdir /etc/nginx/ssl/
sudo openssl req -x509 -newkey rsa:4096 -keyout /etc/nginx/ssl/postal.key -out /etc/nginx/ssl/postal.cert -days 365 -nodes


-------xx-------------
/etc/nginx/sites-available  default file
-------xx-------------
sudo systemctl stop nginx 
sudo systemctl start nginx
-------xx-------------
postal restart


5. And this command will ask you to Enter Your Name, Email, and password. so write it down and press Enter.

Postal is Installed

:-Configure Postal SMTP

  1. Run Ip Address On Web Browser. After Skip The Ssl Alert Message
postal Mail server login

2.Now Put Your Username And Password Then Click Login . After Login Create the first organization. Put Any And Click Create organization.

create the first organization

3. Now Build Your First Mail Server. Put Any Name And Select Mode Live Then Click Build Server.

postal mail server

4. Now Add Your Domain Name.

postal mail server add domain

5. Then, Postal will show you the Domain page with the records that you need to configure.

postal mail server spf and dkim

6. You Not Know How To configure SPF And Dkim records Then Watch My Youtube Video.

7. Now Click Credentials And Create Smtp. You Need API Then Select TYPE API.

Postal Mail Server Smtp

8. Simple, Go to SMTPER.NET and enter your server details as follows:[Test Email]

  • SMTP Host: Your Server IP or Domain.
  • Port: 25 or 2525
  • Login: The User You entered in credentials.
  • Password: The User Password.
postal mail server smtp
postal mail server smtp

That’s it! I hope everything was simple and clear. we finish setting up the Free SMTP Server!