feat(modify): new modifier add_header#771
Conversation
add_header
There was a problem hiding this comment.
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.
|
@foxcpp thanks for you review (and for creating maddy!) I didn't realize the spec permitted fields appearing multiple times. |
|
btw I'm happy to also implement other variations of the modifier, eg: |
|
@foxcpp any update on this PR? |
|
Interested in this feature as well. Hope it gets merged :) |
|
@foxcpp |
|
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. |
Partially addresses #158
Description
This PR adds a new modifier
add_headerwhich 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-ARNheader before forwarding the message to AWS SES to control which identity will be used to verify the sender domain.See reference here