Tim Hasson <[EMAIL PROTECTED]> writes:
> Quoting Erik Bourget <[EMAIL PROTECTED]>:
[ what do pw_uid and pw_gid do? ]
>> 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
>> FLAGS ON AN ACCOUNT. A gid of 1024 means something, like 'don't allow pop
>> access' or 'bounce all mail to this account'.
> That sucks.
> What if you want to add a domain with a unique uid that's different from
> vpopmail's uid ? (for os quota enforcement/security etc..)
> Do you have to always consult assign/users to get the uid for a domain or
> user? Then what is the point of the mysql auth module?
The way qmail works, qmail-local is actually run AS THE UID that it finds in
the users/cdb file. It's not vpopmail's fault that it can't escape this
limitation, it's a (rather reasonable) behavior of qmail.
The point of the mysql auth module is to be not used solely in a vpopmail
environment. This configuration option does not apply to vpopmail.
> For the above mentioned reasons, by intiuition, I would think that the
> pw_uid and pw_gid would at least reflect the same uid/gid in assign/users -
> if not even to offer a unique uid per user option.
You'll find that the intersection of vpopmail thinking and intuition is very
>>From my pervious comments above, you should now understand why I wanted to
> link the uidnumber_field and gidnumber_field from maildrop with vpopmail's
> pw_uid and pw_gid fields.
Well, here's another way you can do it - ALTER TABLE the vpopmail table and
add a uidnumber and gidnumber column. vpopmail doesn't do anything as
braindead as SELECT * so it won't break, and maildrop can look up in these
new fields. You'll have to make sure to update them after every vadduser
though (or just modify the vadduser source if you're c-inclined).
>> > Any information, clarifications, suggestions, experiences, or ideas would
>> > greatly appreciated.
>> Use my maildrop MySQL rule filtering patch! vdelivermail is a relic! :)
> However, I do use maildrop filters to invoke spamc and scan mail for spam
> then look for SPAM keyword in the message header, and if it's marked as
> spam, deliver it to user/Maildir/.BulkMail , else deliver to user/Maildir
> This is enabled for only one domain from it's .qmail-default file.
> However, since you mentioned in your earlier email that you have the
> maildrop maildir autocreation patch seperated, please direct me to it.
> I guess for now as a workaround for vpopmail's table pw_name and pw_domain
> incompatibility with maildrop's single uid_field, I can create a new column,
> and call it 'pw_email' for example and on mysql do:
> UPDATE vpopmail SET pw_email = CONCAT(pw_name, '@', pw_domain);
> and set uid_field in maildropmysql.conf to 'pw_email'
You know, you might actually be able to just say "CONCAT(pw_name, '@',
pw_domain) AS pw_email" in maildropmysql.conf itself. I think that it's just
sprintf'd into the string in maildrop (which would mean that you can screw
yourself over pretty bad with some creative SQL injection...).
> And also set the other stuff (like the userhome_field etc.) should be ok.
You should get in touch with Chris Masters, rotis 23 at yahoo dot com (no
space between the rotis and the 23). He seems to have the same motives as you
and has created a maildrop patch for himself. It includes the maildir
creation and some other minor mysql-ish niceness.
- Erik Bourget