The layout should have been in vmysql.h.  I must have tested
the wrong directory when I thought I tested 5.3.9.  I see
its missing.

This should be appended to vmysql.h:


#ifdef ENABLE_MYSQL_LIMITS
#define LIMITS_TABLE_LAYOUT "domain CHAR(64) PRIMARY KEY, \
      maxpopaccounts          INT(10) NOT NULL DEFAULT -1, \
      maxaliases              INT(10) NOT NULL DEFAULT -1, \
      maxforwards             INT(10) NOT NULL DEFAULT -1, \
      maxautoresponders       INT(10) NOT NULL DEFAULT -1, \
      maxmailinglists         INT(10) NOT NULL DEFAULT -1, \
      diskquota               INT(12) NOT NULL DEFAULT 0, \
      defaultquota            INT(12) NOT NULL DEFAULT 0, \
      disablepop              TINYINT(1) NOT NULL DEFAULT 0, \
      disableimap             TINYINT(1) NOT NULL DEFAULT 0, \
      disabledialup           TINYINT(1) NOT NULL DEFAULT 0, \
      disablepasswordchanging TINYINT(1) NOT NULL DEFAULT 0, \
      disablewebmail          TINYINT(1) NOT NULL DEFAULT 0, \
      disablerelay            TINYINT(1) NOT NULL DEFAULT 0"
#endif

There's also a potential problem reading the ascii file
and interpreting the "k" or "m" symbols for quotas.  Bill said
he'd like it to use the format_maildirquota() function, however
I've updated my copy to parse out the symbols and multiply by 1024
or 1024*1024, but I'm not sure if this is the vpopmail standard.

Bill:

Shall I put a patch for these two items ?
I must have sent you the incorrect patch file (I had two, one with
the vmysql.h changes and one without).

Thanks,

Brian

  > I can see the new 5.3.9 dev release has this functinality implemented.
  > Only one problem, someone forgot to include the table layout.
  > 
  > As I can see, then the patch isn't complete either.
  > example. vmysql.h misses the LIMITS_TABLE_LAYOUT define and I think it goes
  > for the rest of the "sql" files.
  > 
  > Has anyone come around making a patch for this ?
  > Or do I just wait for the next dev release ?
  > 
  > Jakob Kruse
  > 
  > > -----Original Message-----
  > > From: Ken Jones [mailto:kbo@;Inter7.com]
  > > Sent: 17. oktober 2002 20:36
  > > To: Brian Kolaci
  > > Cc: [EMAIL PROTECTED]
  > > Subject: Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
  > >
  > >
  > > Excellent! I've been wanting to add this functionality to vpopmail
  > > for a long time. Nice work, clean api.
  > >
  > > I'll try to get them added to the next devel release.
  > >
  > > Ken Jones
  > >
  > > On Thursday 17 October 2002 01:19 pm, Brian Kolaci wrote:
  > > > Hi,
  > > >
  > > > I mentioned this awhile back, but didn't have the
  > > > cycles to create a diff file.  I finally had the time
  > > > so here it is...  I've been using this in version 5.2
  > > > and even back in 4.9.6.
  > > >
  > > > I've attached a diff file to add the functions
  > > >
  > > > int vget_limits( char *domain, struct vlimits *limits )
  > > > int vset_limits( char *domain, struct vlimits *limits )
  > > > int vdel_limits( char *domain )
  > > >
  > > > to the vpopmail library.  These maintain either the
  > > > raw file .qmailadmin-limits or will maintain the limits
  > > > in a MySQL database.  The items supported are:
  > > >
  > > > struct vlimits {
  > > >       int       maxpopaccounts;
  > > >       int       maxaliases;
  > > >       int       maxforwards;
  > > >       int       maxautoresponders;
  > > >       int       maxmailinglists;
  > > >       int       diskquota;
  > > >       int       defaultquota;
  > > >       short     disablepop;
  > > >       short     disableimap;
  > > >       short     disabledialup;
  > > >       short     disablepasswordchanging;
  > > >       short     disablewebmail;
  > > >       short     disablerelay;
  > > > };
  > > >
  > > > I haven't included the changes to qmailadmin that I use,
  > > > nor the changes to vdelivermail (for domain quota).
  > > >
  > > > diskquota is the current quota for a domain.
  > > > defaultquota is the default quota for new users of this domain.
  > > >
  > > > The other items I believe are self explanatory.
  > > >
  > > > The config is updated so you would call --enable-mysql-limits as
  > > > an option to configure.
  > > >
  > > > Hopefully you'll find this useful.
  > > >
  > > > Thanks,
  > > >
  > > > Brian
  > >
  > >
  > 
  > 


Reply via email to