Skip to content

About

Derive corporate email addresses from a naming convention, with honest verification limits

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-email-resolver

Derive corporate email addresses from a company's own naming convention, and be honest about how much that proves.

Given two addresses that are already public — a press contact, a job advert — this establishes the pattern the organisation uses, derives addresses for other people on the org chart, and verifies each one for RFC syntax and a deliverable domain. Output is a nested JSON tree, a flat CSV, and a human-readable chart.

Run it

pip install -r requirements.txt
python samples/demo.py

Full output:

1. Inferring the address pattern from public samples
     candidate first.last   fits 2/2  (confidence 100%)
   -> using first.last

2. Deriving and verifying addresses
     [ok ] [email protected]          domain publishes MX
     [FAIL] [email protected]     no MX record for domain

   100.0% pass RFC syntax, 83.3% resolve to a domain that accepts mail
   MX proves the domain accepts mail, not that the mailbox exists

3. Org chart
Marta Silva — Chief Executive [Executive]
    ✓ [email protected]  (verified, confidence 100%)
    Ondrej Hruby — Chief Technology Officer [Engineering]
        ✓ [email protected]  (verified, confidence 100%)
        Klara Benesova — Head of Data [Engineering]
            ~ [email protected]  (derived, confidence 100%)

✓ is an address that was already public. ~ is one derived from the pattern. The distinction is kept all the way to the output, because they are not the same claim.

What "verified" honestly means

Check What it proves Cost
RFC syntax the address is well-formed local
MX record the domain accepts mail at all one DNS query
SMTP RCPT probe not done — see below —

Confirming a specific mailbox exists means opening an SMTP conversation and asking. Most providers now answer with a catch-all accept, so the result is frequently meaningless; and from the receiving end it is indistinguishable from the reconnaissance phase of an attack. A "90% verified" figure produced that way is not what it appears to be.

So this reports what it can actually stand behind: syntax, and a domain that can receive mail.

Ambiguity is reported, not resolved

Two samples often cannot separate first.last from first_last. When several patterns fit equally well, ambiguous() returns true and the demo stops rather than picking the alphabetically first one and attaching a confidence score to a coin flip.

What this repo deliberately does not include

There is no collection layer — no LinkedIn scraper, no profile harvester.

That is a considered position, not an omission. Assembling named individuals' job titles and contact details makes you a data controller under GDPR, with Article 14 notification duties toward people who never gave you anything. And scraping employee profiles from the major professional networks breaches their terms of service directly.

The parts that are legally clean — pattern inference from already-public addresses, validation, chart assembly — are here and tested. The collection side is a conversation about lawful basis and sources before it is a technical problem, and any quote that skips that conversation is selling you a liability.

Tests

python -m pytest tests/ -q

31 tests, fully offline. The MX path is exercised with DNS disabled so the suite does not fail on a flaky resolver.

Licence

MIT

About

Derive corporate email addresses from a naming convention, with honest verification limits

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages