• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Using postfix to relay emails: Removing/masking client IP address how?

hello_world.c

New Pleskian
Using Plesk Obsidian with postfix 3.5.9 and relay option for authorized users only. It works well, but all outgoing email that leaves the server has full IP information of the client that connected in the header, e.g.:

Received: from [192.168.1.110] (SME-STR-xxx-xxx-xxx-xxx.reverse.domain.tld [xxx.xxx.xxx.xxx])
by mail.mydomain.com (Postfix) with ESMTPSA id E4C0180BCD
for <[email protected]>; Wed, 29 Sep 2021 17:59:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mydomain.com;
s=default; t=1632938386;
bh=zrqoOocoelB4lKXToxOoLfz6ARJand9Mdg7K7lfuppM=; h=To:From:Subject;
b=Na0oBSp8AiUDkRRIiCd9lyhmqdNZLWCOsjqh41WaSXmPefQ0lNayu8uXxznsQHnvl
t6jeqjvSgKnNTpNQS/YlZQ78qYIMfxWxC2d4HrmU8TYa0J5gFcNLA8CHpbsMxk6arG
1mctUJnGhlWSYdeOuJB8anUuEYHgeTyaiax6pOB8=
Authentication-Results: ip-172-26-13-127;
spf=pass (sender IP is xxx.xxx.xxx.xxx) smtp.mailfrom=[email protected] smtp.helo=[192.168.1.110]
Received-SPF: pass (ip-172-26-13-127: connection is authenticated)

xxx.xxx.xxx.xxx and xxx-xxx-xxx-xxx stand for the public IPv4 address of the client, not the relay server. For privacy reasons, it is mandatory that we anonymize or remove this address, which seems to be highly desirable for many customers. No problem to keep all checks and the IP address of the relay server that are further above in the header intact.

How can I achieve this? The postfix header_checks option I tried but it doesn't catch these header lines.
 
Back
Top