Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

maildirsize not updated after administrator delete

Discussion in 'E-mail Discussions' started by wizardgmb, Jan 15, 2018.

  1. wizardgmb

    wizardgmb Registered

    Joined:
    Jan 15, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Central Virginia
    cPanel Access Level:
    Website Owner
    I read some of my email accounts while logged in as the web site administrator. One account in particular, for receiving retailer mailings, gets a lot of mail and sometimes I ignore it for awhile. In response to a cPanel 90% full message in my off server administrator mail account, I go into the account and do mass deletions of out of date messages to bring the disk usage down to 10% or less. A few days later I get another notification for 95% full and they continue until cPanel thinks 100% of the allotted disk space is used and the account is suspended.

    For some reason the maildirsize file doesn't get updated when deletions are done from the administrator account. I have to delete maildirsize, cPanel creates a new one and all is fine until the next time I get a cPanel message saying a mail account is getting full. This problem has dogged me across five hosting providers and the solution has always been to delete maildirsize.

    Can anything be done to get cPanel to update maildirsize when the administrator deletes messages?
     
  2. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    27
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Hi @wizardgmb,

    Could you share the exact method and steps you are using to remove the mail?

    Running either of the following commands should ensure mail quotas are properly updated:
    Code:
    # /scripts/generate_maildirsize --help
    
    or 
    
    # doveadm quota recalc -u $username
    
    Thanks,
     
  3. wizardgmb

    wizardgmb Registered

    Joined:
    Jan 15, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Central Virginia
    cPanel Access Level:
    Website Owner
    Thank you for the response. I'll do my best to explain how I read email on my hosted web server.

    I read mail using the Roundcube program, logging in as the web site administrator. Using the "folder actions" icon in the lower left corner of the Roundcube folder display, I have added the folders of the email accounts I use most often along with the pre-existing administrator/default, inbox, drafts, sent, junk and trash folders. I routinely read and delete mail from the added folders for a dozen accounts. When the problem folder gets close to full, I will sort it to find messages of importance and move them to a different folder. Once I'm sure I have any important messages, I use the "select all" option and delete remaining messages to the trash folder. Then I go into the trash folder, do another "select all" and permanently delete the messages. At this point, the maildirsize should be updated to reflect drastically lower disk usage. I have learned that the same situation occurs if the messages are left in the trash folder without being permanently deleted. I understand that since the messages still occupy disk space.

    My other accounts never come close to their disk limit so I assume the 3x a year deletion of maildirsize keeps them from ever reaching the limit even though I use basically the same method of reading their messages. With the other accounts, I delete 1-5 messages at a time and occasionally all 50 of the displayed messages. Once a week or so, I permanently delete all the messages that accumulate in the trash folder.

    I hope this helps.

    I believe the first commands you provided requires server root access that I don't have. Will my limited hosting access allow me to use the second command? If not, I'll have to stick to deleting the maildirsize file.
     
  4. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    27
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Thanks for the details @wizardgmb. It's not uncommon that disk usage takes a bit longer to update; however, an alert days after cleaning mail is strange. There is the tweak setting WHM > Tweak Setting: "Cache disk quota information", that may be worth trying. The 'doveadm quota recalc -u $username' should work from the cPanel user's shell. The method you are using shouldn't prevent dovecot from updating its quota.

    I'd consider opening a ticket or raising the issue with your host. Having some hands-on access may shed more light on the issue.
     
  5. wizardgmb

    wizardgmb Registered

    Joined:
    Jan 15, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Central Virginia
    cPanel Access Level:
    Website Owner
    I have opened tickets with five different hosting providers and every time the resolution has been deleting the file or some other operation that wasn't shared with me. I tried to get the providers to report the problem to you but nobody seemed interested in elevating a problem that was found by one quirky user. Earlier this week when I opened a ticket, I spent over a half-hour explaining the problem to support and stopping the person from deleting the mail account instead of dealing with the usage values. My knowledge of Linux & hosting is minimal so trying explain and get interest in pursuing the proper course of action is difficult at best.

    Perhaps your software test staff can recreate the problem, observe the results and find a remedy.
     
  6. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    27
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    @wizardgmb, please feel free to open a ticket with us directly and we will check the issue for you(see my signature).
     
Loading...

Share This Page