simplest way to copy /etc/localdomains to another server

SpiritAu

Active Member
Feb 23, 2003
32
0
156
Aussie Land!
Hi All,

We're looking at offering secondary MX on all our cpanel servers.

Now my thinking is we setup a second server somewhere with exim and use /etc/secondarymx.

What i'm thinking is whats the best way to copy /etc/localdomains (currently have 8 servers), to the offsite server, what i'm ideally looking for is a way to set it up so that if a transfer fails it dosn't blank out the file.

Now my thinking was using a PHP script to include /etc/localdomains.server1, /etc/localdomains.server2, etc...

Whats the best way to copy them across? I was thinking FTP but unsure if theres a better way.

Also thinking of having all mail on the secondary mx server being scanned for spam and viruses. Does anyone have any recommendations?
 

bignose

Active Member
Jan 3, 2007
34
0
156
you could use SCP to push the files from the servers to the one server that collects them all.

and just setup a public key so it doesn't ask for password.

make sure the remote machine recieves the files as a non root account, so you aren't giving unfettered root to root access.
 

bazzi

Well-Known Member
May 23, 2004
119
0
166
store it in a database and let your secondary mx servers get the domains every our (so do we do it).
The advantage is that you can have more production servers use the same secondary mx servers.

If people want to have the files, we will make it public.