Hello folks! Is it possible to retrieve quota information from a passdb sql lookup and using static userdb? I've tried here without success, and I can't find in the wiki or forum. Some ways I configured dovecot-sql.conf: 1) password_query = SELECT email AS user, CONCAT('maildir:storage=',quota) AS quota, password FROM users WHERE email = '%u' 2) password_query = SELECT email AS user, CONCAT('maildir:storage=',quota) AS userdb_quota, password FROM users WHERE email = '%u' With userdb sql things worked perfect, but as I can use static userdb I just need quota information per user from passwd sql. Thanks, Bruno.
Forgot to inform that no error log is generated! ---------- Forwarded message ---------- From: Bruno Puga <brpuga at gmail.com> Date: Jun 22, 2007 6:33 PM Subject: Quota from passdb sql To: Dovecot Mailing List <dovecot at dovecot.org> Hello folks! Is it possible to retrieve quota information from a passdb sql lookup and using static userdb? I've tried here without success, and I can't find in the wiki or forum. Some ways I configured dovecot-sql.conf: 1) password_query = SELECT email AS user, CONCAT('maildir:storage=',quota) AS quota, password FROM users WHERE email = '%u' 2) password_query = SELECT email AS user, CONCAT('maildir:storage=',quota) AS userdb_quota, password FROM users WHERE email = '%u' With userdb sql things worked perfect, but as I can use static userdb I just need quota information per user from passwd sql. Thanks, Bruno.
On Fri, 2007-06-22 at 18:33 -0300, Bruno Puga wrote:> Hello folks! > > Is it possible to retrieve quota information from a passdb sql lookup and > using static userdb?No, but you can use prefetch userdb.> password_query = SELECT email AS user, CONCAT('maildir:storage=',quota) AS > userdb_quota, password FROM users WHERE email = '%u'Add the other fields to this SQL query as explained in http://wiki.dovecot.org/UserDatabase/Prefetch Of course it adds a bit of overhead for the SQL queries, but I don't think it matters much. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070625/a21137c5/attachment-0002.bin>