Old email account cannot be deleted after changing domain name of account.

SuperBaby

Well-Known Member
Nov 27, 2003
343
0
166
Thailand
cPanel Access Level
Website Owner
Twitter
I saw someone also mentioned about this but there was no solution.

Under WHM, I restored a *.tar.gz file and re-created an old account. After that, I changed the domain from olddomain.com to newdomain.com.

Under cPanel of that account, it shows me:

[email protected] (which was added before the account was deleted earlier)
[email protected] (which I just added)

I tried to delete [email protected] but it said I have no access to this domain.

I checked httpd.conf and there was no occurrence of olddomain.com.

How do I manually remove this old email account?
 

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
I saw someone also mentioned about this but there was no solution.

Under WHM, I restored a *.tar.gz file and re-created an old account. After that, I changed the domain from olddomain.com to newdomain.com.

Under cPanel of that account, it shows me:

[email protected] (which was added before the account was deleted earlier)
[email protected] (which I just added)

I tried to delete [email protected] but it said I have no access to this domain.

I checked httpd.conf and there was no occurrence of olddomain.com.

How do I manually remove this old email account?
1- check if the email account folder exists as /home/user/mail/olddomain.com/xxx
2- check if there is folder /home/etc/olddomain.com and if so remove it.
3- Logout of cPanel, backup the files 'email_accounts.yaml' and empty 'email_accounts.cache' in /home/user/.cpanel/ and try to log in to cPanel again.
4- If it still does not work, run '/scripts/whoowns olddomain.com' and see if this gives you a clue.
 

SuperBaby

Well-Known Member
Nov 27, 2003
343
0
166
Thailand
cPanel Access Level
Website Owner
Twitter
1- check if the email account folder exists as /home/user/mail/olddomain.com/xxx

No. Only the new domain is available under "mail" directory.

2- check if there is folder /home/etc/olddomain.com and if so remove it.

No. Only the new domain is available under "mail" directory.

3- Logout of cPanel, backup the files 'email_accounts.yaml' and empty 'email_accounts.cache' in /home/user/.cpanel/ and try to log in to cPanel again.

This seems to solve the problem. Thanks.

4- If it still does not work, run '/scripts/whoowns olddomain.com' and see if this gives you a clue.
 

Metro2

Well-Known Member
May 24, 2006
537
77
178
USA
cPanel Access Level
Root Administrator
I'm experiencing this problem as well with one account.

I tried JPC-Howards checklist / procedure below:

1- check if the email account folder exists as /home/user/mail/olddomain.com/xxx
2- check if there is folder /home/etc/olddomain.com and if so remove it.
3- Logout of cPanel, backup the files 'email_accounts.yaml' and empty 'email_accounts.cache' in /home/user/.cpanel/ and try to log in to cPanel again.
4- If it still does not work, run '/scripts/whoowns olddomain.com' and see if this gives you a clue.
1 - don't see a folder for it in the old domain
2 - don't see a folder for it in etc for old domain
3 - tried this, but it didn't change anything
4 - ran that script, but it returns nothing (no text, no answer)

Any more tricks up your sleeve JPC-Howard? Anyone else maybe?

Thanks for any advice at all!


UPDATE - FOUND A SOLUTION THAT WORKED FOR ME HERE - http://forums.cpanel.net/f43/defined-email-addresses-file-db-location-137637.html More specifically - http://forums.cpanel.net/f43/defined-email-addresses-file-db-location-137637.html#post591297
 
Last edited: