Skip to content

Domains & DNS Configuration

Charlie Smurthwaite edited this page Aug 22, 2018 · 11 revisions

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 on your DNS server. You will need to enter the record names you choose in your postal.yml configuration file.

For this documentation we will assume you have allocated some IP addresses:

  • - IPv4 address for management, SMTP and other traffic
  • - IPv4 address for the "fast" web server (used for tracking)
  • 2a00:1234:abcd:1::3 - IPv6 address for management, SMTP and other traffic
  • 2a00:1234:abcd:1::4 - IPv6 address for the "fast" web server (used for tracking)

We will assume that you want to set up everything on the domain.

  • A Records - you'll need these records for accessing the API, management interface & SMTP server.         IN    A         IN    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.     IN    TXT   "v=spf1 ip4: ip6:2a00:1234:abcd:1::/64 ~all"
  • 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.      IN    A      IN    AAAA  2a00:1234:abcd:1::3      IN    MX    10      IN    TXT   "v=spf1 a mx ~all"

    In addition to these, you'll need to enter a DKIM record. This differs depending on your installation. When the installation is initialised a key will be generated automatically. You can see the appropriate value for this record by running postal default-dkim-record on the host.      IN    TXT   "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzipajyThkwNmZs0cBjghowttXe1FhxplkBljpk90tzCfkFWJ+QHsUCNGmsFXhRALBol8cC4YHks5R9cjvGsphEM8C4jV2Nef5TxofAXuOpV5tbI0H3pBQY1cmP6I82VDAchsmfADCW/3XIFCPpYvnRFVlDnEQcuk4Ghl9LarhCZQqP8x7b38sPV6fcTrWL0HnNxEGAxRDiNWzGD1nEkp/m1o4STC7H8NvDbuZGkopmciDEE8cDxTbHGv7KRd72W5JewEx43nbtFUOEiv6D/otwT1xN2XF3JkOBtD3VcH+KB/zB6wwxJptNamw5kunskUoWwZwN488CpxxRF5tKPhCwIDAQAB;"
  • Route domain - if you wish to receive incoming e-mail by sending messages directly to created routes in Postal, you'll need to configure a domain for this just to point to your MX servers.   IN    MX    10
  • Tracking domain - to configure click & link tracking you'll need to configure a domain that will be used in rewritten links. This will point to the second IP address on your host. The second IP is used to distinguish traffic which is aimed at the management web server and that destined for the tracking web server.    IN    A    IN    AAAA  2a00:1234:abcd:1::4

In your postal.yml you should have something like that looks like the below,.

  dkim_identifier: postal
  domain_verify_prefix: postal-verification
  custom_return_path_prefix: psrp
You can’t perform that action at this time.