Postal is open source alternative to sendgrid and mailgun

Postal Transactional Email Service

Full Featured On Premise Alternative to Sendgrid and Mailgun

Postal is a mail server software with HTTP API for easy integration with web apps. Use postal as central transactional email service to improve email tracking.

 

A Secure Mail Server is an important element within the internet email system, which acts as a message transfer agent or mail relay software to transfer email messages from one computer to another computer using smtp.

Postal Mail Server is one of the popular email server software amongst the email servers. Its a complete and fully featured mail server for use by websites and web servers. Its an alternative to Sendgrid, Mailgun or Postmark but open source and ready to run on you own servers.

Spam and virus is one of the biggest problems of the email system, and Postal mail server supports integration with SpamAssassin and Amavis for effective filtering of unwanted content and spam messages.

It provides an HTTP API like Sendgrid and Mailgun, which makes it an easy job to integrate with web applications. It also supports smtp server for integration with existing applications and systems.

Postal is 100% free and open source you can download the source code, modify it as per your requirements and enhance it by adding additional features. You can scale it as far as you like.

Its very easy to to use and install on Ubuntu because of automated installation process. Configuration is very simple and clean and you can control the software to the full potential using configurations. Clear and simple documentation is one of the pros of the Postal Mail Server.

Postal mail server allows you to store and examine all the send and receive messages for better control to check what exactly was sent. It also supports IP pools for higher volume email sending.

System Requirements

There are a couple of pre-reqs for running Postal. This page outlines how to quickly install the things needed on an Ubuntu 16.04 server.

Install Ruby

sudo apt install software-properties-common
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt update
sudo apt install ruby2.3 ruby2.3-dev build-essential

Install MySQL

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirrors.coreix.net/mariadb/repo/10.1/ubuntu xenial main'
sudo apt update
sudo apt install mariadb-server libmysqlclient-dev

Some additional configuration may be required to optimise your MySQL server. This is outside the scope of this documentation.

Install RabbitMQ

curl -sL https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
sudo add-apt-repository 'deb http://www.rabbitmq.com/debian/ testing main'
sudo apt update
sudo apt install rabbitmq-server

Install Node.js

sudo apt install nodejs

Install Git

sudo apt install git

Features

This is a list of features (in no real particular order) of things that Postal can do.

General features

  • Support for multiple organizations with mail servers & users within.
  • Graphs and stats showing volume of incoming & outgoing mail.
  • Access to view historical messages.
  • Access to view the full outgoing & incoming message queue.
  • Set up webhooks to receive live information about delivery information in realtime. Full access to the last 7 days of webhook requests are also stored for debugging purposes.
  • Built-in DNS checking & monitoring to ensure domains you send mail from are configured correctly for maximum deliverability.
  • Per server retention configuration to set how long messages should be kept in the database and the maximum size to keep on disk.
  • Complete logging so delivery issues can easily be identified.
  • Mail server wide search tools to find messages that need investigation.

Outgoing e-mails

  • Send messages to the SMTP server or using the HTTP API.
  • Manage multiple credentials per server.
  • Support for DKIM signing of outbound messages.
  • Enable development to hold messages in Postal without actually delivering them to recipients (message can be viewed in the Postal interface).
  • Built-in suppression list to avoid sending mail to recipients that don't exist or can't accept e-mail.
  • Click and open tracking to keep track of when recipients open your e-mails and click links within them.
  • Configure per-server send limits to avoid abuse on mail servers.
  • Management of multiple pools of sending IP addresses.
  • Configure different senders or recipients to have mail delivered from certain IP addresses.
  • Mail tagging so certain e-mails can be given a tag to allow them to be grouped when needed. For example, you may tag receipts or password-reset e-mails as such.

Incoming e-mails

  • Ability to forward incoming e-mail to HTTP endpoints.
  • Ability to forward incoming e-mail to other SMTP servers.
  • Ability to forward incoming e-mail to other e-mail addresses.
  • Spam & thread checking with SpamAssassin and ClamAV with configurable thresholds and different methods for dealing with spam messages.

Installation Instructions

To get up and running quickly, you can follow these steps. You'll have a basic Postal installation ready to go in in less than 10 minutes.

  1. Provision a new server running Ubuntu 16.04 LTS. This can be from any provider. We use Digital Ocean for testing.
  2. Login to your new server as root and run the following command to install Postal:
     curl https://raw.githubusercontent.com/atech/postal/master/script/install/ubuntu1604.sh | sh 
  3. Create a new user for you to login with:
     curl https://raw.githubusercontent.com/atech/postal/master/script/install/ubuntu1604.sh | sh 
  4. Access your Postal installation in a web browser. You'll start with an SSL warning because the certificate isn't valid but you can fix that later.
  5. You should also be able to access the SMTP server on port 25.

Next steps

Now your installation is active, there are a few things you can look at doing next.

  1. Change your MySQL & RabbitMQ passwords. By default they are set to p0stalpassw0rd and the MySQL root password is blank.
  2. Replace the self signed certificates in /etc/nginx/ssl/postal.cert with something proper. You can use something like CertBot to get you one for free through Let's Encrypt.
  3. Set up your DNS appropriately, see the guide for full details.
  4. Configure spam & virus checking, see the guide for full details
  5. Configure click/open tracking, see the guide for full details.
  6. Configure Postal to start on boot