Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce Header Order for Sendmail #7

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Enforce Header Order for Sendmail #7

merged 1 commit into from
Apr 12, 2023

Conversation

d--j
Copy link
Owner

@d--j d--j commented Apr 12, 2023

This PR adds a workaround for Sendmail that can enforce the order of the header fields.

Calling HeadersEnforceOrder on the Trx will activate a special workaround for Sendmail to enforce our header ordering.

The workaround is to unconditionally  delete all existing headers and add (the possibly changed) headers back. This is a significant overhead, so you should only enable this workaround when you really need to enforce your header order.

This commit also changes the semantics of InsertBefore* method calls when called for the very first header. Before this the header would have been inserted in-front of the `Received` header of the MTA (position 0) and not in-front of the first header (position 1).
@d--j d--j merged commit 29b2f01 into main Apr 12, 2023
@d--j d--j deleted the sendmail branch April 12, 2023 14:37
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.

1 participant