Sebastian Nielsen:
> Can it be done without a policy service or milter? Eg with some header 
> checks? Or maybe a configuration option?

If it is not possible to use the address in Postfix's own Received:
header, you can copy the client IP address into a header with a
pcre or regexp table.

For example:

/etc/postfix/main.cf
    smtpd_client_restrictions = pcre:/etc/postfix/prepend-client.pcre

/etc/postfix/prepend-client.pcre:
    /^([0-9a-f:.]+)$/   prepend X-Client-Addr: $1

This syntax is also supported with regexp tables.

smtpd_client_restrictions uses the client IP address that is used
for SMTP server access control. It does not use the forwarded IP
address which is used for logging only.

        Wietse

Reply via email to