I never had a problem to do exactly this ...

For what do you need the hostname of the server?
My main.cf does not contain a hostname - it can easily be used over an NFS share:

mkdir /data
mount server:/data /data
/etc/init.d/postfix stop
cp -rp /etc/postfix /data/postfix_nfs
mv /etc/postfix /etc/postfix_ORIG
ln -s /data/postfix_nfs /etc/postfix
/etc/init.d/postfix start
echo `hostname`| Mail -s `hostname` <account>@<yourdomain>

Works :)

My simple client server main.cf:

postconf -n
config_directory = /etc/postfix
mydomain = <yourdomain>
mynetworks = 127.0.0.0/8
myorigin = $mydomain
relayhost = <your relay>

Where does the hostname kick in at your site?



Rocco Scappatura wrote:
Hello,

I have different SMTP gateways each one configurred exactly at the same
manner. The only difference is the hostname.

I would like to know if I could define "/etc/postfix" as an NFS share
somewhere and export it on each of my SMTP gateways. The aim is
obviously to change only one configuration file each time that a postfix
configuration update is needed.

TIA,

rocsca


Reply via email to