Remove Email From Deleted Domain

tekops

Registered
Jun 2, 2011
4
0
51
My user deleted a domain and none of the email was deleted. In fact, the /home/<user>/mail/.... is all still there taking up space and the user cannot delete any of the mailboxes. We have verified email is still there and are wondering why it did not get deleted and how do we clean it up now?

  • CENTOS 5.11 x86_64 xenhvm – server1
  • WHM 56.0 (build 39)
I didn't find any other thread that might be relevant and we thought perhaps the size was not being recalculated. Only after trying the above suggestion did we discover everything is still there. We logged into the user's account through WHM and confirmed they had deleted the domain.

Thanks,
D
 
Last edited by a moderator:

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Hello,
Please make sure the account removed from the server using below command.
Code:
/scripts/whoowns domain.com
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello,

When you remove an addon domain, it's email accounts will no longer appear in the cPanel interface. However, the contents for it's email accounts still exist in the home/username/mail directory. This is by-design and documented at:

Addon Domains - Documentation - cPanel Documentation

You can re-add the domain name and then manually delete the email accounts before removing the domain name again, or manually remove the data from the /home/$account/mail/$domain directory via the command line or File Manager.

Thank you.