Sail CLI ships with a default blueprint called
which takes care of setting up all the necessary MX records for Google Workspace
Gmail. Prior to applying this blueprint, you will need to add the domain to your
sail domain add example.org
This will create a DNS zone and default records to point the domain to your Sail
server. Next, you can apply the
sail blueprint gmail-dns.yaml
Sail will prompt for the domain name you wish to apply the blueprint for, or
you could pass one on the command line using the
--domain option. After the
blueprint is successfully applied, all the necessary Gmail MX records will be
created at your DigitalOcean DNS servers.
You can verify this from your DigitalOcean control panel, or using the
command line utility:
$ dig mx example.org @ns1.digitalocean.com ;; ANSWER SECTION: example.org. 1800 IN MX 5 alt1.aspmx.l.google.com. ...
Note that it may take some time for DNS changes to propagate globally.
If you're also looking to send e-mails from your WordPress through Gmail, check out our Postfix SMTP guide on how to set up a fast and reliable e-mail relay service on your Sail-powered WordPress site.
If you're experiencing any trouble with e-mail or DNS while using Sail CLI, please visit our getting help section.