On Fri, 2010-12-24 at 14:16 +0300, subscriber@viliar.net.ru wrote:
I get segfault error with "doveadm quota get -u user"
Fixed the crash by having it give error message instead: http://hg.dovecot.org/dovecot-2.0/rev/a293626e09e2
Then fix your config:
plugin {
quota = maildir
autocreate2 = virus autocreate3 = spam sieve = ~/.dovecot.sieve sieve_dir = ~/sieve }
user_query = SELECT '/mail/' || domain || '/' || mail || '/maildir' as home, uid, gid, '*:storage=' || quota || 'B' AS quota_rule FROM users WHERE mail || '@' || domain = '%u'
This is ok, although that kind of WHERE query can't use SQL indexes. Better to use:
WHERE mail='%n' and domain = '%d'
password_query = SELECT mail || '@' || domain as user, password as password, '/mail/' || domain || '/' || mail || '/maildir' as userdb_home, uid as userdb_uid, gid as userdb_gid, 'maildir:storage=' || (quota/1024) as userdb_quota,
Remove userdb_quota from here and add a userdb_quota_rule matching user_query's one.
I'd also remove home/userdb_home from the above query and just use global settings, also not making home same as mail location (http://wiki2.dovecot.org/VirtualUsers/Home):
mail_home = /mail/%d/%n mail_location = maildir:~/maildir:INDEX=~/indexes