Skip to content

feat(modify): new modifier add_header#771

Open
msessa wants to merge 3 commits into
foxcpp:devfrom
sv-oss:feat/add_header_modifier
Open

feat(modify): new modifier add_header#771
msessa wants to merge 3 commits into
foxcpp:devfrom
sv-oss:feat/add_header_modifier

Conversation

@msessa

@msessa msessa commented Mar 2, 2025

Copy link
Copy Markdown

Partially addresses #158

Description

This PR adds a new modifier add_header which allows arbitrary headers to be added to a message in the pipeline.

Use Case

A practical use case is to inject the X-SES-FROM-ARN header before forwarding the message to AWS SES to control which identity will be used to verify the sender domain.

See reference here

@msessa msessa changed the title feat(modify): new modifier add_header feat(modify): new modifier add_header Mar 2, 2025

@foxcpp foxcpp left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Can you add a configuration option to not return an error on duplicate header? It is correct to have multiple values for some header fields and such configuration option may be useful for some cases. I would probably make it default even as "least surprise" principle.

@msessa

msessa commented Mar 3, 2025

Copy link
Copy Markdown
Author

@foxcpp thanks for you review (and for creating maddy!)

I didn't realize the spec permitted fields appearing multiple times.
I've adapted the code and tests for that

@msessa

msessa commented Mar 3, 2025

Copy link
Copy Markdown
Author

btw I'm happy to also implement other variations of the modifier, eg: upsert_header remove_header if you think they could be useful

@msessa msessa requested a review from foxcpp March 5, 2025 01:15
@msessa

msessa commented Mar 26, 2025

Copy link
Copy Markdown
Author

@foxcpp any update on this PR?

@DEVisions

Copy link
Copy Markdown

Interested in this feature as well. Hope it gets merged :)

@msessa

msessa commented May 13, 2026

Copy link
Copy Markdown
Author

@foxcpp
Would it be possible to merge this?

@foxcpp

foxcpp commented May 17, 2026

Copy link
Copy Markdown
Owner

Needs rebase on latest dev, there are some module interface changes. Other than - sure, we can merge this. Sorry for the long wait I wasn't sure whether it is a good idea to it as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants