In my main.cf for example i have added:
smtps_data_restrictions = check_client_acces pcre:/etc/postfix/access.pcre
and in that example access file i have putted:
/^(.*)$/ PREPEND X-Sender-IP: ${1}
the problem is that check_client_access matches against client
hostname no against IP so i alwau add a header like:
X-Sender-IP: hostname (Ej: X-Sender-IP:localhost)
I have tried to configure smtpd_peername_lookup putin on NO
smtpd_peername_lookup = no
but now what i have is always
X-Sender-IP: unknown
the only wei i can match check_client_access against an Ip is using
cidr but the problems is that i cat save the client Ip on a var to
print it.
Any idea of how to sove it?
thanks.