How to set up DNS records in Digital Ocean to enable external mailhost (SMTP)

August 25, 2016 253 views
DNS Email

Hi There,

I want to set the DNS records so they point to the mailserver that uses SMTP.

I am running a droplet on Digital ocean with IP dro.p.l.t
I am running a mailserver on a shared host with ip mai.l.s.v

The SMTP server settings that I got from my shared host are:

SMTP server: mail.axc.nl
SMTP port: 465
SSL: on
password for SMTP is needed

I have set the following DNS records in Digital Ocean:

DNS records pointing to Droplet:

domain.nl. IN SOA ns1.digitalocean.com. hostmaster.domain.nl. 1472136158 10800 3600 604800 1800
domain.nl. 1800 IN NS ns1.digitalocean.com.
domain.nl. 1800 IN NS ns2.digitalocean.com.
domain.nl. 1800 IN NS ns3.digitalocean.com.
domain.nl. 1800 IN A dro.p.l.t
www.domain.nl. 1800 IN A dro.p.l.t
*.domain.nl. 1800 IN A dro.p.l.t

DNS records pointing to SMTP Mailserver:

mail.domain.nl. 1800 IN A mai.l.s.v
domain.nl. 1800 IN MX 10 mail.axc.nl.
domain.nl.domain.nl. 1800 IN TXT "v=spf1 a mx ip4:mai.l.s.v a:spf.spamexperts.axc.nl -all"
smtp.domain.nl. 1800 IN A mai.l.s.v

Are these the correct settings?

Hope someone can help me out. Many thanks!

2 Answers

Overall it looks like these settings should work. Are you encountering errors after setting this up? If so can you share the errors or issues you're running into?

Hi Ryan,

Thank you for your quick response!

I am not able to send and receive emails on the email host (info@domain.nl). Could it have something to do with my SPF record? Should I use mail.axc.nl in stead of mail.domain.nl ?

When I send a mail to my google apps email account | get the following error:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

info@mygoogleappsmail.nl

Reporting-MTA: dns; vserver50.axc.nl

Action: failed
Final-Recipient: rfc822;info@mygoogleappsmail.nl
Status: 5.0.0
Onderwerp test
Afzender info@domain.nl
Ontvanger info@mygoogleappsmail.nl
Datum Vandaag 09:40
Return-path: info@domain.nl
Received: from [127.0.0.1] (port=41055 helo=vserver50.axc.nl)
by vserver50.axc.nl with esmtpa (Exim 4.86)
(envelope-from info@domain.nl)
id 1beHBK-0007Ol-PV
for info@mygoogleappsmail.nl; Mon, 29 Aug 2016 09:40:34 +0200
MIME-Version: 1.0
Date: Mon, 29 Aug 2016 09:40:34 +0200
From: info@domain.nl
To: info@mygoogleappsmail.nl
Subject: test
Message-ID: 7b3913566acbf55bff7af7ca03e23797@domain.nl
X-Sender: info@mygoogleappsmail.nl
User-Agent: Roundcube Webmail/1.1.3

Have another answer? Share your knowledge.