Score:0

postfix keep original sender ip on mail server delivery

it flag

I have Proxmox Mail Gateway facing internet with port 25. When the email is recieved it is read and then forwarded to mail server. On my mail server i see that all the emails are going from this PGM ip address. Is it possible to rewrite some setting in postfix,etc... on PMG so that the original senders IP is kept and my email server will see the senders IP and not the PMG IP?

Thank you

P.S. I asked on proxmox forum they forwarded me on this page http://www.postfix.org/XFORWARD_README.html But i am still not able to figure it out.

Michael Hampton avatar
cz flag
Why did they give you that URL? Do they mean that PMG will send XFORWARD data to your mail server?
ukro avatar
it flag
Hi, I can't answer you that. This was the persons post where he stated that it should provide that functionality: haven't needed this myself - but check the xforward howto of postfix if you indeed want this functionality - that should provide a starting point.
Score:0
fr flag
anx

so that the original senders IP is kept and my email server will see the senders IP

Your email server will see (but not by default, act on) the trace headers (Received:) anyway. The only reason you would want to change its behaviour using either option would be if that alone does not suffice.

You should detail in what software and for which purposes your email server needs a different view of the client data, only then you can decide on the features best suited to serve that requirement.

and not the PMG IP

Removing trace information from mails is generally unwise, and rarely necessary. If you really do need that, it will also factor into the decision on how to configure the server.


You can allow transmission of client information via XCLIENT or XFORWARD with these basic steps:

  1. Tell your receiving server (here: postfix) announce support for and trust the information provided by the forwarder
  2. Tell your mail forwarder (here: PMG) to send the data

Part one is done using the smtpd_authorized_xclient_hosts or smtpd_authorized_xforward_hosts options. Which one of those you need depends on what additional services attached to your Postfix server are processing that data.

Please edit your question to provide the current forwarder configuration, then I may be able to point you to the relevant setting name.

ukro avatar
it flag
Hi, as you said "Removing trace information from mails is generally unwise." I will keep it seperated then. In the near future i will be moving my mail server to different software.So no need to spend time on this one. If i would need it in the future, will write. Thank you!!!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.