Sorry to not answer your question, but you raise a pet peeve of mine wrt
vpopmail - 

Tim Hasson <[EMAIL PROTECTED]> writes:

> So I manually updated the cur_users rows to reflect the actual number of
> users in each domain row, and the numbers of domains managed by vpopmail in
> the dom_500 row.
> Is that OK?

dir_control is a horrible black art and one should never mess around with
it.  It decided where new directories are made,
i.e. /domains/

Tim: scroll down a bit.  This is for vpopmail devs:

I use an infinitely simpler scheme in my vpopmail-replacement tools:
create table dirstructure (
  counter int not null auto_increment,
  nusers int not null,
  domain char(64) not null,
  basedir char(128) not null,
  curdir char(128) NOT NULL default '/',
  primary key (counter),
  key(curdir, domain, basedir)
) type=myisam;

where basedir = '', curdir = 'current subdirectory under basedir',
nusers = 'number of users in basedir/curdir'.  The algorithm for adding a new
user is thus -

lock table dirstructure;
if(nusers < 50) { nusers++; }
else { curdir = nextdir(curdir); nusers = 0; }
unlock tables;
userdir = basedir . curdir;

where nextdir('/8') is '/9' and nextdir('/9') is '/0/0'.

What in the universe is the point of a __SEVENTEEN COLUMN__ table to
represent this information?

OK Tim, this is for you again:

> Now I mentioned after the cdb->mysql conversion, the mysql row for each of
> the users always reflected 1 and 0 for the pw_uid and pw_gid fields,
> respectively.
> When I added a new domain, new users (and postmaster) have 0 and 0 for the 
> pw_uid and pw_gid fields.
> Although /var/qmail/users/assign shows the correct uid/gid of vpopmail 
> (500/500) for all the domains.
> Shouldn't the pw_uid and pw_gid fields reflect 500/500 just like in assign?

No, vpopmail (and I'm really sorry to rant here but I hate vpopmail's
mysql database layout) uses the pw_uid for nothing at all and pw_gid to store
FLAGS ON AN ACCOUNT.  A gid of 1024 means something, like 'don't allow pop
access' or 'bounce all mail to this account'.

> The reason why I am concerned is I am looking in using maildrop for delivery 
> and since it supports mysql, I can have it read the users home directly from 
> the vpopmail database instead of running `vuserinfo -d [EMAIL PROTECTED] from a 
> mailfilter script.  From maildropmysql.conf :
> # UIDNUMBER_FIELD - MySQL attribute which contains the system uid to deliver
> # mail as
> uidnumber_field         uidnumber
> # GIDNUMBER_FIELD - MySQL attribute which contains the system gid to deliver
> # mail as
> gidnumber_field         gidnumber

Maildrop will become very upset if the uid and gid are not the same as the
500:500 that you have in qmail-local.  Maildrop's MySQL support is not
one-to-one with vpopmail's MySQL support.  Do as you remarked before and set
default_uidnumber and default_gidnumber to 500.

> Any information, clarifications, suggestions, experiences, or ideas would be 
> greatly appreciated.

Use my maildrop MySQL rule filtering patch!  vdelivermail is a relic! :)

> Respectfully,
> Tim Hasson

- Erik Bourget

Reply via email to