The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

copy rbl settings across multiple servers

Discussion in 'General Discussion' started by hostmedic, Jan 17, 2012.

  1. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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 ?
     
  2. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    745
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    I would check out our Edge version. We have a lot of changes to our exim configuration management that may help you with this.

    Thanks!
     
  3. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    good to know.

    I try to stick away from the edge.... my fat a** might fall in ... ha ha .

    Will try it on a test system - thanks for the reply and update.
     
  4. Brian

    Brian Well-Known Member

    Joined:
    Dec 1, 2010
    Messages:
    117
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    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.
     
  5. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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.
     
Loading...

Share This Page