måndagen den 26 januari 2004 07.42 skrev Oden Eriksson: > måndagen den 26 januari 2004 02.38 skrev Tom Collins: > > On Jan 25, 2004, at 6:05 PM, Tom Collins wrote: > > > QmailAdmin is supposed to use the default quota when adding new users > > > if you leave that field blank. I recently made some changes to that > > > code, so I'll double-check it to make sure I didn't break anything. > > > > Yep, I broke it. Here's the patch, soon to be added to CVS: > > > > =================================================================== > > RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v > > retrieving revision 1.10 > > diff -u -r1.10 user.c > > --- user.c 26 Jan 2004 00:41:07 -0000 1.10 > > +++ user.c 26 Jan 2004 01:36:51 -0000 > > @@ -481,15 +481,14 @@ > > > > #ifdef MODIFY_QUOTA > > if (strcmp (Quota, "NOQUOTA") == 0) { > > - strcpy (pw_shell, "NOQUOTA"); > > + vsetuserquota (Newu, Domain, "NOQUOTA"); > > } else if ( Quota[0] != 0 ) { > > if(quota_to_bytes(qconvert, Quota)) { > > sprintf(StatusMessage, get_html_text("314")); > > } else { > > - strcpy (pw_shell, qconvert); > > + vsetuserquota (Newu, Domain, qconvert); > > } > > } > > - mypw->pw_shell = pw_shell; > > #endif > > > > #ifdef MODIFY_SPAM > > @@ -502,24 +501,13 @@ > > } > > #endif > > > > - /* update the user information */ > > - if ( vauth_setpw( mypw, Domain ) != VA_SUCCESS ) { > > + /* report success */ > > + sprintf(StatusMessage, "%s [EMAIL PROTECTED] (%s) %s", > > + get_html_text("002"), Newu, Domain, Gecos, > > + get_html_text("119")); > > > > - /* report error */ > > - sprintf(StatusMessage, "%s [EMAIL PROTECTED] (%s) %s", > > - get_html_text("002"), Newu, Domain, Gecos, > > - get_html_text("120")); > > - > > - } else { > > - > > - /* report success */ > > - sprintf(StatusMessage, "%s [EMAIL PROTECTED] (%s) %s", > > - get_html_text("002"), Newu, Domain, Gecos, > > - get_html_text("119")); > > - } > > - > > - /* otherwise, report error */ > > } else { > > + /* otherwise, report error */ > > sprintf(StatusMessage, "<font color=\"red\">%s [EMAIL PROTECTED] (%s) > > %s</font>", > > get_html_text("002"), Newu, Domain, Gecos, get_html_text("120")); > > } > > Works fine, thanks. > > Do you think it would be possible to spit out (pre fill) NOQUOTA in the > quota field so that the "pw_shell" is not blank? > > I still get (BAD) when viewing the user.
Hmm..., it appears it didn't work... If I put the word "NOQUOTA" in the quota field when adding a user I get (BAD) quota, but if I edit the user and put "NOQUOTA" in there it works. Another thing... If I try to enable the "Track spam" thing when editing a user I get the word "nothing" (and nothing happens). This works when making a new user though...