Postal
Getting Started

DNS configuration

To work properly, you'll need to configure a number of DNS records for your Postal installation. Review the table below and create appropriate DNS records with your DNS provider. You will need to enter the record names you choose in your postal.yml configuration file.

We'll assume for the purposes of this documentation you have both IPv4 and IPv6 available to your server. We'll use the following values in this documentation, you'll need to replace them as appropriate.

  • 192.168.1.3 - IPv4 address
  • 2a00:1234:abcd:1::3 - IPv6 address
  • postal.example.com - the hostname you wish to use to run Postal

A Records

You'll need these records for accessing the API, management interface & SMTP server.

Hostname Type Value
postal.example.com A 192.168.1.3
postal.example.com AAAA 2a00:1234:abcd:1::3

The domain name of the email server requires an MX record pointing to postal.example.com. Of course, as an alternative, you can also specify some dedicated subdomains:

Hostname Type Value
mx1.postal.example.com A 192.168.1.3
mx1.postal.example.com AAAA 2a00:1234:abcd:1::3
mx2.postal.example.com A 192.168.1.3
mx2.postal.example.com AAAA 2a00:1234:abcd:1::3

SPF Record

You can configure a global SPF record for your mail server which means domains don't need to each individually reference your server IPs. This allows you to make changes in the future.

Hostname Type Value
spf.postal.example.com TXT v=spf1 ip4:192.168.1.3 ip6:2a00:1234:abcd:1::3 ~all
You may wish to replace ~all with -all to make the SPF record stricter.

Return Path

The return path domain is the default domain that is used as the MAIL FROM for all messages sent through a mail server. You should add DNS records as below.

Hostname Type Value
rp.postal.example.com MX 10 postal.example.com
rp.postal.example.com TXT v=spf1 a mx include:spf.postal.example.com ~all
postal._domainkey.rp.postal.example.com TXT Value from postal default-dkim-record

Route domain

If you wish to receive incoming e-mail by forwarding messages directly to routes in Postal, you'll need to configure a domain for this just to point to your server using an MX record.

Hostname Type Value
routes.postal.example.com MX 10 postal.example.com

Click and Open Tracking

If you would like to make use of Click and Open Tracking then you should set up these records however you also need to make changes to not show an error page to them. You can read more on the Click & Open Tracking page.

Hostname Type Value
track.postal.example.com A 192.168.1.3
track.postal.example.com AAAA 2a00:1234:abcd:1::3

Example Postal Configuration

In your postal.yml you should have something that looks like the below to cover the key DNS records.

dns:
  mx_records:
    - mx1.postal.example.com
    - mx2.postal.example.com
  spf_include: spf.postal.example.com
  return_path_domain: rp.postal.example.com
  route_domain: routes.postal.example.com
  track_domain: track.postal.example.com