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:
- Tell your receiving server (here: postfix) announce support for and trust the information provided by the forwarder
- 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.