cPanel & WHM Version 114 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Set Exim smtp_active_hostname based on IP being connected to

Volox shared this idea 4 years ago
Open Discussion

As a system administrator, I would like smtp_active_hostname variable to be set based on the IP that is being connected to when there are accounts that are set to use a dedicated IP, so that other settings and functionality of exim that use the variable can use the correct server name rather than the mis-matched underlying primary server name.


The smtp_active_hostname is used in a number of places to set the correct server name in headers etc. In order to support smarthosts where a dedicated IP is intended to be used for a specific account / domain, the smtp_active_hostname should be set based on the IP address that the client is connecting to.

The current workaround is to use the /etc/mail_reverse_dns file (like below). It would be nice if this was either set this way by default or if the smtp_active_hostname defaulted correctly when the setting isn't explicitly set.

smtp_active_hostname= ${ifmatch_ip{$sender_host_address}{+loopback}{$primary_hostname}{${lookup{$received_ip_address}lsearch{/etc/mail_reverse_dns}{$value}{$primary_hostname}}}}

Replies (1)


I would also note that sender_rcvhost doesn't seem to be set based on the dedicated IP connection either. It would also be great to have that variable set correctly as well.

Leave a Comment
Attach a file