Loggin original ip address in relay connection

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Loggin original ip address in relay connection

Emanuel
Hi,  i use exim locally, with an smarthost through Postfix. It's
possible add in the log the real IP the real client?

Actually i only see the IP of the relay connection.

Nov 27 10:23:59 smarthost01 postfix/cleanup[18611]: 0F4F8180058A1:
warning: header From: Emanuel <[hidden email]> from
server.backend[172.17.110.155]; from=<> to=<[hidden email]>
proto=ESMTP helo=<c001-dr.dattaweb.com>

Regards.!!


Reply | Threaded
Open this post in threaded view
|

Re: Loggin original ip address in relay connection

Wietse Venema
Emanuel:
> Hi,? i use exim locally, with an smarthost through Postfix. It's
> possible add in the log the real IP the real client?
>
> Actually i only see the IP of the relay connection.

The remote client IP address is in the Received: header that EXIM
has added. Use a Postfix header_checks rule to log that specific
Received: header. I am not familiar with the detailed format of
EXIM headers, but you should have plenty examples :-)

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Loggin original ip address in relay connection

Emanuel
Hello everyone, Thanks for the reply.

i try to use this rule in the header_checks, but only log the local IP
from the computer or device.

header_checks

/^X-Originating-IP:/ WARM

Any ideas??

El 27/11/19 a las 12:26, Wietse Venema escribió:

> Emanuel:
>> Hi,? i use exim locally, with an smarthost through Postfix. It's
>> possible add in the log the real IP the real client?
>>
>> Actually i only see the IP of the relay connection.
> The remote client IP address is in the Received: header that EXIM
> has added. Use a Postfix header_checks rule to log that specific
> Received: header. I am not familiar with the detailed format of
> EXIM headers, but you should have plenty examples :-)
>
> Wietse
--
Reply | Threaded
Open this post in threaded view
|

Re: Loggin original ip address in relay connection

Wietse Venema
Wietse:
> The remote client IP address is in the RECEIVED: HEADER that EXIM
> has added. Use a Postfix header_checks rule to log that specific
> RECEIVED: HEADER. I am not familiar with the detailed format of
> EXIM headers, but you should have plenty examples :-)

Emanuel:
> header_checks
>
> /^X-Originating-IP:/ WARM

You need to log the RECEIVED: header.

/^Received: whatever EXIM puts here/ WARN

Perhaps:

/^Received: from \[.+\] \(helo=egonzalez\.dat\)/ WARN

        Wietse