I've got several postfix systems which all have the same configuration except for a few host-specific parameters like: -- myhostname -- mynetworks -- mydestination -- myorigin -- inet_interfaces -- proxy_interfaces -- relay_domains -- virtual_mailbox_domains
Typically, I copy the main.cf to another machine and edit the host-specific values. What would be nice is to have a generic main.cf that can be copied to any machine and which references all host-specific values in external files. In http://www.postfix.org/postconf.5.html, there is no general rule at the top that says a filename can be used for any parameter. So it is evidently available only for some parameters. And some of the above parameters are indeed documented as allowing filenames (mynetworks, mydestination, relay_domains, virtual_mailbox_domains). But I ran into a few problems and have a few questions: 1) myorigin is not documented as allowing a filename. But the Ubuntu Postfix package sets it to /etc/mailname, which seems to work. Perhaps http://www.postfix.org/postconf.5.html should be updated? 2) proxy_interfaces is not documented as allowing a filename. But postfix check and postfix reload accept it. Perhaps http://www.postfix.org/postconf.5.html should be updated? 3) myhostname and inet_interfaces do not accept a filename. Is there a way to set them from a source outside of main.cf (i.e., a file)? 4) When an external filename is used, postconf shows the filename, not the value. That's good when sending postconf -n to this list. But I'd also like to be able to see the actual values Postfix has configured. I can't find a way to do that. Postconf -x only expands $variablename, not the contents filenames. Is there a way to show the actual value assigned to a parameter if it comes from a file? 5) Alternatively, I could place all of the host-specific parameters in a file that is then included into main.cf, such as "!include host-specific-main.cf". But I don't see an include mechanism listed. Does it exist? Thanks for any suggestions. Michael