Email routing
Email routing receives mail for a Startup’s Domains, routes each address to a Mailbox or the sink, and publishes SPF, DKIM and DMARC.
A Domain that sends no mail says so in DNS, so no one can send as it.
Contract
| Clause | Terms |
|---|---|
| Routes | Each address on a Domain routes to one Mailbox, created with Mailbox.create, or to the sink. Inbound mail joins its Thread as a Message. |
| Authenticates | Domain.authenticate writes SPF, DKIM and DMARC for a sending Domain and verifies all three before its first send. |
| Sends nothing | A Domain with no Mailbox publishes v=, DMARC p= and a null MX, written by Domain.register. |
| Adds a Mailbox | Domain.authenticate replaces the null records with sending records in one Change. |
| Retires the last | When its last Mailbox retires, DNSRecord.set returns SPF and DMARC to null and reject, and points the MX at the sink. |
| Sink | A Domain whose Domain.carriedIdentity is true keeps its sink in every state, Dormant included. The sink files each Message for the Startup's return and sends no reply. |
| Records | Every mail record is a DNS Record with DNSRecord.owner set to platform, so no edit breaks delivery. |
Verbs
| Verb | Object | Event |
|---|---|---|
| Mailbox.create | Mailbox | Mailbox.created |
| DNSRecord.set | DNS Record | DNSRecord.set |
Interfaces
Example
fieldnotes.co, a redirect Domain that has never received mail:
txt @ v= spf1 -all No server may send as the Domain
txt _dmarc v= DMARC1; p= reject Receivers reject mail that claims it
mx @ 0 . The Domain accepts no mail