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.

Mass Update /etc/localdomains and /etc/remotedomains

Discussion in 'General Discussion' started by acenetryan, Jun 4, 2008.

  1. acenetryan

    acenetryan Well-Known Member
    PartnerNOC

    Joined:
    Aug 21, 2005
    Messages:
    197
    Likes Received:
    1
    Trophy Points:
    18
    I understand that when you edit the DNS zone in WHM, WHM will automatically check the MX record and place the domain in the correct file, localdomains vs. remotedomains. I would like to run this from the command line for all domains on the server. Is the script which WHM uses available to us on the command line? I've tried searching the forums and our /scripts directory but have been unable to locate it.
     
  2. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    /scripts/forcelocaldomain
    /scripts/checkalldomainsmxs

    will be added in the next release , edge, and current builds.
     
  3. jandafields

    jandafields Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    426
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Would there be any problem adding "/scripts/checkalldomainsmxs" to daily cron? This would be beneficial because clients sometimes change their nameservers at the registrar, and the cPanel server does not know about the change, causing email problems. If this script is run daily, cPanel will know to stop handling emails for that domain.

    I see that as an advantage. Are there any disadvantages???
     
  4. jandafields

    jandafields Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    426
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I noticed that this script adds all "fake" domains to remotedomains. (Domains that are not registered at any official registrar, but are in the servers dns.)

    I think it may be better to leave those domains in localdomains, or leave them out completely, and only put domains into remotedomains that have mx's that are actually pointing off of the server.

    Also, this might also depend on whether or not resolv.conf points at your own server. Mine does not, which might explain this.

    A bit off topic, but is it still a bad idea to point resolv.conf to your own server?
     
Loading...

Share This Page