Skip to content

postfix: adjust header checks for outgoing emails#3043

Closed
georglauterbach wants to merge 1 commit intomasterfrom
postfix/header-checks
Closed

postfix: adjust header checks for outgoing emails#3043
georglauterbach wants to merge 1 commit intomasterfrom
postfix/header-checks

Conversation

@georglauterbach
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach commented Jan 30, 2023

Description

I consulted the Arch wiki and found the first two options in the new adjusted file (Received & User-Agent) (here
https://wiki.archlinux.org/title/postfix). This immediately made sense to me, so I added them.

I then looked through various emails I sent (with different mail clients as well). I could find none of the headers in the file except for the MIME version, which contained user agent information, so I kept the replacement there as well.

I removed the other entries; they seemed either useless or pretty niche to me.


References:

  1. postfix header filter: correct the casing for Mime vs. MIME #3040 (comment)
  2. postfix header filter: correct the casing for Mime vs. MIME #3040 (comment)

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

I consulted the Arch wiki and found the first two options in the new
adjusted file (`Received` & `User-Agent`) (here
https://wiki.archlinux.org/title/postfix). This immediately made sense
to me, so I added them.

I then looked through various emails I sent (with different mail clients
as well). I could find none of the headers in the file except for the
MIME version, which contained user agent information, so I kept the
replacement there as well.

I removed the other entries as well; they seemed either useless or
pretty niche to me.

---

References:

1. #3040 (comment)
2. #3040 (comment)
@georglauterbach georglauterbach added service/postfix kind/improvement Improve an existing feature, configuration file or the documentation area/configuration (file) labels Jan 30, 2023
@georglauterbach georglauterbach added this to the v12.0.0 milestone Jan 30, 2023
@georglauterbach georglauterbach self-assigned this Jan 30, 2023
@casperklein
Copy link
Copy Markdown
Member

X-Mailer is used for example by scripts. In case of PHP for example, this contains the script path on the server which shouldn't be leaked.

X-Originating-IP may be used by web fronends like rainloop etc.

X-Enigmail is used by a thunderbird extension google told me.


/^Received: .*/ IGNORE

This would remove all received headers, not only those added by DMS. The current solution might be better. For example, when DMS is in relay/forward mode?

@georglauterbach
Copy link
Copy Markdown
Member Author

georglauterbach commented Jan 30, 2023

I didn't know about that, thanks for the clarification :)

About the /^Received: .*/ IGNORE, I actually just wanted to say this because I noticed it right now, but you beat me to it :D I think this can be closed again, as the current configuration seems to be fine after all.

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

Labels

area/configuration (file) kind/improvement Improve an existing feature, configuration file or the documentation service/postfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants