By arm332
Following this tutorial How To Set Up a Host Name with DigitalOcean, my droplet is setup as:
Droplet IP: 1.2.3.4 Droplet name: example1
Domain: example1.com
A record name: @ A record IP: 1.2.3.4 A record: example1.com. 1800 IN A 1.2.3.4
CNAME name: * CNAMe hostname: EXAMPLE1.COM. CNAME: *.example1.com. 1800 IN CNAME example1.com.
$ hostname example1
$ hostname -f example1
$ cat /etc/hosts 127.0.0.1 localhost 127.0.0.1 example1
I know is tricky, but I will add a MX record mail1.example1.com and setup Postfix, Dovecot etc. on the same droplet.
Can I just add to /etc/hosts, something like “1.2.3.4 mail1.example1.com mail1” or that will not work?
Will I get in trouble with that DNS wildcard A record?
Thank you, André
PS: I’m not using IPv6
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello,
You should be fine setting up the hostname record you offered. You will also want to likely name the droplet mail1.example1.com as well, so your PTR shows up as that instead of example1.
The PTR of your IP address is based on the droplet name, and plays an important part of mail delivery.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.