Title: 邮件
Hi Steven,
 
Thanks. Yes, you were rite. When I type the vuserinfo, it is re-calculate the whole directory. But, I have figure out something after this.
 
As you know the vuserinfo will re-generate the maildirsize file once the maildirsize file not exits with the latest file size. So, let say if I have created a folder by using IMAP, then move the email message into the folder and it will append the negative into the maildirsize file. After that, if I delete or any other reason that the maildirsize deleted and run the vuserinfo again, the vuserinfo will actually regenerate the maildirsize again with the latest file size. Then, I delete the whole folder by using IMAP it won't append the negative into the maildirsize. So, I will get the wrong quota status.
 
For example:
 
1. New message come into mail server. Appened the mail size into maildirsize file.
 
5242880S
0 0
2536958 1
 
Do vuserinfo then give 48% used.
 
2. Create a folder and move the message into the folder by using IMAP.
 
5242880S
0 0
2536958 1
 2536958    1
-2536958   -1
 
Do vuserinfo then give 48% used.
 
3. Delete the maildirsize file and run vuserinfo. Then it will re-generate the maildirsize file show below.
 
5242880S
0 0
2536958 1
 
Do vuserinfo then give 48% used.
 
So, from step 1 to step 3 still provide the correct quota usage. But, after the the vuserinfo re-generate the maildirsize file and I delete the message by using IMAP it won't update the maildirsize. In the maildirsize still remain the same amount in step 3.
 
5242880S
0 0
2536958 1
 
Here, I do the vuserinfo again then it is still provide me the 48% used. In fact there is already no any message inside the maildir.
 
Is it a bug or the quota calculation not intelligent enough to re-calculate? That's mean the maildirsize file cannot been removed, else we will get the wrong quota usage?
 
Hope you can understand my poor explaination.
 
KY.
----- Original Message -----
From: steven
Sent: Thursday, October 16, 2003 12:47 PM
Subject: RE: [vchkpw] Quota question: (Qmail + Vpopmail + Courier-imap) with maildir quota.

I dont think it will happen. Check the function count_dir(char *dir_name) in source file vqmaillocal.c. It walk around the maildir and sum all file size in this dir.  
 
 
   
Steven Zhuang  
                                                 
Beijing Advantage Software Limited
                                           
 
Room 3010 Deshengyuan Business Center            Tel:86-10-62374916 
No.11 Dongbinhe Road Deshengmen                  FAX:86-10-62374724  
Xicheng District                                 Mail:[EMAIL PROTECTED]
Beijing 100011,PRC                                                                                                
 
 

Reply via email to