# Postkontor · Malte Therkildsen

> Postkontor connects a mail domain to a mail platform: it proves the domain is the customer's, checks every record at Cloudflare and at Google, writes the fixes as a zone file and keeps the domain's state. Every number on its plates is the engine's own.

Source: https://therkildsen.dev/projects/postkontor

SoftwareCaseP43

  A mail domain is connected, checked and kept right.

  Postkontor was the early prototype name of Zibaldone Inbox.

# Postkontor

      0

      Waiting for proofstate

      records right

        Write the changes
        Start over

    01
    **harbour.example, moving its mail**
    A made up domain moves its mail from another provider. Postkontor checks every record it needs and writes what is missing.

    DNS over HTTPSZone filesHMAC[Open Postkontor](https://therkildsen.dev/lab/p43-postkontor/)

A record is right only when both resolvers say so. A change reaches Cloudflare first and Google a check later.

    0

    02
    **What costs points**
    Each purpose is weighted, and a wrong required record holds the score down.

    SPFDKIMDMARCMTA-STS

A domain is not simply right or wrong. It waits, it is active, and it degrades when checks keep failing.

- **Waiting for proof** The ownership record holds a token made for this account.

- **Provisioning** The mail server takes the domain and its keys.

- **Waiting for records** The required records must be right at both resolvers.

- **Active** Mail flows, and every check looks again.

    03
    **Why it moved**
    The domain's state, and the log of every move with its reason.

    State machine[Try the three domains in the Lab](https://therkildsen.dev/lab/p43-postkontor/)

Postkontor connects one domain to a platform that is made up. The last plate says what a real one adds.

## Has

- **Every record a platform asks for** Each record judged one by one.

- **Proof of ownership** A token made with HMAC from the account and the domain, so another account cannot reuse it.

- **Its own parsers** Zone files, SPF with its lookup limit, DKIM keys, DMARC, MTA-STS and TLS reports, read by the engine itself.

- **A real audit** The Lab audits any real domain.

## Does not have

- **A mail server** The platform on this page is made up, and its names end in .example.

- **Your DNS provider's login** It writes the fixes as a zone file to paste; it never changes a record itself.

- **DNSSEC** It trusts the two resolvers' answers and does not check signatures of its own.

- **A schedule** A real platform checks every domain by the hour. Here a check is a button.

    04
    **What was left out**
    The Lab page has three domains at different stages, the parsers to type into, and a live audit of any domain through Cloudflare's and Google's DNS over HTTPS.

    [How it works](https://therkildsen.dev/lab/p43-postkontor/)

[
  Next case
  RAMTT
  An endurance platform for athletes and coaches
](https://therkildsen.dev/projects/ramtt)
