1

Topic: Hide original sender IP and replace it with iRedMail server ip

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
1.6.8
- Deployed with iRedMail Easy or the downloadable installer?
installer
- Linux/BSD distribution name and version:
Debian 11
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
MySQL
- Web server (Apache or Nginx):
Nginx
- Manage mail accounts with iRedAdmin-Pro?
No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello Team!

I'm trying to setup replacing the original sender IP with iRedmail server's IP, so none of iRedMail users broadcast their original client IP to 3rd party mail receivers.

Previously it was enough just to create /etc/postfix/header_checks with the following contents:

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

And to add it to main.cf in Postfix:

header_checks = pcre:/etc/postfix/header_checks

But with the current fresh installation this approach causes messages sent to Gmail not to be delivered. And iRedMail sender is getting the following autoreply. The PTR record is correct:

gmail-smtp-in.l.google.com[2a00:1450:4025:401::1a] said: 550-5.7.25
    [2a04:52c0:129:1f62::1] The IP address sending this message does not
    550-5.7.25 have a PTR record setup, or the corresponding forward DNS entry
    does 550-5.7.25 not match the sending IP. As a policy, Gmail does not
    accept 550-5.7.25 messages from IPs with missing PTR records. For more
    information, go 550-5.7.25 to 550-5.7.25

I tried to follow https://forum.iredmail.org/topic6689-re … aders.html
but it also doesn't work

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by Cthulhu 2024-06-01 00:18:50)

Re: Hide original sender IP and replace it with iRedMail server ip

https://www.whatsmydns.net/#PTR/2a04:52c0:129:1f62::1

[2a04:52c0:129:1f62::1] doesn't have a PTR

it belongs to mail.mailrocket.online, i guess that's your domain, but the IPv6 doesn't have a PTR set so it fails