Cannot get or send mail using domain that is on the root account

mauicomp

Member
Mar 3, 2014
6
0
1
cPanel Access Level
Root Administrator
Hi folks,
I have been searching the web for some time now and cannot find information on this.
I have a VPS and I am the root with domain.com.
I have a reseller under that that is resellerdomain.com
Under the reseller are many accounts all migrated and working well.

I can send and receive from any mail account except mail accounts on the main domain of the server.

Any ideas as to what can cause this or hwta I ought to paste here for help?

Many thanks,
Jes
 

mauicomp

Member
Mar 3, 2014
6
0
1
cPanel Access Level
Root Administrator
I dont know how to get to those folders. I am guessing I have to use ssh and not the whm interface yes?
(backstory) I lost my admin just before migrating. He was to do all this. I am adrift and learning fast.
 

mauicomp

Member
Mar 3, 2014
6
0
1
cPanel Access Level
Root Administrator
I see. As I mentioned above I am set adrift by the admin I had.
I am learning to ssh and am having some difficulty but I'll come through it and get back to your instructions.
I'm sure I can't hurt anything ;)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Also, make sure the hostname of your server is not used as a domain name for an account. The hostname should be a subdomain name, such as "server.example.com" and not just "example.com".

Thank you.
 

mauicomp

Member
Mar 3, 2014
6
0
1
cPanel Access Level
Root Administrator
Michael PERFECT I have been looking for just something like that.
I had suspicions about having an account of the same name.

1) Do i need to setup the subdomain somewhere before i change it in 'change hostname'?

2) Will changing the hostname effect sub accounts?

Thanks again

- - - Updated - - -

Thanks for the advice Michael. Now mail wont send on sub accounts and I cant login to WHM via root anymore.
I should take advice in here with a grain of salt I guess.
Now what? How do I recover?

- - - Updated - - -

So I reset the hostname back via my main server control panel.
whm let me login and said my license is not verified.
I enter my IP at the verify page and it comes up good.
I run the ssh commands as instructed and am back.

A bit of warning please when you tell me something that will make the server inaccessible to me.

Thanks.

Now what?
hostname is back to domain.com instead of subdomain.server.com
 

max_payne

Active Member
Feb 1, 2013
33
1
6
cPanel Access Level
Root Administrator
Are you having trouble sending from domain.com to resellerdomain.com? Is mail for resellerdomain.com supposed to be hosted on the same server that the website is hosted on? This is a common problem where, when a new account is added to a server, email is still hosted elsewhere. Any email accounts on that server attempt to send mail locally instead of remotely where mail is actually hosted. You can run a DNS report at intodns.com to confirm this.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
A bit of warning please when you tell me something that will make the server inaccessible to me.
Could you elaborate a little more on the exact change that you made? Updating the hostname of the server should not make it inaccessible. If the license was not validated, simply run the following command:

Code:
/usr/local/cpanel/cpkeyclt
If changing the hostname of your server locks you out of SSH, try accessing it over the IP address. If that fails, there is a much broader issue here that should be addressed.

Please see the following documentation:

WHM - Change Hostname

In particular:

Your hostname is the name by which your physical web server will be known across the Internet. It is important to choose a hostname that will not be used for a cPanel account, is socially acceptable (as it will appear in mail headers), and is a fully qualified domain name (FQDN — this will contain two dots, ‘.’).
Notes:
Your hostname should not begin with www or a number, nor end with a hyphen (-).
FQDNs must also be written in lowercase letters.
These requirements can be reviewed under the Instructions heading, on the main Hostname page.
Could you also clarify what you are referring to as sub accounts? In cPanel, there are accounts, and those accounts can have subdomains. There is no such thing as the "main domain name" of server. There is the hostname, but that should remain separate and not be added to any accounts either as the primary domain name associated with the account or as a parked/addon/subdomain to the account.

Thank you.
 

mauicomp

Member
Mar 3, 2014
6
0
1
cPanel Access Level
Root Administrator
Hi Michael,
I changed hostname in WHM from examples: hostname.com to subdomain.hostname.com
That made the WHM inaccessible and I had to reset the hostname form a non WHM source (My server companies special admin for just that purpose).

I got the license revalidated just fine as I mentioned.

I am aware I have setup my server wrong. I have many client accounts on it and cannot simply redo it from scratch.
I am fixing it live.

1) The main hostname is hostname1.COM (this is also the name of the domain that is my businesses name and I need it to be a website with a cpanel)

2) The one reseller I have made is hostname.NET

3) both hostname.COM and hostname.NET have NS1 and NS2 setup as nameservers

4) I assume I need to switch the master hostname to hostname,NET and somehow make the hostname.COM the reseller

I do not want all my dns to screw up.

A) what i hoped for until now was to have my main hostname be a website with a cpanel. But I am told here and elsewhere not to do that. Is this correct?

So maybe what I want to do is somehow switch the hostname.NET to be the hostname and the hostname.COM to be the reseller account?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Right, you do not want to have your hostname added to an account. Changing your hostname should not make WHM inaccessible. Is it inaccessible from the IP address after changing the hostname as well?

Thank you.