# Client-ip mail proxy

**URL:** <https://www.ruby-forum.com/t/client-ip-mail-proxy/222517>\
**Category:** NGINX\
**Created:** [August 31, 2012, 12:17pm UTC](https://www.ruby-forum.com/t/client-ip-mail-proxy/222517 "2012-08-31T12:17:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 31, 2012, 12:17pm UTC](https://www.ruby-forum.com/t/client-ip-mail-proxy/222517/1 "2012-08-31T12:17:12Z")

</div>

hi,

i’ve setup pop3/imap4 proxy using nginx recently, everything work great,  
unless i cannot obtain client ip address, i’m using external auth\_http  
server run on apache/php.

How do i forward client ip from nginx to apache auth server? something  
like ‘X-Forwarded-For’ in http reverse proxy.  
this is what i have done so far by adding auth\_http\_header

mail {  
…  
…

```
   server {
         protocol pop3;
         listen 110;
         starttls on;
         auth_http_header X-Auth-Client-IP $remote_addr;
   }

```

}

i still seeing nginx ip address in apache log  
i need some enlightenment here

TIA

PT.CITRA SARI MAKMUR  
SATELLITE & TERRESTRIAL NETWORK

Connecting the distance - anytime, anywhere, any content

> **[PT. Citra Sari Makmur - Connecting the distance](http://www.csmcom.com)**
>
> PT Citra Sari Makmur (CSM) - Satellite and Terrestrial Network

---

<div class="post-metadata">

**Author:** ![Hari\_Hendaryanto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/57b2e6/32.png) [@Hari\_Hendaryanto](https://www.ruby-forum.com/u/Hari_Hendaryanto)\
**Post date:** [August 31, 2012, 12:47pm UTC](https://www.ruby-forum.com/t/client-ip-mail-proxy/222517/2 "2012-08-31T12:47:36Z")

</div>

On Aug 31, 2012, at 14:06 , Hari Hendaryanto wrote:

> i need some enlightenment here  
> A client IP is sent in “Client-IP” header by default.

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![Hari\_Hendaryanto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/57b2e6/32.png) [@Hari\_Hendaryanto](https://www.ruby-forum.com/u/Hari_Hendaryanto)\
**Post date:** [August 31, 2012, 1:42pm UTC](https://www.ruby-forum.com/t/client-ip-mail-proxy/222517/3 "2012-08-31T13:42:34Z")

</div>

On 8/31/2012 5:47 PM, Igor S. wrote:

> > …
> > 
> > i still seeing nginx ip address in apache log  
> > i need some enlightenment here  
> > A client IP is sent in “Client-IP” header by default.
> 
> –  
> Igor S.

ah., yes i missed that.

thanks

PT.CITRA SARI MAKMUR  
SATELLITE & TERRESTRIAL NETWORK

Connecting the distance - anytime, anywhere, any content

> **[PT. Citra Sari Makmur - Connecting the distance](http://www.csmcom.com)**
>
> PT Citra Sari Makmur (CSM) - Satellite and Terrestrial Network
