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.

Our /etc/localdomains is absolutely incorrect!

Discussion in 'General Discussion' started by jackie46, Sep 26, 2005.

  1. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    We have websites galore in /etc/localdomains that are no longer on the server. Most of these domains were owned by resellers at one stage who cancelled their account yet /etc/localdomains still contains those domains and some domain names in there dont even make sense.

    eg

    020104.nsbailey.com
    020803.nsbailey.com
    030104.nsbailey.com
    031003.nsbailey.com
    050403.nsbailey.com
    050403add.nsbailey.com
    050503.nsbailey.com
    050903.nsbailey.com
    111003.nsbailey.com
    120404.nsbailey.com
    140204.nsbailey.com
    150204.nsbailey.com
    181003.nsbailey.com
    200903.nsbailey.com
    230104.nsbailey.com
    260403.nsbailey.com
    260603.nsbailey.com
    260703.nsbailey.com
    310104.nsbailey.com


    What are these? nsbailey.com was a valid domain on our server once, about 1yr ago but is no longer on our server. Why is this domain still in localdomains, better yet, whats with all the numbers in front of the domain name? :confused: :confused: :confused:

    There are other domains in localdomains that should not be there. How do we clean up the list? :eek: Looking at my other servers i can verify that when a domain gets deleted its not being removed from localdomain!
     
    #1 jackie46, Sep 26, 2005
    Last edited: Sep 26, 2005
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I'd suggest that you take a copy of the file and then empty out /etc/localdomains and then run:

    /scripts/mailperm
    /scripts/updateuserdomains


    They should repopulate those files with all the configured domains in /var/cpanel/users/* and those not in /etc/remotedomains if the MX records are for off-server.
     
  3. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    What is clobbering 'localdomains' in /etc ?

    Every now and then customers tell me they cant get email and they get the "is currently
    not permitted to relay through this server. Perhaps you have not logged into the
    pop/imap server in the last 30 minutes or do not have SMTP Authentication" error.

    Almost always turns out their domain is not in "localdomains" in the "/etc" folder.

    I see over 200 domains in there but sure enough one or two are missing and have to be re-added manually. They were there for months or more than a year but suddenly they are gone.

    What is causing this?. My users get furious when this happens as they might not realize it for a day and then all their mail is lost or bounced. Some complain they get taken off lists or mail groups because of this.

    Today we had two of them but they didnt appear to have made a changes to their accounts, nothing on the server was updated, etc.

    Is there something I can run manually to ensure "localdomains" is populated with the correct domains, maybe doing it once in a while if I think something is goofy instead of waiting for the complaint from users?.
     
  4. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    I tried this on my server this morning and the "localdomains" that was created was SMALLER and was missing several domains that were in the "localdomains" before I ran the two items above.

    :confused:
     
  5. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Make sure that those domains missing from your /etc/localdomains from time to time are not in the file /etc/remotedomains

    If they are, remove them.

    Also check /var/cpanel/users/$user /etc/userdomains for each domain and make sure the details (users) are firstly there and secondly, correct, for each domain. Look at /scripts/mailperm to see how things get rebuilt regarding mail users too.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If legitimate domains have been removed you need to check the relevant user files in /var/cpanel/users/* to make sure that they're correctly listed.
     
Loading...

Share This Page