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

Postfix configuration leaks IP addresses #178

Closed
thomasoll opened this issue Oct 25, 2021 · 3 comments
Closed

Postfix configuration leaks IP addresses #178

thomasoll opened this issue Oct 25, 2021 · 3 comments

Comments

@thomasoll
Copy link

As it stands, the configuration (which is excellent by the way) leaks the source ip of the sender.
Recommend you amend the following files to strip the "Received From:" section of this:

add to /etc/postfix/main.cf
header_checks = regexp:/etc/postfix/header_checks

create file /etc/postfix/header_checks and add:


/^Received:.*/     IGNORE
/^X-Originating-IP:/    IGNORE

@thomasoll
Copy link
Author

Before:
Received: from [192.168.1.99] (mypc.lan [185.14.xxx.xxx])

After:
``

@Fijxu
Copy link

Fijxu commented Oct 30, 2021

I also changed these settings months ago after I realized that the headers of the emails I was sending were leaking my external ip.
It would be good for privacy if by default the configuration would not read the external ip of the sender.

LukeSmithxyz added a commit that referenced this issue Mar 29, 2022
Fix: #178 leakage of public IP addresses in sent emails
@programmer-ke
Copy link

programmer-ke commented Jul 6, 2022

Not an expert, but I spent some time looking into this. Just in-case in may not be obvious to anyone looking at this, the headers will be stripped for both incoming and outgoing emails.

It may not matter to most people, but if you only want to strip the sending client's headers, see this for a possible solution: https://serverfault.com/a/998993

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

No branches or pull requests

3 participants