You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be great if there were a data source for the mail servers from Google's G Suite (Gmail). It could be used as follows:
data "google_gsuite_mail_servers" "main" {}
resource "cloudflare_record" "mx" {
count = "${length(data.google_gsuite_mail_servers.domains)}"
domain = "example.com"
name = "@"
value = "${data.google_gsuite_mail_servers.domains[count.index]}"
priority = "${count.index + 1}"
type = "MX"
}
I don't think Google offer a machine-friendly way to fetch the mail servers, but the values haven't changed in years: aspmx.l.google.com, alt1.aspmx.l.google.com, alt2.aspmx.l.google.com, alt3.aspmx.l.google.com, alt4.aspmx.l.google.com.
The machine-friendly way to look up the mail servers is to do an MX lookup on google.com or gmail.com:
$ host -t mx google.com
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
$ host -t mx gmail.com
gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.
If you resolve the gmail-smtp-in hosts, they're the same as the aspmx hosts.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
It'd be great if there were a data source for the mail servers from Google's G Suite (Gmail). It could be used as follows:
I don't think Google offer a machine-friendly way to fetch the mail servers, but the values haven't changed in years:
aspmx.l.google.com
,alt1.aspmx.l.google.com
,alt2.aspmx.l.google.com
,alt3.aspmx.l.google.com
,alt4.aspmx.l.google.com
.I've implemented this functionality as a module for the time being: https://github.com/gnarea/terraform-gmail
The text was updated successfully, but these errors were encountered: