On Mon, Jan 09, 2012 at 08:37:48PM +0000, Sabahattin Gucukoglu wrote:
> One of my Postfix installs runs behind a NAT box. The host
> name for the local private IP is in the .local domain, not
> suitable for public use in SMTP sessions but suitable for
> trace fields. However, on IPv6, the host is a first-class
> citizen on the net and has its own host name.
> Can I arrange it so that the SMTP client uses different names
> in the EHLO/HELO command based on the protocol (IPv4 or IPv6)
> I am connecting with? I do not want IPv6 servers to know
> my server as "natbox.mydomain", but "Bloodstone.mydomain".
> (natbox is the NAT box, anything could run behind that.)
In your place I would put the IPv6 domain name, and not worry
about the HELO being wrong when using IPv4. You could revise
that if you have problems with your correspondents actually
rejecting or downgrading your mail based upon the HELO string,
but I seriously doubt that will happen.
If, from some desire for ultimate perfection, you really want to
have the correct HELO name, then why not add another hostname
that points to the IPv4 address and the IPv6 address, and put
that as your mail server name?