feat(email): add MessageIdUtil for RFC 5322 threading + signed Reply-To#21
Open
feat(email): add MessageIdUtil for RFC 5322 threading + signed Reply-To#21
Conversation
Ports the NestJS email/message-id.ts helpers to .NET. Mirrors the Spring dev.escalated.services.email.MessageIdUtil and the WordPress Message_Id_Util. API: BuildMessageId(ticketId, replyId?, domain) ParseTicketIdFromMessageId(raw) BuildReplyTo(ticketId, secret, domain) VerifyReplyTo(address, secret) Uses HMACSHA256 + CryptographicOperations.FixedTimeEquals for timing-safe verification. Pure static helpers, no DI — 16 xUnit tests ([Theory] for the malformed-input cases) covering round-trip, tamper rejection, case-insensitive hex, malformed input, local-part-only acceptance. Follow-up PR will wire the util into EmailService so outbound notifications carry the RFC-compliant Message-ID + signed Reply-To, and add an EscalatedOptions.Email config block for domain + inbound secret.
This was referenced Apr 24, 2026
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
Ports the NestJS
email/message-id.tshelpers to .NET. Mirrors the Springdev.escalated.services.email.MessageIdUtiland the WordPressMessage_Id_Util.API
BuildMessageId(ticketId, replyId?, domain)— RFC 5322 Message-IDParseTicketIdFromMessageId(raw)— returnslong?BuildReplyTo(ticketId, secret, domain)— signed Reply-ToVerifyReplyTo(address, secret)— returns ticket id on matchUses
HMACSHA256+CryptographicOperations.FixedTimeEqualsfor timing-safe verification.Scope
Utility only. Follow-up PR will:
MessageIdUtilintoEmailServiceso outbound notifications carry RFC-compliant Message-ID + signed Reply-To headersEscalatedOptions.Emailconfig block forDomain+InboundSecretVerifyReplyToTest plan
[Theory]for malformed-input cases) covering round-trip, tamper rejection, case-insensitive hex, malformed input, local-part-only acceptancetest,lint