I've developed a pipeline that classifies where Swiss municipalities host their email services by probing public DNS records. My goal is to find out how many are using Microsoft 365, other US cloud providers, or Swiss alternatives based on public data. I've created an interactive map (mxmap.ch) and made the code available on GitHub. The classification process is based on a hierarchical decision tree that includes various steps like MX record keyword matching, CNAME chain resolution, and SPF resolution, among others. I'm especially interested in any feedback on my methodology, particularly regarding missing MX/SPF patterns and edge cases where gateway detection might misattribute backend providers. Would it also make sense to have a category for "uncertain" cases? Thanks for any insights!
4 Answers
You might want to add `mx.microsoft` for identifying new customers implementing SMTP DANE, as it's a new domain they're using. For example, my workplace has an MX record that shows up as `company-tld.b-v1.mx.microsoft`. Adding this could refine your classification further.
I think the primary use of MX keyword matching is spot on! The distinctiveness of hostnames typically covers most cases without issue. Just be careful of security gateways—they might mask the real provider. Sometimes they could hide the actual mailbox provider behind them. Using DMARC aggregate reports could help verify what’s truly happening behind those gateways if you’re looking for another data source.
This sounds amazing! I'd love to replicate this for France, as we have over 33,000 municipalities. With a topographical map and some data querying through Wikidata, it seems doable!
While I appreciate the effort, I'm curious about the purpose of this project. Is there a specific need you’re addressing? It seems cool, but I'm not sure what the end goal is.
The project ties into digital sovereignty discussions in Europe, emphasizing the importance of being less reliant on external hosted services and avoiding vendor lock-in. It's highly relevant for anyone interested in digital policy!

Good catch! But I believe it should already be covered since you're matching various Microsoft keywords in the MX records.