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.

Default Email Disk Space Usage Not Updating

Discussion in 'E-mail Discussions' started by jerdoggmckoy, Jun 11, 2013.

  1. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Hello, I have changed my server settings so the default email account doesn't capture all of the emails. Now I am going through each account and running the following ssh commands to empty those email accounts:

    Code:
    $ cd /home/username/mail
    $ rm -rf cur
    $ rm -rf new
    When I visit each accounts' default email address and try logging into webmail, it shows that there are no emails anywhere to be found. However, the default email account disk space usage does not seem to be updating to match despite waiting several days. Anyone know how to force the calculation update or maybe know what else might be going on here?

    Thanks in advance for any help!
     
  2. zontrakulla

    zontrakulla Active Member

    Joined:
    Jan 16, 2008
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Try
    Code:
    /scripts/generate_maildirsize --confirm --allaccounts --verbose cpaneluser
    Change cpaneluser to each username in your server.
     
  3. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Thanks for the help. I tried your suggestion, and now when I check it says "[an error occurred while processing this directive] 0 bytes" And when I click on that error link it brings up the following:

    Code:
    Can't stat /home/realty/mail/cur: No such file or directory
    	File::Find::_find_opt('HASH(0x91998b0)', '/home/realty/mail/cur', '/home/realty/mail/new', '/home/realty/mail/.Drafts/cur', '/home/realty/mail/.Drafts/new', '/home/realty/mail/.Junk/cur', '/home/realty/mail/.Junk/new', '/home/realty/mail/.Sent/cur', ...) called at /usr/local/cpanel/perl/File/Find.pm line 743
    	File::Find::find('HASH(0x91998b0)', '/home/realty/mail/cur', '/home/realty/mail/new', '/home/realty/mail/.Drafts/cur', '/home/realty/mail/.Drafts/new', '/home/realty/mail/.Junk/cur', '/home/realty/mail/.Junk/new', '/home/realty/mail/.Sent/cur', ...) called at /usr/local/cpanel/Cpanel/Email/DiskUsage.pm line 142
    	Cpanel::Email::DiskUsage::_maildirsize_handler('rename', undef, 'maildir', '/home/realty/mail', 'create_maildirfolder', 1) called at /usr/local/cpanel/Cpanel/Email/DiskUsage.pm line 43
    	Cpanel::Email::DiskUsage::calcdiskused('/home/realty', '_mainaccount', '', undef, undef, '/home/realty/mail', undef) called at /usr/local/cpanel/Cpanel/Email/DiskUsage.pm line 27
    	Cpanel::Email::DiskUsage::mainacctdiskused('/home/realty') called at /usr/local/cpanel/Cpanel/API/Email.pm line 459
    	Cpanel::API::Email::get_main_account_disk_usage('Cpanel::Args=HASH(0x918f9a0)', 'Cpanel::Result=HASH(0x918f8e0)') called at /usr/local/cpanel/Cpanel/API.pm line 60
    	Cpanel::API::_execute('Email', 'get_main_account_disk_usage', undef) called at /usr/local/cpanel/Cpanel/API.pm line 238
    	Cpanel::API::wrap_deprecated('Email', 'get_main_account_disk_usage') called at /usr/local/cpanel/Cpanel/Email.pm line 1321
    	Cpanel::Email::mainacctdiskused('') called at cpanel line 1806
    	eval {...} called at cpanel line 1806
    	main::real_exectag('<cpanel Email="mainacctdiskused()">') called at cpanel line 4118
    	main::dotag_finished_headers(0) called at cpanel line 3942
    	main::cpanel_parseblock('<cpanel Email="mainacctdiskused()">^J') called at cpanel line 3856
    	main::y('GLOB(0x8ccdd70)') called at cpanel line 5174
    	main::run_standard_mode() called at cpanel line 767
    
    Any thoughts?
     
  4. ThinIce

    ThinIce Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    346
    Likes Received:
    7
    Trophy Points:
    18
    Location:
    Disillusioned in England
    cPanel Access Level:
    Root Administrator
    This may be a failure due to your deletion (rather than emptying) of the directories. You can simply recreate these with the ownership of each account and permissions of 700
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, you can remove the files within those directories, but you should not delete the directories (e.g. cur, new) themselves.

    Thank you.
     
  6. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Thank you for your help everyone! When I was trying to find a way to clean out those default email accounts I was just following something I had read at this thread here: http://forums.cpanel.net/f5/easy-way-delete-80000k-emails-34255.html - So you guys are saying that technique is not the best way to clear out those default email accounts?
     
  7. ThinIce

    ThinIce Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    346
    Likes Received:
    7
    Trophy Points:
    18
    Location:
    Disillusioned in England
    cPanel Access Level:
    Root Administrator
    It's okay to use provided you recreate the directories afterwards with the right ownership and permissions, it's best not to leave accounts in a technically broken state. If you want an easier way of doing this from whm non destructively give CMM a whirl

    ConfigServer Mail Manage
     
  8. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Excellent resource, thank you!
     
Loading...

Share This Page