27 checks, five minutes apart, all answering "no"
Jarvis was waiting for a word that Buttondown never says. the thing it was waiting for had already happened
that's the end of today's story. the start is a newsletter that has now lived in three places
the old home
I used to send the newsletter through Hashnode. the blog lived there and Hashnode emailed the subscribers, so the newsletter was a side effect of the host. nobody chose it, it just came with the blog
then I rebuilt the blog off Hashnode in about 21 hours, the story in "I Rebuilt My Blog Within Slack". the first commit of the new site is Nov 6, 23:08
the email part did not move with it
the stopgap
after the move, the /newsletter page offered one thing: an RSS feed
a feed reader is a fine way to follow a blog and a poor way to run a newsletter. but it cost nothing and it shipped with the site
it stayed that way for a week, Nov 7 to Nov 14
then things moved fast. on Nov 14 Hashnode was dropped as the content source at 16:32. the Buttondown signup form was live on the site at 16:50. 18 minutes
the form is a plain HTML form posted to Buttondown's embed endpoint, in a new tab. it works without JavaScript and keeps no API key on the site
Buttondown handles the double opt-in. the first issue went out the same evening, "the harness that fixes itself, and the blog it rebuilt"
a sender with a name
a newsletter from a shared address works. a newsletter from news@letter.thediligentengineer.com looks like it belongs to the blog
so I asked Jarvis to set it up. in Buttondown that's one API call, and Jarvis made it
the status came back invalid, which is fair, because the DNS knew nothing about it yet
mail is trusted by what the domain publishes about itself. Buttondown sends through Postmark, and Postmark wanted four records on Cloudflare:
- a DKIM TXT, a public key, so a receiver can check the mail was signed by someone allowed to
- a DMARC TXT,
p=quarantine, which says what to do with mail that fails the check: spam folder, not inbox - two CNAMEs for Postmark, and both must be "DNS only", the grey cloud
the grey cloud is the sharp edge
Cloudflare can proxy a record through its own network, the orange cloud. a proxied CNAME makes Postmark's verification fail
the browser part
Jarvis had no Cloudflare API token. so it did the polite thing and asked me for one
I told it to just use the browser. no token, no excuse =))
it drove the browser on my Mac through the Accessibility API. the Cloudflare session had expired, so it picked the saved password, and then macOS asked for Touch ID
a harness has no finger. it set a watch, pinged me, and I pressed it
then it added the four records and confirmed they resolved through 1.1.1.1. it clicked "Check records" and the status moved from invalid to awaiting_ssl
so far, a clean day. then it got clever
the word that never comes
Jarvis set a watch to tell me when the domain turned active. it checked every five minutes
Buttondown has no active. the real path is awaiting_ssl and then valid, and the domain got to valid on its own
the watch kept asking for a word that was never going to arrive. it checked 27 times, about two hours of silence
then I asked if it was up yet, and Jarvis looked at the actual status
it had been valid for a while ;))
the funny part is that a watch is exactly how Jarvis waits without holding a turn. it's only as good as its condition
Jarvis guessed the condition from what felt natural instead of reading what the API says
one GET would have shown it the state names. a check that waits for the wrong word never fires, and it looks exactly like a check that is still waiting
where it stands
the domain is valid and the sender is news@letter.thediligentengineer.com. the first issue went out before the domain was ready, so I haven't seen a real issue leave from the new address yet. working on that ;)
the arc is smaller than it sounds. Hashnode sent the mail as a side effect, and RSS was a bridge
Buttondown with a name of its own is the first version where the newsletter is something I chose
and the two things I'd keep from the day are boring ones: grey cloud for the CNAMEs, and read the real states before you write the condition you wait on
Written by J., reviewed and refined by Kai.