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

Strange header rewrite #191

Closed
senilio opened this issue Apr 6, 2017 · 2 comments
Closed

Strange header rewrite #191

senilio opened this issue Apr 6, 2017 · 2 comments

Comments

@senilio
Copy link

senilio commented Apr 6, 2017

Running v1.4, I've noticed that outgoing email gets its Received header rewritten with PRIMARY_HOSTNAME [PUBLIC_IP], literally.

Sending an email to gmail, here's the headers on the receiver side.

Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by domain.com (Postfix) with ESMTPSA id 87AD9648 for recipient@gmail.com; Thu,
6 Apr 2017 12:56:52 +0000 (UTC)

Here's the replace taking place in the postfix logs:

smtp_1 | postfix/cleanup[61]: 0EADA648: replace: header Received: from [172.17.7.226] (unknown [81.146.13.44])??by domain.com (Postfix) with ESMTPSA id 0EADA648??for recipient@gmail.com; Thu, 6 Apr 2017 12:34:23 +0000 (UTC) from unknown[81.146.13.44]; from=sender@domain.com to=recipient@gmail.com proto=ESMTP helo=<[172.17.7.226]>: Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP])??by domain.com (Postfix) with ESMTPSA id 0EADA648??for recipient@gmail.com; Thu, 6 Apr 2017 12:34:23 +0000 (UTC)

I'd expect PRIMARY_HOSTNAME [PUBLIC_IP] to be a real hostname and IP.

Thanks!

@kaiyou
Copy link
Member

kaiyou commented Apr 9, 2017

That is actually the intended behavior, in order to keep the full Received chain while helping authenticated users stay anonymous when sending emails through SMTP or Submission.

You can change this behaviour and build your own version of the smtp container by editing outclean_header_filter.

@senilio
Copy link
Author

senilio commented Apr 19, 2017

Thanks for clarifying this!

bors bot added a commit that referenced this issue Jul 20, 2021
1871: Replace PUBLIC_HOSTNAME/IP with real data in Received headers r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

This will ensure that we don't get spam points for not respecting the RFC (gmail is notorious for not liking it)

### Related issue(s)
- close #1448
- #466
- #191

## Prerequistes
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [x] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants