Hmmm, I've just had a play with this and I'm confused with the point of it
as it stands.
I have a lookup based on interface_address and that works but parts where
primary_hostname would be used aren't being replaced by the lookup but are
staying fixed to the "real" configed primary_hostname.
eg.
hick@stum:~$ telnet stum.local smtp
Trying 10.1.1.84...
Connected to stum.local.
Escape character is '^]'.
220 stum.gink.org ESMTP Exim 4.34 Wed, 12 May 2004 10:33:11 +0100
HELO stum.local
250 stum.local Hello stum.local [10.1.1.84]
So it's derived the lookup for smtp_active_hostname for the HELO response,
but not the primary greeting.
It also doesn't seem to be using the smtp_active_hostname for the
*outgoing* EHLO.