fix: Name <email> format for Postmark sender in health workflows - #11
Merged
Merged
Conversation
dawidd6/action-send-mail@v3 only treats the `from:` input as a full mailbox if it matches `Name <email>`; otherwise it builds `"<from>" <<username>>`. Our workflows passed a bare `admin@nomadkaraoke.com` with `username:` set to the Postmark server token, so the action constructed a sender header of `"admin@nomadkaraoke.com" <<postmark-token-uuid>>` — which Postmark rejected with `501 5.1.7 Bad sender address syntax`, silently dropping the only alert channel for the scheduled health checks. Wrap the sender in `"Name <email>"` so getFrom() short-circuits and the header lands as a real mailbox. SendGrid happened to be lenient about this; Postmark is not. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The Postmark switch in #9 also silently broke the email-on-failure path. Spotted while investigating run #26064397324 where Postmark replied
501 5.1.7 Bad sender address syntaxand the alert was dropped.dawidd6/action-send-mail@v3builds the From header like this:Our
from: admin@nomadkaraoke.com(noName <email>form) hit the fallback branch, so the action constructed:That's not a real mailbox, hence the 501 from Postmark. SendGrid happened to accept the same shape because
apikeywas the username — Postmark uses the actual token, which makes the bug visible.Fix: wrap each workflow's
from:in"Name <admin@nomadkaraoke.com>"so the regex matches and the value is used verbatim. Also makes alerts distinguishable in the inbox.Files changed
.github/workflows/decide-health.yml—Karaoke Decide Health <admin@nomadkaraoke.com>.github/workflows/gen-health.yml—Karaoke Gen Health <admin@nomadkaraoke.com>.github/workflows/flacfetch-health.yml—Flacfetch Health <admin@nomadkaraoke.com>Test plan
python3 -c "import yaml; yaml.safe_load(open(f))"for each).@coderabbitai ignore
🤖 Generated with Claude Code