Thisisit,
Thanks for your info on here - it got me on the right track.
Here's what I did:
Add to exim.conf:
PHP Code:
smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/domainips}{host.$value}{$primary_hostname}}
Change exim.conf: (previous smtp banner line is commented out)
PHP Code:
#smtp_banner = "${primary_hostname} ESMTP Exim ${version_number} \
smtp_banner = "${smtp_active_hostname} ESMTP Exim ${version_number} \
\#${compile_number} ${tod_full} \n\
SB does not authorize the use of this system to transport unsolicited, \n\
and/or bulk e-mail."
Add to exim.conf: (just after smtp_banner) This will rewrite the received headers - only difference from standard (standard is default and not in any configs) is $smtp_active_hostname replaces $primary_hostname
PHP Code:
received_header_text=
Received: ${if def:sender_rcvhost {from $sender_rcvhostnt}
{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}
${if def:sender_helo_name {(helo=$sender_helo_name)nt}}}}
by $smtp_active_hostname
${if def:received_protocol {with $received_protocol}}
${if def:tls_cipher {($tls_cipher)nt}}
(Exim $version_number)nt
${if def:sender_address {(envelope-from <$sender_address>)nt}}
id $message_exim_id
${if def:received_for {ntfor $received_for}}
Change in exim.conf:
PHP Code:
remote_smtp:
driver = smtp
interface = ${lookup{$sender_address_domain}lsearch{/etc/domainips_reverse}{$value}{YOURPRIMARYIP}}
helo_data = ${lookup{$interface_address}lsearch{/etc/domainips}{host.$value}{$primary_hostname}}
Notice that I use the YOURPRIMARYIP instead of interface address. This is so that if they connected via an IP that was NOT your primary IP (if your shared iP is different than your primary that is paired with your hostname).
Also, I add the text host.$value in the above to make the hostname of the dedicated IP / domain pairs fully qualified - host.yourmailsever.com. I make sure to add a DNS record for host as an A RR.
This seems to work fine - tried even forwarding from one account through 3 others, and all the IP's and hostnames match up with the dedicated IP / domain pairs as they should.
As noted, if you use domain keys, make sure to change the dk_remote_smtp entries, too.
Also, I had an exim_outgoing.conf that I mirrored the same changes in (part of my mailscaner install? not sure why).
NCM