# : IPv6 SMTP proxy with XCLIENT

**URL:** <https://www.ruby-forum.com/t/ipv6-smtp-proxy-with-xclient/210975>\
**Category:** NGINX\
**Created:** [August 22, 2011, 2:48pm UTC](https://www.ruby-forum.com/t/ipv6-smtp-proxy-with-xclient/210975 "2011-08-22T14:48:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [August 22, 2011, 2:48pm UTC](https://www.ruby-forum.com/t/ipv6-smtp-proxy-with-xclient/210975/1 "2011-08-22T14:48:43Z")

</div>

Hello!

There is a issue with XCLIENT support when nginx listener is IPv6  
enabled.  
Nginx sends the following command to upstream SMTP server:

XCLIENT ADDR=2001:15c0:65ff:xxxx::yyyy NAME=[UNAVAILABLE]

According to postfix docs ([Postfix XCLIENT Howto](http://www.postfix.org/XCLIENT_README.html))  
IPv6  
client addresses should be prefixed with “IPV6:” string, so nginx should  
send  
the following xclient command to upstream:

XCLIENT ADDR=IPV6:2001:15c0:65ff:xxxx::yyyy NAME=[UNAVAILABLE]

Attached patch fixes this issue. It would be great if it would be  
included in  
upstream after careful review.

Best regards, Brane

---

<div class="post-metadata">

**Author:** ![SSBrane\_FSGraSSnar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@SSBrane\_FSGraSSnar](https://www.ruby-forum.com/u/SSBrane_FSGraSSnar)\
**Post date:** [August 22, 2011, 3:06pm UTC](https://www.ruby-forum.com/t/ipv6-smtp-proxy-with-xclient/210975/2 "2011-08-22T15:06:42Z")

</div>

Hello!

On Mon, Aug 22, 2011 at 02:45:19PM +0200, Brane F. Gračnar wrote:

> XCLIENT ADDR=IPV6:2001:15c0:65ff:xxxx::yyyy NAME=[UNAVAILABLE]
> 
> Attached patch fixes this issue. It would be great if it would be included in  
> upstream after careful review.

Thank you, the problem is definitely valid, though I don’t like  
the patch. It should check address family instead of searching  
for “:” in address text representation. I’ll take a look as time  
permits.

Maxim D.

---

<div class="post-metadata">

**Author:** ![SSBrane\_FSGraSSnar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@SSBrane\_FSGraSSnar](https://www.ruby-forum.com/u/SSBrane_FSGraSSnar)\
**Post date:** [August 23, 2011, 11:30am UTC](https://www.ruby-forum.com/t/ipv6-smtp-proxy-with-xclient/210975/3 "2011-08-23T11:30:25Z")

</div>

On Monday 22 of August 2011 15:06:16 Maxim D. wrote:

> Thank you, the problem is definitely valid, though I don’t like  
> the patch. It should check address family instead of searching  
> for “:” in address text representation. I’ll take a look as time  
> permits.

Here is updated patch; it no longer uses string functions.

Regards, Brane
