copy rbl settings across multiple servers

hostmedic

Well-Known Member
Apr 30, 2003
543
0
166
Washington Court House, Ohio, United States
cPanel Access Level
DataCenter Provider
Is there a way for us to use rsync and copy the RBL settings we have across all our cpanel systems.
It was fine back in the day when we had 25 or 30 servers - but going through all of them and doing updates to include new rbl's - turning them on, adding the same ACL's over and over - is a bit of a pain in the rear.

Any thoughts ?
 

Brian

Well-Known Member
Dec 1, 2010
117
3
68
Texas
cPanel Access Level
Root Administrator
An RBL being enabled/disabled is stored as an exim local option.

This command will show you what the settings look like in /etc/exim.conf.localopts that would need to be mirrored to the destination machine.
Code:
# grep "acl_.*_rbl" /etc/exim.conf.localopts
acl_spamhaus_rbl=1
acl_spamhaus_spamcop_rbl=0
acl_spamcop_rbl=0
Note that if you see any other RBLs beyond that list above, then you've setup custom RBLs. In such a case, you'd need to also be sure to copy the contents of /var/cpanel/rbl_info/ to the new destination server as well.

Further, if you wanted to copy the entire "Exim Configuration" page of settings (except for the "Advanced Configuration" section) then you could just copy /etc/exim.conf.localopts directly to the destination box (still be mindful of if you have custom RBLs as above).

If you also want to copy the "Advanced Configuration" section, that's just a matter of copying /etc/exim.conf.local. Note that exim.conf.local is strictly tied to a template version. If your exim.conf.local is from a newer/older Exim Configuration Template version than the destination server then it can't be copied/restored to it.

Once you've copied whatever files you've chosen to copy, you'll have to instruct cPanel & WHM to rebuild /etc/exim.conf based upon that info.

Code:
/scripts/buildeximconf
As Eric has mentioned, though, the Exim Configuration Editor has gone through a substantial rewrite in 11.31+ (Currently in Edge only) which inherently supports export/import of configurations. So, this process will be substantially easier in 11.31+ let alone able to be accomplished through the UI.

Note: As with anytime you're overwriting files, be sure to backup everything involved before taking any action in this post so you can revert back to how things were if this doesn't work out for you as expected. /etc/exim.conf, /etc/exim.conf.localopts, /etc/exim.conf.local, etc.
 

hostmedic

Well-Known Member
Apr 30, 2003
543
0
166
Washington Court House, Ohio, United States
cPanel Access Level
DataCenter Provider
Brian - awesome response! that is exactly what I needed.

We run a source system for a ton of other things and use rsync quite a bit to push out to each server.
Doing this for exim is a better option.

The new Gui looks nice - but when your pushing out options to roughly 400 systems - rsync is much easier :)
otherwise it is still a ton of login then import save - logout and repeat on another system.