On Mar 3, 2004, at 11:30 AM, Shiraz wrote:
If I use qmailadmin to modify the quota for this user, the file
"maildirsize" exists but "S" is removed from the quota and file contents
become:
10485760

This bug was only recently fixed. It will be in the next release of vpopmail. Unfortunately, I started making significant changes to the database backends before forking off a 5.5 development series. I will try to split the codebase and release a 5.4.3 that includes only fixes to existing problems, and leave the database updates to 5.5.0.


In the mean time, you can apply this patch to 5.4.0-5.4.2. Be sure to recompile qmailadmin after installing the patched vpopmail.

diff -u -d -r1.29 -r1.30
--- vpopmail.c  22 Feb 2004 22:50:48 -0000      1.29
+++ vpopmail.c  1 Mar 2004 15:33:32 -0000       1.30
@@ -1543,6 +1543,7 @@
 int vsetuserquota( char *username, char *domain, char *quota )
 {
  struct vqpasswd *mypw;
+ char *formattedquota;
  int ret;

   if ( strlen(username) >= MAX_PW_NAME ) return(VA_USER_NAME_TOO_LONG);
@@ -1558,7 +1559,8 @@
   /* correctly format the quota string,
    * and then store the quota into the auth backend
    */
-  ret = vauth_setquota( username, domain, format_maildirquota(quota));
+  formattedquota = format_maildirquota(quota);
+  ret = vauth_setquota( username, domain, formattedquota);
   if (ret != VA_SUCCESS ) return(ret);

   mypw = vauth_getpw( username, domain );
@@ -1569,7 +1571,7 @@
    char maildir[MAX_BUFF];
     snprintf(maildir, sizeof(maildir), "%s/Maildir/", mypw->pw_dir);
     umask(VPOPMAIL_UMASK);
-    (void)vmaildir_readquota(maildir, quota);
+    (void)vmaildir_readquota(maildir, formattedquota);
     if ( vget_assign(domain, NULL, 0, &uid, &gid)!=NULL) {
       strcat(maildir, "maildirsize");
       chown(maildir,uid,gid);

--
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/



Reply via email to