Author Topic: Mailbox usage bug?  (Read 8160 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Mailbox usage bug?
« on: June 21, 2021, 08:07:58 PM »
Hello,

Mailbox account usage is showing 10x more used space than in reality in admin panel. In user panel that same mail account is showing normal usage.

Any idea? Bug?

Offline
**
Re: Mailbox usage bug?
« Reply #1 on: August 23, 2021, 05:26:17 PM »
try to use the following command and see if it fixes your problem:

doveadm quota recalc -A

this will recalculate the mail quota for all accounts

Offline
*
Re: Mailbox usage bug?
« Reply #2 on: August 24, 2021, 07:07:34 AM »
I greet you with respect, 4 years have passed maybe better, how long do we have to wait until the problem with the e-mail storage space is solved? even now it doesn't work, for example on a domain that I allocated for the 3GB hosting plan, the e-mail shows that it has exceeded by 465% the e-mail quota, but the e-mail works.
if I change the space on each email box, for example I limit it to 500 MB per email box, the user can change it to 0 Mb and it goes unlimited, please let me know when you think this problem is solved, I see that cwp developers are deals with other projects
- cPanel DNS Cluster Ingration
- CWP Cluster (Multi-Server Manager)
- Multi-Language and Multi-Template support for the CWP Admin panel
- Integration with Blesta and WiseCP
by no means solving this rather serious problem.
normally it should be created at the time the hosting plan is created, that space should be allocated for the website and e-mail, or the e-mail accounts should be created in / home / user / not in / var / vmail / and when in which you set the quota of 0 MB on the e-mail box so that the mail no longer works

Offline
*
Re: Mailbox usage bug?
« Reply #3 on: August 24, 2021, 07:55:22 PM »
you probably have some old mail server setup, you should consider rebuilding it from cwp.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Mailbox usage bug?
« Reply #4 on: August 25, 2021, 06:09:34 AM »
Thank you for answering, but I tried all the options, I put a virtual test machine configured fresh, I tried the variants for xfs partition http://forum.centos-webpanel.com/centos-configuration/how-to-setup- user-quotas /, but you don't understand, a cwp user can edit the space allocated for each box in the user control panel, and for example for contact@domain.com instead of 1000 MB it puts 0 MB and then unlimited them.

Because the mails are stored in /var/vmail, when configuring each server I mounted the /var partition separately and allocated 200GB of space and so it now works on 15 cwp pro servers and the users and sites are on /home/USER/public_html

Why not modify cwp pro, when a new USER is created, to put everything in the /home partition.
The mails should be in /home/USER/mail, just like in cPanel, then when we have a 10 GB hosting package, the space is full, the mail doesn't work anymore.

Offline
*
Re: Mailbox usage bug?
« Reply #5 on: August 25, 2021, 07:07:29 AM »
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Mailbox usage bug?
« Reply #6 on: August 25, 2021, 07:28:41 AM »
ok, I have a subnet now of ip, I have to put 15 more servers in the rack and I have to configure them, from what I see in the tutorial, to make a symlink to /vmail, so will the mail quota work correctly? for example, if I make a 5Gb hosting package, and assign it to a user, when it reaches 5GB of space occupied by email, does the e-mail service still work? if the user in the currency in which he creates a new mail box and leaves 0 MB quota? what's going on? .... it has unlimited space ... only that the mails are no longer in /var/vmail, that they will be in /home/vmail ..
I tested this too, I read for weeks the whole cwp forum related to email quota .... you don't have a solution, please don't be upset, but you said 4 or 5 years ago that this problem will be solved even if you look on the forum it's not just me waiting ... I'm sorry

Offline
*
Re: Mailbox usage bug?
« Reply #7 on: August 25, 2021, 01:28:00 PM »
I also put pictures to see what happens

https://prnt.sc/1qhy3wl
https://prnt.sc/1qhy4b8
https://prnt.sc/1qhy2p7

in the third image, in vain I limit the space for each email box, because the user can enter at any time to put 0 MB, and it goes unlimited

Offline
*
Re: Mailbox usage bug?
« Reply #8 on: August 25, 2021, 08:50:29 PM »
if user account has 5GB and for example website has 3GB and mail has 2GB this account will NOT be able anymore to:
- upload files on the website / user account
- receive new emails (all emails will be denied by the mail server)

this is managed by linux quota, so you can check if you have quota working properly on your server.
example command:
Code: [Select]
repquota -a -s
Most issues are custom partition for /var which then has no working quota or if quota is set for / partition and you have additional also /home ....all depends on the server setup.


to have all working /home folder and /var/vmail should be on the same partition and that partition should have quota set.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Mailbox usage bug?
« Reply #9 on: August 26, 2021, 03:37:50 PM »
Hi,

I'm having this same issue. Digging more about it, found out that the mail and db calculations are reporting the wrong size.

In my case, one account has home folder reported correctly, but mail disk usage are show as 37 MB (Yes, mega-byte) instead of 37 GB disk usage for all mails from that account, that's why I was assuming the disk quota usage was not working. Another account with total mail usage 1.4 GB is reporting 1.4 MB, and all others have the same issue, so there is a problem in calculating mail and DB usage, not in system quota.

Also, found in user home folder, .conf/.cachespaces.json that are created when user logs in in cwp portal, when I change the size manually in this file adding the missing numbers, it show correct, but if I delete the file, it re-creates again with wrong size.

# cat .cachespaces.json
     {"packname":"Adv1","packquota":"100000","sizehome":0,"sizemysql":0,"sizemail":37303.16,"sizebackup":0,"quota":"2992936\n"}

# du -s /var/vmail/someaccount/
38466848        /var/vmail/someaccount/


Hope this helps in fixing the bug (wich I think this is)

Offline
*****
Re: Mailbox usage bug?
« Reply #10 on: August 26, 2021, 09:50:48 PM »
Thanks for the report, we have solved this problem and it will be available in our new version

Offline
*
Re: Mailbox usage bug?
« Reply #11 on: August 28, 2021, 01:24:12 PM »
Thanks for the report, we have solved this problem and it will be available in our new version

Thanks too for your reply.

Another thing, I don't know if it is related to this same problem and if its already fixed, but usage in user portal are shown as 0% like in the screenshot on this link https://drive.google.com/file/d/1cL-p4GlyeR1yZKJH2FawM-JIA7OVMHDC/view?usp=sharing.

FYI, my current version is CWPpro version: 0.9.8.1082

Offline
*
Re: Mailbox usage bug?
« Reply #12 on: August 30, 2021, 06:54:37 AM »
nothing has been resolved, if you log in with root and go directly to -email-> Email Accounts- you will see that the quota looks wrong, if you log in to any of the users created, yes you are right Anderson Alipio, exactly what happens you posted above, quota 0.
I also tested this:

edit the main dovecot file
nano /etc/dovecot/dovecot.conf
and make sure
mail_location = maildir:/home/%u/%d/%n
save and exit

edit this one
nano /etc/dovecot/dovecot-mysql.conf

and change all the /var/vmail links to the path you need mine is posted bellow

# following should all be on one line.
password_query = SELECT username as user, password, concat('/home/%d/', maildir) as userdb_home, concat('maildir:/home/%d/', maildir) as userdb_mail, 101 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'

# following should all be on one line
user_query = SELECT concat('/home/%d/', maildir) as home, concat('maildir:/home/%d/', maildir) as mail, 101 AS uid, 12 AS gid, CONCAT('*:messages=0:bytes=', quota) as quota_rule FROM mailbox WHERE username = '%u' AND active = '1'

iterate_query = SELECT username AS user FROM mailbox

But unfortunately it doesn't work properly, errors occur, it definitely needs to be modified in a lot of places and if you rebuild your mail services, all the settings need to be redone

it doesn't work ... don't try on production, the e-mail boxes should be in /home/USER/mail correctly, as I said before as in cPanel ...
For studio4host and josemnunez, you know how quota works in cPanel, this change should be made to cwp, I think this is a priority.

Offline
*
Re: Mailbox usage bug?
« Reply #13 on: August 30, 2021, 03:19:39 PM »
Hi,

I'm having this same issue. Digging more about it, found out that the mail and db calculations are reporting the wrong size.

In my case, one account has home folder reported correctly, but mail disk usage are show as 37 MB (Yes, mega-byte) instead of 37 GB disk usage for all mails from that account, that's why I was assuming the disk quota usage was not working. Another account with total mail usage 1.4 GB is reporting 1.4 MB, and all others have the same issue, so there is a problem in calculating mail and DB usage, not in system quota. j'ai commandé ce tapis

Also, found in user home folder, .conf/.cachespaces.json that are created when user logs in in cwp portal, when I change the size manually in this file adding the missing numbers, it show correct, but if I delete the file, it re-creates again with wrong size.

# cat .cachespaces.json
     {"packname":"Adv1","packquota":"100000","sizehome":0,"sizemysql":0,"sizemail":37303.16,"sizebackup":0,"quota":"2992936\n"}

# du -s /var/vmail/someaccount/
38466848        /var/vmail/someaccount/


Hope this helps in fixing the bug (wich I think this is)

Thank you, worked for me !