On Fri, 2009-11-20 at 21:57 +0100, Lampa wrote:> A) passdb sql(SELECT userid AS user, pw AS password, quota AS
> userdb_quota_rule FROM users WHERE userid = '%u') + userdb static
> (uid=500 gid=500 home=/home/mail/%d/%n allow_all_users=yes) - using
> extra fields quota with no prefetch userdb
This won't work. passdb's userdb_* fields are used only if you use
userdb prefetch.
> or
> B) passdb sql(SELECT userid AS user, pw AS password, quota AS
> userdb_quota_rule, CONCAT('/home/mail/', domain, '/', user)
AS
> userdb_home, 500 AS userdb_uid, 500 AS userdb_gid FROM users WHERE
> userid = '%u') + prefetch (eg same sql file)
This should work.
> Solution for LDA only(postfix local delivery) and for another
> IMAP/POP3 dovecot instance?
For LDA you need to add userdb sql (after the prefetch userdb) that does
the lookup.
> And how to implement domain quotas (something like user quotas using dict)
?
A shared quota between all users in a domain? That's kind of possible
with dict quota, but there's currently no way to (easily) recalculate
the quota if it gets out of sync. Anyway, you could at least do it with
file dict:
quota = dict:user::file:/var/mail/%d/dovecot-domain-quota
Probably with sql dict too, but I can't remember right now how exactly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20091123/532de0d0/attachment-0002.bin>