fix(email): attach a Message-ID header to every outbound message #327

Merged
Claude-Run merged 1 commit from fix/BUNYIP-334-message-id-header into main 2026-07-03 14:33:55 +02:00
Member

send_email built messages with only From/To/Subject/body and never set a Message-ID, so every mail bunyip sent went out without one. Gmail rejects such mail with 550 5.7.1 RfcMessageNonCompliant, bouncing user-facing email (verification, password reset, email change) to Gmail recipients.

Extract a build_message helper from send_email and set an explicit Message-ID of the form uuid@domain, where domain is derived from config.from_email (fallback a8n.run) so it aligns with the From / DKIM d= domain. Fixing the single send_email choke point covers every email type. Add unit tests asserting exactly one RFC 5322-compliant Message-ID header with the expected domain and that IDs are unique per send.

#BUNYIP-334

send_email built messages with only From/To/Subject/body and never set a Message-ID, so every mail bunyip sent went out without one. Gmail rejects such mail with 550 5.7.1 RfcMessageNonCompliant, bouncing user-facing email (verification, password reset, email change) to Gmail recipients. Extract a build_message helper from send_email and set an explicit Message-ID of the form <uuid@domain>, where domain is derived from config.from_email (fallback a8n.run) so it aligns with the From / DKIM d= domain. Fixing the single send_email choke point covers every email type. Add unit tests asserting exactly one RFC 5322-compliant Message-ID header with the expected domain and that IDs are unique per send. #BUNYIP-334
fix(email): attach a Message-ID header to every outbound message
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 38s
Check / fmt + clippy + build + tests (pull_request) Successful in 11m43s
Create release / Create release from merged PR (pull_request) Has been skipped
846618c1c4
send_email built messages with only From/To/Subject/body and never set a Message-ID, so every mail bunyip sent went out without one. Gmail rejects such mail with 550 5.7.1 RfcMessageNonCompliant, bouncing user-facing email (verification, password reset, email change) to Gmail recipients.

Extract a build_message helper from send_email and set an explicit Message-ID of the form <uuid@domain>, where domain is derived from config.from_email (fallback a8n.run) so it aligns with the From / DKIM d= domain. Fixing the single send_email choke point covers every email type. Add unit tests asserting exactly one RFC 5322-compliant Message-ID header with the expected domain and that IDs are unique per send.

#BUNYIP-334
Claude-Run deleted branch fix/BUNYIP-334-message-id-header 2026-07-03 14:33:55 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!327
No description provided.