Selecting Client Name Based On IP Version
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.) more generally: can I arrange it so that I can select the EHLO/HELO name based on the destination host and protocol? Then intra-domain communication can use a local domain name. Cheers, Sabahattin
Re: Selecting Client Name Based On IP Version
Sabahattin Gucukoglu: > 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.) > > more generally: can I arrange it so that I can select the EHLO/HELO > name based on the destination host and protocol? Then intra-domain > communication can use a local domain name. I don't understand the question. - Intra-domain communication. Is this IPV4 only? IPv6 only? Both? - IPv4 communication. To the local domain? To the outside world? Both? - IPv6 communication. To the local domain? To the outside world? Both? There currently exists no support for making parameters IP protocol dependent - with almost 900 configuration parameters, it is already quite complicated. Wietse
Re: Selecting Client Name Based On IP Version
On Mon, Jan 09, 2012 at 08:37:48PM +, 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? HTH