Repository navigation
Custom tracking domain per team - #124
Merged
Merged
Conversation
A team can put open, click, unsubscribe and view-in-browser links on its own subdomain. The domain is verified by its CNAME and an HTTPS probe, rechecked hourly while pending and daily once verified, and falls back to the API host after three failed daily checks. Retired domains keep being served so links in sent emails keep working. On a tracking domain only the tracking routes answer; /tls/ask lets an on-demand TLS proxy issue certificates for teams' domains. REST, MCP, dashboard card and docs included. The domain authentication dialog now names the bounce (Return-Path) domain in its SPF section. Closes #50
# Conflicts: # apps/api/.env.example # apps/api/src/automation/process-ongoing-sequence.ts # apps/api/src/mail/worker.ts # apps/api/src/sequences/test-send.ts # apps/docs/content/docs/self-hosting/meta.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #50. Stacked on #123.
Tracking domain
tracking_domain(unique), statuspending | verified | failed, last error, verified/checked times, failure count, andretired_tracking_domains.settings/tracking-domain/queries.ts): the CNAME must point toTRACKING_DOMAIN_CNAME_TARGET(default: the API host), andhttps://<domain>/.well-known/sendlit-trackingmust answer, so TLS works before links switch. Subdomains only; SendLit's own hosts can't be claimed.failedand new emails fall back to the API host./track/*,/unsubscribe/*,/view/*and the probe answer; everything else returns 404.GET /tls/ask?domain=returns 200 for teams' current or retired domains, for Caddyon_demand_tls. Docs:self-hosting/tracking-domains.GET/PUT /settings/tracking-domain,POST /settings/tracking-domain/verify.get_tracking_domain,set_tracking_domain,verify_tracking_domain(parity manifest updated).email-marketing/tracking-domain.Return-path
This was already modelled and checked per provider (SES/Resend MAIL FROM, Postmark, SendGrid
em<id>). The SPF section of the domain authentication dialog now names the bounce (Return-Path) domain when it differs.Hosted rollout (outside this repo)
The hosted Caddyfile needs the on-demand TLS block from the self-hosting doc (
ask http://api:4000/tls/askplus a catch-allhttps://site). Until then, domains staypending(unreachable) and links keep using the API host.Tests
Validation; set, taken and retire; CNAME/probe outcomes; daily recheck fallback; host guard on current and retired domains; TLS ask; worker send puts every link and the List-Unsubscribe header on the domain.