Re: [vchkpw] maildirsize is recalculated too often
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks, Teodor! I'll take a look at this. On 07/03/2014 10:36 AM, Teodor Milkov wrote: Hi, After upgrading to vpopmail 5.4.33 I started seeing much more IO requests. I see that in 5.4.32 the following code was added to maildirquota.c: /* Maildir++ specification says to rebuild the maildirsize file if the file is 5120 or more bytes, or is more than 15 minutes old */ ret = fstat(f, statptr); if ((ret != -1) ((statptr-st_size = 5120) || (time(NULL) statptr-st_mtime + (15*60 { unlink(filename); close(f); return -1; } I think this is not correct interpretation of the specs from www.courier-mta.org/imap/README.maildirquota.html which says: /If the numbers we got indicated that the Maildir++ *is over quota*, some additional logic is in order: if we did not recalculate //maildirsize//, if the numbers in //maildirsize//indicated that we are over quota, then if //maildirsize//was more than one line long, or if the timestamp on //maildirsize//indicated that it's at least 15 minutes old, throw out the totals, and recalculate //maildirsize//from scratch./ I.e. the 15 minute logic should be applied only if the Maildir is currently over quota. This logic was already implemented in maildirquota.c dockeckquota() where it says if (maildirsize_nlines == 1 tm stat_buf.st_mtime + 15*60), but it didn't work, because /stat_buf/ is not set in maildirsize_read(). Please find attached a patch against 5.4.33, which I'm using in production. In addition to the minimal fix (initializing stat_buf) it has some documentation as well as some magic numbers converted to constants ? feel free to use it however you like. - -- /* Matt Brookings m...@inter7.com GnuPG Key 62817373 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) iQEcBAEBAgAGBQJTw/xQAAoJEOjQVexigXNzIGgIAJ7xmjrH4akfNHAKdtRo96GN 814Jsf1zeDREr0tg5RHwGYzSMTOUwJo1Lb9EoJmMuqtkDcjS3msrIY01XKvAC4aO RlRquev2bwwMHGBe1xuCPabNe0M2U29u5imOhbpFtxTDzjdvnjULkmSuCbieO61F tzvhAIlIs/MGECJd1u7AMmeBaEWSZmMjFX6xmXE8NIbTRz1aqHfc8AUNGO7JF3Hh JhL6KXwioCm81BC3zck1Oxb3Z+m+FQBsdCFbx6LcVPoLa/KR+eAoDZDrt513h8Xf iGHUkE0IRzWjeDWzkrG4kRkYpeK0g0CCIESsqh8iZSC1RR5mA4++IwJXkRzhE4k= =pHND -END PGP SIGNATURE-
[vchkpw] maildirsize is recalculated too often
Hi, After upgrading to vpopmail 5.4.33 I started seeing much more IO requests. I see that in 5.4.32 the following code was added to maildirquota.c: /* Maildir++ specification says to rebuild the maildirsize file if the file is 5120 or more bytes, or is more than 15 minutes old */ ret = fstat(f, statptr); if ((ret != -1) ((statptr-st_size = 5120) || (time(NULL) statptr-st_mtime + (15*60 { unlink(filename); close(f); return -1; } I think this is not correct interpretation of the specs from www.courier-mta.org/imap/README.maildirquota.html which says: /If the numbers we got indicated that the Maildir++ *is over quota*, some additional logic is in order: if we did not recalculate //maildirsize//, if the numbers in //maildirsize//indicated that we are over quota, then if //maildirsize//was more than one line long, or if the timestamp on //maildirsize//indicated that it's at least 15 minutes old, throw out the totals, and recalculate //maildirsize//from scratch./ I.e. the 15 minute logic should be applied only if the Maildir is currently over quota. This logic was already implemented in maildirquota.c dockeckquota() where it says if (maildirsize_nlines == 1 tm stat_buf.st_mtime + 15*60), but it didn't work, because /stat_buf/ is not set in maildirsize_read(). Please find attached a patch against 5.4.33, which I'm using in production. In addition to the minimal fix (initializing stat_buf) it has some documentation as well as some magic numbers converted to constants -- feel free to use it however you like. Best regards, Teodor !DSPAM:53b571086521514644! diff -Nru vpopmail-5.4.33.orig/maildirquota.h vpopmail-5.4.33/maildirquota.h --- vpopmail-5.4.33.orig/maildirquota.h 2011-02-28 19:00:45.0 +0200 +++ vpopmail-5.4.33/maildirquota.h 2014-07-03 18:09:48.0 +0300 @@ -12,6 +12,10 @@ #define QUOTA_WARN_PERCENT 90 +/* http://www.courier-mta.org/imap/README.maildirquota.html */ +#define MAILDIRSIZE_OVERLEN 5120 +#define MAILDIRSIZE_OLD_SECS 15*60 + /* I've removed pretty much the whole file execept for some public functions so as to not conflict with courier. Ive made the courier functions static. diff -Nru vpopmail-5.4.33.orig/maildirquota.c vpopmail-5.4.33/maildirquota.c --- vpopmail-5.4.33.orig/maildirquota.c 2011-02-28 19:00:45.0 +0200 +++ vpopmail-5.4.33/maildirquota.c 2014-07-03 18:14:54.0 +0300 @@ -333,7 +333,7 @@ unsigned *nlines, /* # of lines in maildirsize */ struct stat *statptr) /* The stats on maildirsize */ { - char buf[5120]; + char buf[MAILDIRSIZE_OVERLEN]; int f; char *p; unsigned l; @@ -343,21 +343,13 @@ if ((f=maildir_safeopen(filename, O_RDWR|O_APPEND, 0)) 0) return (-1); + + if (fstat(f, statptr) 0) + return (-1); + p=buf; l=sizeof(buf); - /* - Maildir++ specification says to rebuild the maildirsize file if the - file is 5120 or more bytes, or is more than 15 minutes old -*/ - - ret = fstat(f, statptr); - if ((ret != -1) ((statptr-st_size = 5120) || (time(NULL) statptr-st_mtime + (15*60 { - unlink(filename); - close(f); - return -1; -} - while (l) { n=read(f, p, l); @@ -409,6 +401,17 @@ return (0); } +/** + * Calculate quota usage in percent (%). + * + * @param[in] s Current maildir size in bytes. + * @param[in] n Current maildir message count. + * @param[in] *quota Current quota limit, e.g. 1000S or 1000C. + * @param[out] *percentage Quota usage in % (the bigger between size count). + * + * @retval 0 within quota + * @retval -1 over quota + */ static int qcalc(storage_t s, storage_t n, const char *quota, int *percentage) { storage_t i; @@ -595,7 +598,7 @@ n=qcalc(maildirsize_size+xtra_size, maildirsize_cnt+xtra_cnt, quota_type, percentage); - if (n == 0) + if (n == 0) // within quota { free(checkfolder); *maildirsize_fdptr=maildirsize_fd; @@ -603,7 +606,16 @@ } close(maildirsize_fd); - if (maildirsize_nlines == 1 tm stat_buf.st_mtime + 15*60) + /* + * http://www.courier-mta.org/imap/README.maildirquota.html + * + * if the numbers in maildirsize indicated that we are over quota, + * then if maildirsize was more than one line long, or if the timestamp + * on maildirsize indicated that it's at least 15 minutes old, throw out + * the totals, and recalculate maildirsize from scratch + */ + if (maildirsize_nlines == 1 + tm stat_buf.st_mtime + MAILDIRSIZE_OLD_SECS) return (n); }
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/02/2011 01:21 AM, Salman Riaz wrote: Dear Matt, I have configure the POP as following in my qmail Have you patched qmail to support Maildir++? - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1uSVkACgkQIwet2/rgZywg6ACfYzfLNw7DzJgC3xGw+WVj3ynk GlIAn2mDRjBXhgr4qkSU0X0rStB8mcWq =zNAl -END PGP SIGNATURE-
Re: [vchkpw] maildirsize problem
Il 01/03/2011 10:07, Salman Riaz ha scritto: Dear Matt, I have tested the new vpopmail-5.4.33. When I use pop protocol to download the emails then it does not update the maildirsize file. When I have check the email via IMAP it shows no email but still quota is showing some usage Can you please advice me regarding this? Regards, Salman... Hi Salman, for pop3 or imap what daemon are you running? I'm using vpopmail 5.4.33 and dovecot without problem. Try to reset the file maildirsize : /home/vpopmail/domains/dom.com/user/maildirsize and after re set the quota with ~vpopmail/bin/vmoduser -q100M u...@dom.com -- Alessio Cecchi is: @ ILS - http://www.linux.it/~alessice/ on LinkedIn - http://www.linkedin.com/in/alessice Assistenza Sistemi GNU/Linux - http://www.cecchi.biz/ @ PLUG - ex-Presidente, adesso senatore a vita, http://www.prato.linux.it @ LOLUG - Socio http://www.lolug.net !DSPAM:4d6cba8632711357414660!
RE: [vchkpw] maildirsize problem
Dear Alessio, Its now working fine. I am using courier imap with vpopmail-5.4.33. I have also checked the code of maildirquota.c. It majorly depends on the recalculating time of quota not on the size (5120 bytes or more) of emails. If we reduce this time it will results load in the server. It is set as 15 minutes for the optimum load on the server. When I have use IMAP then it updates the quota at the same time. When I use POP then it updates the quota after 15 minutes. Currently I am conducting more tests to understand the working of this vpopmail. Regards, Salman... Date: Tue, 1 Mar 2011 10:21:07 +0100 From: ales...@skye.it To: vchkpw@inter7.com Subject: Re: [vchkpw] maildirsize problem Il 01/03/2011 10:07, Salman Riaz ha scritto: Dear Matt, I have tested the new vpopmail-5.4.33. When I use pop protocol to download the emails then it does not update the maildirsize file. When I have check the email via IMAP it shows no email but still quota is showing some usage Can you please advice me regarding this? Regards, Salman... Hi Salman, for pop3 or imap what daemon are you running? I'm using vpopmail 5.4.33 and dovecot without problem. Try to reset the file maildirsize : /home/vpopmail/domains/dom.com/user/maildirsize and after re set the quota with ~vpopmail/bin/vmoduser -q100M u...@dom.com -- Alessio Cecchi is: @ ILS - http://www.linux.it/~alessice/ on LinkedIn - http://www.linkedin.com/in/alessice Assistenza Sistemi GNU/Linux - http://www.cecchi.biz/ @ PLUG - ex-Presidente, adesso senatore a vita, http://www.prato.linux.it @ LOLUG - Socio http://www.lolug.net !DSPAM:4d6ccb8a32711767568997!
Re: [vchkpw] maildirsize problem
Il 01/03/2011 11:33, Salman Riaz ha scritto: Dear Alessio, Its now working fine. I am using courier imap with vpopmail-5.4.33. I have also checked the code of maildirquota.c. It majorly depends on the recalculating time of quota not on the size (5120 bytes or more) of emails. If we reduce this time it will results load in the server. It is set as 15 minutes for the optimum load on the server. When I have use IMAP then it updates the quota at the same time. When I use POP then it updates the quota after 15 minutes. Currently I am conducting more tests to understand the working of this vpopmail. Regards, Salman... Hi Salman, please if you find some helpful information share with us :-) Thanks -- Alessio Cecchi is: @ ILS - http://www.linux.it/~alessice/ on LinkedIn - http://www.linkedin.com/in/alessice Assistenza Sistemi GNU/Linux - http://www.cecchi.biz/ @ PLUG - ex-Presidente, adesso senatore a vita, http://www.prato.linux.it @ LOLUG - Socio http://www.lolug.net !DSPAM:4d6cefa932711602510419!
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/01/2011 03:07 AM, Salman Riaz wrote: Dear Matt, I have tested the new vpopmail-5.4.33. When I use pop protocol to download the emails then it does not update the maildirsize file. When That's the fault of your POP server. Whatever POP server you're using needs to support Maildir++. - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1s82sACgkQIwet2/rgZyySjQCfcmtKuWCoX+nv6SDar8aQsZqu F3QAnA1X/KKzNg4hOYvGmNcoUFcyipWc =cIo4 -END PGP SIGNATURE-
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/01/2011 04:33 AM, Salman Riaz wrote: Dear Alessio, Its now working fine. I am using courier imap with vpopmail-5.4.33. I have also checked the code of maildirquota.c. It majorly depends on the recalculating time of quota not on the size (5120 bytes or more) of emails. If we reduce this time it will results load in the server. It is set as 15 minutes for the optimum load on the server. When I have use IMAP then it updates the quota at the same time. When I use POP then it updates the quota after 15 minutes. Currently I am conducting more tests to understand the working of this vpopmail. The reason it updates after 15 minutes is because any process that looks at the maildirsize file must update it completely if it was created 15 minutes ago or more. It sounds like your POP server doesn't support Maildir++. - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1s878ACgkQIwet2/rgZyxpHgCcD7AJYR0GoF0X3dXt+Tg5Ko+R /FAAoIMzgjtpCQq/szBRbOVqv4mKY+2C =ryOX -END PGP SIGNATURE-
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/26/2011 01:15 AM, Salman Riaz wrote: There is no email in my directory but maildirsize shows that 2157743 bytes quota is still full: vpopmail doesn't delete messages, and so, the process that is responsible for this, is likely the responsible party here. Tell me why maildirsize is writing wrong entry. How can I get rid of this problem? What vpopmail version are you using? - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1rqjkACgkQIwet2/rgZyxMcACfQ6JVUYWiO5rA9OVrLhjTC4/C oZYAnia33mHDqEzd0v30pcyPSCgPDVmM =5KV5 -END PGP SIGNATURE-
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/27/2011 10:48 PM, ke...@kens.fm wrote: I revise it in this way and use it. I am looking over this. Thanks! - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1rtAQACgkQIwet2/rgZyzGwgCeIpx2chLLw2oQICpxkCB+iBSg WKUAn1lrrRhuiFrtUHcokhW9dgmm2Wj0 =kjU4 -END PGP SIGNATURE-
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 08:41 AM, Matt Brookings wrote: On 02/27/2011 10:48 PM, ke...@kens.fm wrote: I revise it in this way and use it. I am looking over this. Thanks! It's amazing this went undetected as long as it did. I've added this patch is Subversion, and I'll be updating the 5.4.33 tarball on SourceForge shortly. Thanks again! - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1rtXIACgkQIwet2/rgZyy+lACdGXvIZ9rhfzNo5d38blADpn1n sGcAmwUOriOpM9Xe5sLrM2cPgJ6D/RHE =itIN -END PGP SIGNATURE-
RE: [vchkpw] maildirsize problem
Dear Kenji, I have also the same configurationbut i think the problem is not in the maildirquota.c. It lies in anyother file.. Regards, Salman Date: Mon, 28 Feb 2011 13:48:29 +0900 From: ke...@kens.fm To: vchkpw@inter7.com Subject: Re: [vchkpw] maildirsize problem I revise it in this way and use it. --- maildirquota.c.orig 2010-12-07 13:37:06.0 +0900 +++ maildirquota.c 2010-12-07 13:37:54.0 +0900 @@ -293,7 +293,7 @@ if (quotafd = 0) close(quotafd); ret_value = 1; } else { -maildir_addquota(dir, quotafd, q, stat_buf.st_size, 1); +// maildir_addquota(dir, quotafd, q, stat_buf.st_size, 1); if (quotafd = 0) close(quotafd); ret_value = 0; } Do you serve as a reference? -- Kenji ke...@kens.fm !DSPAM:4d6be5ab32712325434248!
RE: [vchkpw] maildirsize problem
Dear Matt, I am using vpopmail 5.4.32... Regards, Salman... Date: Mon, 28 Feb 2011 07:59:21 -0600 From: m...@inter7.com To: vchkpw@inter7.com Subject: Re: [vchkpw] maildirsize problem -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/26/2011 01:15 AM, Salman Riaz wrote: There is no email in my directory but maildirsize shows that 2157743 bytes quota is still full: vpopmail doesn't delete messages, and so, the process that is responsible for this, is likely the responsible party here. Tell me why maildirsize is writing wrong entry. How can I get rid of this problem? What vpopmail version are you using? - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1rqjkACgkQIwet2/rgZyxMcACfQ6JVUYWiO5rA9OVrLhjTC4/C oZYAnia33mHDqEzd0v30pcyPSCgPDVmM =5KV5 -END PGP SIGNATURE- !DSPAM:4d6be5e132715219618295!
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 12:13 PM, Salman Riaz wrote: Dear Matt, I am using vpopmail 5.4.32... Please try the latest 5.4.33. - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1r5e8ACgkQIwet2/rgZyxA+QCdHXUhYZtMkB8ycv94VbFDR/Ce JX0AnjlzE8dDKV3T796BbamvfgtKoSf2 =tKSW -END PGP SIGNATURE-
RE: [vchkpw] maildirsize problem
Dear Matt, I am using vpopmail 5.4.32. The problem is also same in 5.4.25 I have check it on both versions of vpopmail. Regards, Salman... Date: Mon, 28 Feb 2011 07:59:21 -0600 From: m...@inter7.com To: vchkpw@inter7.com Subject: Re: [vchkpw] maildirsize problem -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/26/2011 01:15 AM, Salman Riaz wrote: There is no email in my directory but maildirsize shows that 2157743 bytes quota is still full: vpopmail doesn't delete messages, and so, the process that is responsible for this, is likely the responsible party here. Tell me why maildirsize is writing wrong entry. How can I get rid of this problem? What vpopmail version are you using? - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1rqjkACgkQIwet2/rgZyxMcACfQ6JVUYWiO5rA9OVrLhjTC4/C oZYAnia33mHDqEzd0v30pcyPSCgPDVmM =5KV5 -END PGP SIGNATURE- !DSPAM:4d6be6b632711569410968!
RE: [vchkpw] maildirsize problem
Dear Matt, I have used vpopmail 5.4.25 and also 5.4.32 I think that maildirsize lies with courier-imap not with vpopmail Am I right?? I have not find any clue in the vpopmail to write maildirsize file when an email is received. The file which write maildirsize is maildirquota.c and maildirquota.c is responsible for updating the record in this Regards, Salman... Date: Mon, 28 Feb 2011 12:14:07 -0600 From: m...@inter7.com To: vchkpw@inter7.com Subject: Re: [vchkpw] maildirsize problem -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 12:13 PM, Salman Riaz wrote: Dear Matt, I am using vpopmail 5.4.32... Please try the latest 5.4.33. - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1r5e8ACgkQIwet2/rgZyxA+QCdHXUhYZtMkB8ycv94VbFDR/Ce JX0AnjlzE8dDKV3T796BbamvfgtKoSf2 =tKSW -END PGP SIGNATURE- !DSPAM:4d6be85132718194817495!
Re: [vchkpw] maildirsize problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 12:24 PM, Salman Riaz wrote: Dear Matt, I have used vpopmail 5.4.25 and also 5.4.32 I think that maildirsize lies with courier-imap not with vpopmail Am I right?? I have not find any clue in the vpopmail to write maildirsize file when an email is received. The file which write maildirsize is maildirquota.c and maildirquota.c is responsible for updating the record in this You are reporting issues with older versions. Please try the latest version, and let us know if the issue continues. - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1r6c0ACgkQIwet2/rgZyzkFQCfXBpNvhcih79s9/depPZ7qcsC 1bsAn3UJ1ZwiT5lDZYwr3wVRbBl4nHCP =sBeI -END PGP SIGNATURE-
RE: [vchkpw] maildirsize problem
Dear Romeo, Trash is also empty I think the problem lies in the reception of an email. As the email is received then it writes two entries in the maildirsize and sometimes it writes only one. Deletion process is working fine... Regards, Salman From: r...@italy1.com Date: Sat, 26 Feb 2011 07:41:48 -0700 To: vchkpw@inter7.com Subject: Re: [vchkpw] maildirsize problem Did you msg end up in the trash? Must be empty otherwise it counts Check that and see Remo Inviato da iPhone Il giorno 26/feb/2011, alle ore 00:15, Salman Riaz salmanriaz...@hotmail.com ha scritto: Hi, I have set the quota of each email address on qmail server. But the maildirsize file is not updating properly. For Example: I have set the 6MB quota by vsetuserquota command of an email address then following is the result of maildirsize file: 6291456S 0 0 When I sent only one email, this file update twice and gives the following result: 6291456S 2157743 1 2157815 1 Only one email is in the directory but maildirsize shows that there are 2 emails with above bytes. When I delete this email then only one entry is removed: 6291456S 2157743 1 2157815 1 -2157815 -1 There is no email in my directory but maildirsize shows that 2157743 bytes quota is still full: Tell me why maildirsize is writing wrong entry. How can I get rid of this problem? Regards, Salman... !DSPAM:4d6a602e32711447712336!
Re: [vchkpw] maildirsize problem
I revise it in this way and use it. --- maildirquota.c.orig 2010-12-07 13:37:06.0 +0900 +++ maildirquota.c 2010-12-07 13:37:54.0 +0900 @@ -293,7 +293,7 @@ if (quotafd = 0) close(quotafd); ret_value = 1; } else { -maildir_addquota(dir, quotafd, q, stat_buf.st_size, 1); +// maildir_addquota(dir, quotafd, q, stat_buf.st_size, 1); if (quotafd = 0) close(quotafd); ret_value = 0; } Do you serve as a reference? -- Kenji ke...@kens.fm !DSPAM:4d6b292d32714862750127!
Re: [vchkpw] maildirsize problem
Did you msg end up in the trash? Must be empty otherwise it counts Check that and see Remo Inviato da iPhone Il giorno 26/feb/2011, alle ore 00:15, Salman Riaz salmanriaz...@hotmail.com ha scritto: Hi, I have set the quota of each email address on qmail server. But the maildirsize file is not updating properly. For Example: I have set the 6MB quota by vsetuserquota command of an email address then following is the result of maildirsize file: 6291456S 0 0 When I sent only one email, this file update twice and gives the following result: 6291456S 2157743 1 2157815 1 Only one email is in the directory but maildirsize shows that there are 2 emails with above bytes. When I delete this email then only one entry is removed: 6291456S 2157743 1 2157815 1 -2157815 -1 There is no email in my directory but maildirsize shows that 2157743 bytes quota is still full: Tell me why maildirsize is writing wrong entry. How can I get rid of this problem? Regards, Salman... !DSPAM:4d69113332712851120595!
[vchkpw] maildirsize problem
Hi, I have set the quota of each email address on qmail server. But the maildirsize file is not updating properly. For Example: I have set the 6MB quota by vsetuserquota command of an email address then following is the result of maildirsize file: 6291456S 0 0 When I sent only one email, this file update twice and gives the following result: 6291456S 2157743 1 2157815 1 Only one email is in the directory but maildirsize shows that there are 2 emails with above bytes. When I delete this email then only one entry is removed: 6291456S 2157743 1 2157815 1 -2157815 -1 There is no email in my directory but maildirsize shows that 2157743 bytes quota is still full: Tell me why maildirsize is writing wrong entry. How can I get rid of this problem? Regards, Salman... !DSPAM:4d68a89932712951818885!
[vchkpw] maildirsize double adding incoming mail
For every incoming mail on a vpopmail-5.4.27 installation we get two lines added in users Maildir/maildirsize - the values always have 64 bytes difference - on deletion only one entry is removed leeding to over-quota after a while for every user. For example a empty account receiving one mail: 10485760S 1646 1 1710 1 what is configured wrong? Axel !DSPAM:4ad178cc32715659525370!
[vchkpw] maildirsize file with problem
Hi all, I have a Webmail with vpopmail and virtual domains. My problem is when i use a email client, like Outlook Express, in some cases, the messages are downloaded but the maildirsize file is not updated. Someone know this problem and can help me? Thanks Luis Eduardo Clemente SP - Brazil __ Fale com seus amigos de graça com o novo Yahoo! Messenger http://br.messenger.yahoo.com/
Re: [vchkpw] maildirsize file with problem
On Monday 07 May 2007 19:18:20 Luis Clemente wrote: I have a Webmail with vpopmail and virtual domains. My problem is when i use a email client, like Outlook Express, in some cases, the messages are downloaded but the maildirsize file is not updated. Hav you the last version of vpopmail? And your qmail have the patch for maildir++ like this : http://shupp.org/patches/qmail-maildir++-universal.patch You use IMAP4 or POP3? Ciao -- Alessio Cecchi is: @ ILS - http://www.linux.it/~alessice/ Assistenza Sistemi GNU/Linux - http://www.cecchi.biz/ @ PLUG - Presidente, http://www.prato.linux.it
Re: [vchkpw] maildirsize file with problem
Hy Alessio, My Vpopmail is the version 5.3.14. I´ll upgrade it. I´m using POP3. The patch which i applied is the same of the source vpopmail-5.3.14. Thanks Luis Eduardo SP - BRazil Alessio Cecchi [EMAIL PROTECTED] escreveu: On Monday 07 May 2007 19:18:20 Luis Clemente wrote: I have a Webmail with vpopmail and virtual domains. My problem is when i use a email client, like Outlook Express, in some cases, the messages are downloaded but the maildirsize file is not updated. Hav you the last version of vpopmail? And your qmail have the patch for maildir++ like this : http://shupp.org/patches/qmail-maildir++-universal.patch You use IMAP4 or POP3? Ciao -- Alessio Cecchi is: @ ILS - http://www.linux.it/~alessice/ Assistenza Sistemi GNU/Linux - http://www.cecchi.biz/ @ PLUG - Presidente, http://www.prato.linux.it __ Fale com seus amigos de graça com o novo Yahoo! Messenger http://br.messenger.yahoo.com/
Re: [vchkpw] maildirsize does not automatically updated
On Wednesday 22 March 2006 20:45, User 1 wrote: Dear all, I thought this is only about refreshing time because I saw the maildirsize already updated today..any way what I am using now are only qmail + vpopmail-5.4.13 any comment? not realy sure what your question is, but since it appears to be part of the thread discussing updating the maildirsize file... if you are using maildir quotas and qmail-pop3d you need to get the maildir++ patch for qmail-pop3d. If this does not answer your question, you may want to try actually asking one ;) -Jeremy *** Our outgoing mail has been scanned by MSS. *** thanks for giving end users the false sense of security they always wanted! -- Jeremy Kitchen ++ [EMAIL PROTECTED] In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. pgplbcrqirwd3.pgp Description: PGP signature
[vchkpw] maildirsize does not automatically updated
Dear All, I am running qmail + vpopmail-5.4.13 , why maildirsize doesnot automatically updated? .. when users retrieve their email the maildirsize doesnot automatically decreased.. please help Thanks Regards Tom *** Our outgoing mail has been scanned by MSS. ***
Re: [vchkpw] maildirsize does not automatically updated
Dear All, I am running qmail + vpopmail-5.4.13 , why maildirsize doesnot automatically updated? .. when users retrieve their email the maildirsize doesnot automatically increased please help Thanks Regards Tom - Original Message - From: User 1 [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Wednesday, March 22, 2006 4:22 PM Subject: [vchkpw] maildirsize does not automatically updated Dear All, I am running qmail + vpopmail-5.4.13 , why maildirsize doesnot automatically updated? .. when users retrieve their email the maildirsize doesnot automatically decreased.. please help Thanks Regards Tom *** Our outgoing mail has been scanned by MSS. *** *** Your mail has been scanned by MSS. ***-*** *** Our outgoing mail has been scanned by MSS. ***
Re: [vchkpw] maildirsize does not automatically updated
On Mar 22, 2006, at 1:22 AM, User 1 wrote: I am running qmail + vpopmail-5.4.13 , why maildirsize doesnot automatically updated? .. when users retrieve their email the maildirsize doesnot automatically decreased.. What program are you using for POP/IMAP? That's what's responsible for adding negative entries to the maildirsize file. Do you find that the maildirsize is updated correctly for POP but not IMAP (or vice versa)? Keep in mind that the quota usage is calculated by adding up all the entries in maildirsize -- not just by looking at the first few lines. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/
Re: [vchkpw] maildirsize does not automatically updated
Thanks for your answer Tom, Im using IMAP (and auth) with webmail and other interfaces. Regards, Juan - Original Message - From: Tom Collins [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Wednesday, March 22, 2006 12:53 PM Subject: Re: [vchkpw] maildirsize does not automatically updated On Mar 22, 2006, at 1:22 AM, User 1 wrote: I am running qmail + vpopmail-5.4.13 , why maildirsize doesnot automatically updated? .. when users retrieve their email the maildirsize doesnot automatically decreased.. What program are you using for POP/IMAP? That's what's responsible for adding negative entries to the maildirsize file. Do you find that the maildirsize is updated correctly for POP but not IMAP (or vice versa)? Keep in mind that the quota usage is calculated by adding up all the entries in maildirsize -- not just by looking at the first few lines. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/
Re: [vchkpw] maildirsize does not automatically updated
On Wednesday 22 March 2006 09:00, Juan Jose Miquel wrote: Thanks for your answer Tom, Im using IMAP (and auth) with webmail and other interfaces. what imap server software? what pop3 server software? -Jeremy -- Jeremy Kitchen ++ [EMAIL PROTECTED] In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. pgp6Udu6UMfm5.pgp Description: PGP signature
Re: [vchkpw] maildirsize does not automatically updated
Dear all, I thought this is only about refreshing time because I saw the maildirsize already updated today..any way what I am using now are only qmail + vpopmail-5.4.13 any comment? Thanks a lot in advance Regards Winanjaya - Original Message - From: Jeremy Kitchen [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Thursday, March 23, 2006 1:46 AM Subject: Re: [vchkpw] maildirsize does not automatically updated *** Our outgoing mail has been scanned by MSS. ***
[vchkpw] maildirsize not updated
i m using qmail server with both POP IMAP. When i use sqwebmail, the maildirsize file gets updated, but using POP does not update the file. The maildir++ patch has also been applied butit didnot help.. Because of this i m not able to show user quotas in webmail please help regards, ANIL Do you Yahoo!? Yahoo! Mail - You care about security. So do we.
[vchkpw] maildirsize is not getting updated for local mail delivery
Hi, It seems that the Maildir/maildirsize file does not get updated for local delivery of mails. __ Devendra Singh IndiaMART InterMESH Limited (Global Gateway to Indian Market Place) B-1, Sector 8, Noida, UP - 201301, India EPABX : +91-120-2424945, +91-120-3094634, +91-9810646342 Fax: +91-120-2424943 http://www.indiamart.com http://www.indiangiftsportal.com http://www.indiantravelportal.com __
Re: [vchkpw] maildirsize is not getting updated for local mail delivery
Devendra Singh wrote: Hi, It seems that the Maildir/maildirsize file does not get updated for local delivery of mails. __ Devendra Singh IndiaMART InterMESH Limited (Global Gateway to Indian Market Place) B-1, Sector 8, Noida, UP - 201301, India EPABX : +91-120-2424945, +91-120-3094634, +91-9810646342 Fax: +91-120-2424943 http://www.indiamart.com http://www.indiangiftsportal.com http://www.indiantravelportal.com __ Did you apply the maildir++ patch to qmail or are you using any NFS implementation?
[vchkpw] maildirsize not updating
Hi List, It seems that neither vdelivermail nor qmail-pop3d are updating the maildirsize file for SOME users and not others, even though it is far older than 15 minutes. I have qmail+vpopmail, with qmail patched using Bill Shupp's qmail-maildir++.patch file. Here is an example. I'll give it to you step by step: - [EMAIL PROTECTED] /home/vpopmail/domains/speedfactory.net/someuser]# ls -lR .: total 5 -rw---1 vpopmail vchkpw 13 Nov 14 12:17 lastauth drwx--5 vpopmail vchkpw152 May 27 10:09 Maildir/ ./Maildir: total 10 drwx--2 vpopmail vchkpw 48 Sep 6 11:52 cur/ -rw-r--r--1 vpopmail vchkpw 4682 Nov 14 12:17 maildirsize drwx--2 vpopmail vchkpw 48 Nov 14 12:17 new/ drwx--2 vpopmail vchkpw 48 Nov 14 12:15 tmp/ ./Maildir/cur: total 0 ./Maildir/new: total 0 ./Maildir/tmp: total 0 [EMAIL PROTECTED] /home/vpopmail/domains/speedfactory.net/someuser]# vuserinfo [EMAIL PROTECTED]: someuser passwd: $1$6GQHg$QJ6rNHXxWTSUl64/U0hz80 clear passwd: cbrown uid:1 gid:0 all services available dir: /home/vpopmail/domains/speedfactory.net/someuser quota: 10485760 usage: 201% last auth: Fri Nov 14 12:17:26 2003 last auth ip: 66.23.203.202 - So you can see that this user has no mail in her maildir, yet her quota is reported as 201% of 10 megs. Her quota has not recently been changed. So now I go to send her a small test message. It should bounce back, but it goes right through. Here is the new listing. Notice that maildirsize has not been updated: --- (0)(0j)[EMAIL PROTECTED] /home/vpopmail/domains/speedfactory.net/someuser]# ls -lR .: total 5 -rw---1 vpopmail vchkpw 13 Nov 14 12:17 lastauth drwx--5 vpopmail vchkpw152 May 27 10:09 Maildir/ ./Maildir: total 10 drwx--2 vpopmail vchkpw 48 Sep 6 11:52 cur/ -rw-r--r--1 vpopmail vchkpw 4682 Nov 14 12:17 maildirsize drwx--2 vpopmail vchkpw112 Nov 14 13:25 new/ drwx--2 vpopmail vchkpw 48 Nov 14 13:25 tmp/ ./Maildir/cur: total 0 ./Maildir/new: total 4 -rw---1 vpopmail vchkpw 1533 Nov 14 13:25 1068834351.24159.duchess.speedfactory.net,S=1457 ./Maildir/tmp: total 0 The vuserinfo output remains the same. Even logging in through pop3 and deleting a message doesn't seem to make a difference. The quota usage still shows 201% after the pop3 session. The user's base dir is owned and writable by vpopmail.vchkpw. Any clues as to what might be going on? Thanks in advance, Moshe -- Moshe Jacobson http://runslinux.net AIM: Jehsom
[vchkpw] maildirsize update when using maildrop
Hi, in the archives I found a few, unanswered messages from people (like me) using maildrop and not vdelivermail to get messages delivered. The (well known?) problem is that the maildirsize file doesn't get updated after making quota changes via vqadmin/vsetuserquota. Is there any new solution for this problem or can't it be solved? Thanks, Juergen
Re: [vchkpw] maildirsize update when using maildrop
On Mon, 15 Sep 2003, J. Kendzorra wrote: Hi, in the archives I found a few, unanswered messages from people (like me) using maildrop and not vdelivermail to get messages delivered. The (well known?) problem is that the maildirsize file doesn't get updated after making quota changes via vqadmin/vsetuserquota. Is there any new solution for this problem or can't it be solved? It can be solved, but it's not too efficient. If you're running maildrop, someone posted this solution on the list a few weeks ago: # Make sure the quota file is in place. # Vpopmail does not create it by default. # Vpopmail also removes it when you change the quota. `test -s $HOME/Maildir/maildirsize` if ( $RETURNCODE == 1 ) { `~vpopmail/bin/vuserinfo -Q [EMAIL PROTECTED] `/usr/sbin/chown vpopmail:vchkpw $VDIR/Maildir/maildirsize` `chmod 640 $VDIR/Maildir/maildirsize` } I'd credit this if I could remember who posted it. Tested it here, and it works fine. Charles Thanks, Juergen
Re: [vchkpw] maildirsize update when using maildrop
On Monday, September 15, 2003, at 08:12 AM, J. Kendzorra wrote: in the archives I found a few, unanswered messages from people (like me) using maildrop and not vdelivermail to get messages delivered. The (well known?) problem is that the maildirsize file doesn't get updated after making quota changes via vqadmin/vsetuserquota. Is there any new solution for this problem or can't it be solved? When the quota changes, should vpopmail empty the maildirsize file instead of deleting it? What does it typically look like? We could probably update vsetuserquota() in vpopmail.c to recreate it properly instead of just deleting it (like it does now). -- Tom Collins [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
[vchkpw] maildirsize file in Maildir/
Hello, Can anybody explain the purpose of the maildirsize folder in an account's Maildir/ with a mysql-based vpopmail install? It seems kind of redundant to me that there should be a static file with quota information such as is contained in maildirsize since quota info is maintained (partially or wholly?) in the vpopmail database. I ran into a situation this week where I modified a user's quota in the db and it didn't take as far as courier-imap was concerned until I removed the maildirsize file, thus causing it to be regenerated. Wondering if something needs to be fixed so that issues like this won't occur in the future? Thank you, -ben --- Benjamin Tomhave, CISSP Senior Systems Engineer [EMAIL PROTECTED] Sofast Communications www.sofast.net
Re: [vchkpw] maildirsize + vpopmail
hi doods, i have another question that. if I set the quota 50MB then later change to 100MB . why it still keep 50MB quota...ever I receive a new mail...( i send a new email to myself ) tq DOODS wrote: Yup. It is automatically modified. Good to hear it worked. Warm Regards, DOODS TQ it work... it is mean once receive mail it will recalculate and generate the maildirsize ?? tq DOODS wrote: Try sending an email to that account and it will be automatically updated. Don't edit it manually. Warm Regards, DOODS hi, when I do vsetuserquota under vpopmail.. why the maildirsize in Maildir still remain unchange ? tq -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd - Webmail service provided by GlobeLines. Visit us at http://www.glinesnx.com.ph. -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd - Webmail service provided by GlobeLines. Visit us at http://www.glinesnx.com.ph. -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd
Re: [vchkpw] maildirsize + vpopmail
I try on vqadmin Kenneth Ling wrote: hi doods, i have another question that. if I set the quota 50MB then later change to 100MB . why it still keep 50MB quota...ever I receive a new mail...( i send a new email to myself ) tq DOODS wrote: Yup. It is automatically modified. Good to hear it worked. Warm Regards, DOODS TQ it work... it is mean once receive mail it will recalculate and generate the maildirsize ?? tq DOODS wrote: Try sending an email to that account and it will be automatically updated. Don't edit it manually. Warm Regards, DOODS hi, when I do vsetuserquota under vpopmail.. why the maildirsize in Maildir still remain unchange ? tq -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd - Webmail service provided by GlobeLines. Visit us at http://www.glinesnx.com.ph. -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd - Webmail service provided by GlobeLines. Visit us at http://www.glinesnx.com.ph. -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd
Re: [vchkpw] maildirsize + vpopmail
TQ it work... it is mean once receive mail it will recalculate and generate the maildirsize ?? tq DOODS wrote: Try sending an email to that account and it will be automatically updated. Don't edit it manually. Warm Regards, DOODS hi, when I do vsetuserquota under vpopmail.. why the maildirsize in Maildir still remain unchange ? tq -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd - Webmail service provided by GlobeLines. Visit us at http://www.glinesnx.com.ph. -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd
Re: [vchkpw] maildirsize + vpopmail
Try sending an email to that account and it will be automatically updated. Don't edit it manually. Warm Regards, DOODS hi, when I do vsetuserquota under vpopmail.. why the maildirsize in Maildir still remain unchange ? tq -- Regards Kenneth Ling ranhill engineers and constructors sdn bhd - Webmail service provided by GlobeLines. Visit us at http://www.glinesnx.com.ph.
[vchkpw] maildirsize
Dear all... maildirsize seems not updated automatically .. that's why my users have warned that their quota is full .. could any body please help me what should I do? .. any idea and or suggestion would be greatly appreciated and many thanks in advance Regards winan
[vchkpw] maildirsize problem
Hi, i have run qmail and vpopmail for a long time along without the maildirsizepatch now the mailboxes says full and accept not mails. How can i simple update the maildirsize to the new current size? Can i only delete the maildirsize or what must i do? Greetz, Jens Gassmann
RE: [vchkpw] maildirsize problem
Did you patch your pop3 server to handle Maildir++ style quotas? If not do that as that's the real solution to your problem. Read the README.quotas in the vpopmail distribution for the answer to your question. Regards, Tren -Original Message- From: Jens Gassmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 3:58 AM To: [EMAIL PROTECTED] Subject: [vchkpw] maildirsize problem Hi, i have run qmail and vpopmail for a long time along without the maildirsizepatch now the mailboxes says full and accept not mails. How can i simple update the maildirsize to the new current size? Can i only delete the maildirsize or what must i do? Greetz, Jens Gassmann