On a Centos 6.6 server we have typically 3-4 Failover IP's that we distribute among our domains. In this way postfix, when sending outgoing email, binds to the IP linked for the domain separtating the reputation status of each IP.
The only problem is that postfix uses the hostname value as HELO-name and that hostname value does not correspond to the reverse DNS of the IP address actually used.
The way we distribute binding IP's is through the sender_dependent_transport_maps by which we define a series of smtp transport daemons in
/etc/postfix/master.cf and we map the different domains to the transports with a berkeley_db. This technique is very well explained here:
In our case, the master.cf line for the SMTP daemon looks like the following:
outgoing-10.10.10.20- unix - n n - - smtp -o smtp_bind_address=10.10.10.20 -o smtp_bind_address6= -o smtp_address_preference=ipv4
We need two improvements with this approach:
The smtp_helo_name should be generated dynamically from a reverse DNS lookup (everytime postfix or the smtp daemon starts) and not hardcoded in a configuration file.
The master.cf line is also generated automatically from our panel software without the smtp_helo_name option. Ideally we would like to have this assignment defined in main.cf and be propagated to all smtp daemons.
Is there a way to assign the smtp_helo_name from reverse DNS lookup of the bound address and ideally at main.cf?