Email accounts disappeared from cPanel.

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
Hello,
Very weird thing happened yesterday. One of the domains on cpanel server:

cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
CENTOS 5.3 i686 standard on web10

had this problem - in cPanel all their email accounts suddenly disappeared. Folders for email accounts did not disappear - they do exist, but cpanel does not show them and - all emails to these accounts are being rejected by the server. I then tried to create test email account on that domain and suddenly all email accounts appeared in cpanel on email list. But when trying to send an email to them - emails are being rejected back. Although email are being delivered to that test account without any problem.

What could be wrong?

Client is very nervous, so I am going to recreate his email accounts, just to make them work.. but in practice, in 5+ years, I have never seen such problem. What is wrong - what settings could be bad or screwed?

Anton.
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
Here is an error message I am receiving back, by the way.

Code:
   ----- The following addresses had permanent fatal errors -----
<[email protected]>
    (reason: 550 ")

   ----- Transcript of session follows -----
... while talking to web10.sircon.net.:
>>> >>> DATA
<<< 550 "
550 5.1.1 <[email protected]>... User unknown
<<< 503-All RCPT commands were rejected with this error:
<<< 503-"
<<< 503 Valid RCPT command must precede DATA
I did try "upcp --force" as well with no luck.
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
432
47
178
Latvia
cPanel Access Level
Root Administrator
I have deleted all email accounts from cPanel and created them again. Now mail for them is working. Do you still think it is worth to create support ticket?

Anton.
 

MaraBlue

Well-Known Member
May 3, 2005
332
2
168
Carmichael, CA
cPanel Access Level
Root Administrator
Just wanted to add, I just had the same thing happen on only one account (the only account on it's own IP). The account's site still works, the files are on the server, FTP works, but the account is not visible through WHM and the POP/IMAP accounts were wiped out.

This happened immediately after I upgraded to PHP 5.2.11/Apache 2.2.13, so it may or may not be for the same reason as the OP.

I came here looking to see if anyone else had this happen and found a resolution. If I can't fix it myself I'll submit a support ticket.

EDIT: I tried: /scripts/upcp --force but it didn't solve the problem. What did, at least as far as the allowing the "missing" domain to be seen within WHM, was to add the domain name back into:
Code:
/etc/trueuserdomains
And then fixed
Code:
 /etc/userdomains
, one domain was assigned to the hostname's user (I'm not even going to guess how/why that happened),

restarted cpanel for good measure
Code:
/etc/init.d/cpanel restart
And all was well again...all email accounts back as they were, accounts displaying correctly. My, but that was fun...not.
 
Last edited:

Kevinfrom

Well-Known Member
Jan 18, 2008
47
1
56
You would need to verify 2 things.

Does /home/{user}/mail/domain.com/{email_user directory} exist?
Is the email_user located in /home/{user}/etc/domain.com/passwd?

If both of the above are yes then move /home/{user}/.cpanel/email_accounts.yaml and email_accounts.cache out of the way then log back into cPanel and verify the email accounts are still missing or not.

But if you recreated the missing email accounts already then there is nothing to check.
 

MaraBlue

Well-Known Member
May 3, 2005
332
2
168
Carmichael, CA
cPanel Access Level
Root Administrator
You would need to verify 2 things.

Does /home/{user}/mail/domain.com/{email_user directory} exist?
Is the email_user located in /home/{user}/etc/domain.com/passwd?

If both of the above are yes then move /home/{user}/.cpanel/email_accounts.yaml and email_accounts.cache out of the way then log back into cPanel and verify the email accounts are still missing or not.

But if you recreated the missing email accounts already then there is nothing to check.
I recreated the email accounts I could remember, but missed a few. When I did the listed steps, all the "missing" email accounts came back (inside of WHM, I use ConfigServer's "Mail Manage"), and the accounts were "back" in the locations you mentioned as well, with all the original timestamps. It's not that the files themselves were removed, it's that WHM/cPanel couldn't see them.

This bugs me because there was no reason for any of this to happen. From what I can tell, it only happened to my own account/site, no idea why. And again, all I did was upgrade PHP and Apache, nothing else.

I had another domain parked on mine, and in the PHP/Apache upgrade that other domain got assigned to my username, and my domain was removed from the list of domains.

Things are working, and yet still screwy inside of cPanel/WHM, where it's claiming my domain is parked on the hostname, which obviously isn't true.
 
Last edited: