Skip to content

Commit 8eff40e

Browse files
authored
Merge pull request #1 from jesbinjoseph/copilot/update-readme-with-india-details
Update README for India fork
2 parents 1c01b4a + bc54be9 commit 8eff40e

1 file changed

Lines changed: 41 additions & 25 deletions

File tree

README.md

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
# MXmap — Email Providers of Swiss Municipalities
1+
# MXmap — Email Providers of Indian Municipalities
22

3-
[![CI](https://github.com/davidhuser/mxmap/actions/workflows/ci.yml/badge.svg)](https://github.com/davidhuser/mxmap/actions/workflows/ci.yml)
3+
[![CI](https://github.com/jesbinjoseph/mxmap/actions/workflows/ci.yml/badge.svg)](https://github.com/jesbinjoseph/mxmap/actions/workflows/ci.yml)
44

5-
An interactive map showing where Swiss municipalities host their email — whether with US hyperscalers (Microsoft, Google, AWS) or Swiss providers or other solutions.
5+
An interactive map showing where Indian municipalities host their email — whether with US hyperscalers (Microsoft 365, Google Workspace, AWS) or India-based solutions (NIC, Indian ISPs, independent hosting).
66

7-
**[View the live map](https://mxmap.ch)**
7+
**[View the live map](https://mxmap.in)**
88

9-
[![Screenshot of MXmap](og-image.jpg)](https://mxmap.ch)
9+
[![Screenshot of MXmap](og-image.jpg)](https://mxmap.in)
10+
11+
> This is an India-specific fork of [davidhuser/mxmap](https://github.com/davidhuser/mxmap), adapted to cover Indian states, union territories, districts, and municipal corporations using the Local Government Directory (LGD).
1012
1113
## How it works
1214

1315
The data pipeline has two stages:
1416

15-
1. **Resolve domains**Fetches all ~2100 Swiss municipalities from Wikidata and the BFS (Swiss Statistics) API, applies manual overrides, scrapes municipal websites for email addresses, guesses domains from municipality names, and verifies candidates with MX lookups. Scores source agreement to pick the best domain. Outputs `municipality_domains.json`.
17+
1. **Resolve domains**Loads Indian municipalities from a curated `indian_municipalities.csv` (sourced from the Local Government Directory) and Wikidata SPARQL, applies manual overrides, scrapes municipal websites for email addresses, guesses `.gov.in` / `.nic.in` domains from municipality names and state abbreviations (ISO 3166-2:IN), and verifies candidates with MX lookups. Scores source agreement to pick the best domain. Outputs `municipality_domains.json`.
1618

17-
2. **Classify providers** — For each resolved domain, looks up all MX hosts, pattern-matches them, then runs 10 concurrent probes (SPF, DKIM, DMARC, Autodiscover, CNAME chain, SMTP banner, Tenant, ASN, TXT verification, SPF IP). Aggregates weighted evidence, computes confidence scores (0–100). Outputs `data.json` (full) and `data.min.json` (minified for the frontend).
19+
2. **Classify providers** — For each resolved domain, looks up all MX hosts, pattern-matches them, then runs 10 concurrent probes (SPF, DKIM, DMARC, Autodiscover, CNAME chain, SMTP banner, Tenant, ASN, TXT verification, SPF IP). Aggregates weighted evidence, computes confidence scores (0–100). Classifies each domain into one of: `microsoft`, `google`, `aws`, `nic`, `indian-isp`, or `independent`. Outputs `data.json` (full) and `data.min.json` (minified for the frontend).
1820

1921
```mermaid
2022
flowchart TD
2123
subgraph resolve ["1 · Resolve domains"]
22-
bfs[/"BFS Statistics API"/] --> merge["Merge ~2100 municipalities"]
23-
wikidata[/"Wikidata SPARQL"/] --> merge
24+
csv[/"indian_municipalities.csv<br/>(LGD data)"/] --> merge["Merge municipalities<br/>(States · UTs · Districts · MCs)"]
25+
wikidata[/"Wikidata SPARQL<br/>(LGD codes + websites)"/] --> merge
2426
overrides[/"overrides.json"/] --> per_muni
2527
merge --> per_muni["Per municipality"]
2628
per_muni --> scrape["Scrape website for<br/>email addresses"]
27-
per_muni --> guess["Guess domains<br/>from name"]
29+
per_muni --> guess["Guess .gov.in / .nic.in<br/>domains from name & state"]
2830
scrape --> mx_verify["MX lookup to<br/>verify domains"]
2931
guess --> mx_verify
3032
mx_verify --> score["Score source<br/>agreement"]
@@ -42,15 +44,31 @@ flowchart TD
4244
end
4345
4446
vote --> data[("data.json + data.min.json")]
45-
data --> frontend["Leaflet map<br/>mxmap.ch"]
47+
data --> frontend["Leaflet map<br/>mxmap.in"]
4648
```
4749

50+
## Provider categories
51+
52+
| Category | Providers |
53+
|---|---|
54+
| `us-cloud` | Microsoft 365, Google Workspace, AWS |
55+
| `india-based` | NIC (National Informatics Centre), Indian ISPs, Independent/self-hosted |
56+
57+
## Municipality data
58+
59+
Municipalities are loaded from [`indian_municipalities.csv`](indian_municipalities.csv), which covers:
60+
61+
- **28 States** and **8 Union Territories**
62+
- **Districts** across all states
63+
- **Municipal Corporations (MC)** — major urban local bodies
64+
65+
Each entry carries an LGD code (Local Government Directory code), name, state, and entity type. The pipeline uses Indian state abbreviations (ISO 3166-2:IN) — e.g. `mh` for Maharashtra, `dl` for Delhi — to generate plausible `.gov.in` and `.nic.in` domain candidates.
66+
4867
## Classification system
4968

50-
see [`classifier.py`](src/mail_sovereignty/classifier.py) for the full implementation details, but in summary,
69+
See [`classifier.py`](src/mail_sovereignty/classifier.py) for the full implementation details, but in summary,
5170
we use a weighted evidence system where each probe contributes signals of varying strength towards different provider classifications.
5271

53-
5472
## Quick start
5573

5674
```bash
@@ -79,31 +97,29 @@ uv run ruff check src tests
7997
uv run ruff format src tests
8098
```
8199

82-
83100
## Related work
84101

102+
* [mxmap.ch](https://mxmap.ch) — the original Swiss version by David Huser
85103
* [hpr4379 :: Mapping Municipalities' Digital Dependencies](https://hackerpublicradio.org/eps/hpr4379/index.html)
86-
* If you know of other similar projects, please open an issue or submit a PR to add them here!
87104

88-
## Forks
105+
## Other country forks
89106

90-
* DE
107+
* CH (original): https://mxmap.ch
108+
* DE:
91109
* https://b42labs.github.io/mxmap/
92110
* https://mx-map.de/
93-
* NL https://mxmap.nl/
94-
* NO https://kommune-epost-norge.netlify.app/
95-
* BE https://mxmap.be/
96-
* EU https://livenson.github.io/mxmap/
111+
* NL: https://mxmap.nl/
112+
* NO: https://kommune-epost-norge.netlify.app/
113+
* BE: https://mxmap.be/
114+
* EU: https://livenson.github.io/mxmap/
97115
* LV: https://securit.lv/mxmap
98-
* [CAmap Nordic & Baltic](https://koldex.github.io/ca-sovereignty-map/) — TLS CA sovereignty for Nordic and Baltic municipalities ([source](https://github.com/koldex/ca-sovereignty-map))
99116
* PT: https://mxmap.pt/
100117
* FR: https://mxmairies.fr/
101-
* See also the forks of this repository
102-
118+
* [CAmap Nordic & Baltic](https://koldex.github.io/ca-sovereignty-map/) — TLS CA sovereignty for Nordic and Baltic municipalities ([source](https://github.com/koldex/ca-sovereignty-map))
103119

104120
## Contributing
105121

106-
If you spot a misclassification, please open an issue with the BFS number and the correct provider.
122+
If you spot a misclassification, please open an issue with the LGD code and the correct provider.
107123
For municipalities where automated detection fails, corrections can be added to [`overrides.json`](overrides.json).
108124

109125
## Licence

0 commit comments

Comments
 (0)