Thank you for your reply. So, you mean that both user_query and password_query should have the same amount of parameter and the mail parameter from user_query should have the exact parameter as userdb_mail from password_query? And also I've to turn on userdb prefetch {} Kind Regards, Henry From: Timo Sirainen [mailto:tss at iki.fi] To: Dovecot Mailing List [mailto:dovecot at dovecot.org] Subject: Re: [Dovecot] Can not Create Maildir using userdb sql> On Jan 12, 2009, at 8:38 PM, Henry Yonathan wrote: > > > password_query = SELECT email AS user, password, CONCAT('/home/vmail/ > > %d/%n/', maildir) AS userdb_home, CONCAT('maildir:/home/vmail/%d/ > > %n/', maildir) AS userdb_mail, 5000 AS userdb_uid, 5000 AS > > userdb_gid FROM view_users WHERE email = '%u'; > > Here you're trying to use prefetch userdb by returning userdb_* > fields. But they're different than here: > > > user_query = SELECT '/home/vmail/%d/%n' AS home, '/home/vmail/%d/%n/ > > Maildir' AS mail, 5000 AS uid, 5000 AS gid, > > CONCAT('maildir:storage=', ROUND(quota/1024)) AS quota FROM > > view_users WHERE email = '%u'; > > They should contain the exact same values. Here userdb_mail isn't > prefixed with "maildir:", which is your main problem. Also here you're > specifying "quota" field but in password_query you're not specifying > userdb_quota at all. > > > passdb: > > driver: sql > > args: /etc/dovecot-sql.conf > > userdb: > > driver: sql > > args: /etc/dovecot-sql.conf > > And finally you're not currently even using prefetch userdb so Dovecot > ignores all the userdb_* fields you're returning in password_query. > For enabling prefetch see http://wiki.dovecot.org/UserDatabase/Prefetch---- Belanja buku lewat internet, GRATIS ONGKOS KIRIM ke seluruh Indonesia. Kunjungi website http://www.bookoopedia.com. Hipokuku.com - Cara Baru Isi Pulsa Lewat Internet. Kunjungi website http://www.hipokuku.com untuk informasi selengkapnya.
On Tue, 2009-01-13 at 10:27 +0700, Henry Yonathan wrote:> Thank you for your reply. > So, you mean that both user_query and password_query should have the > same amount of parameter and the mail parameter from user_query should > have the exact parameter as userdb_mail from password_query? > And also I've to turn on userdb prefetch {}password_query also needs to return the password. But other than that, yes. -------------- 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/20090113/4de13c1e/attachment-0002.bin>
Dear Tim, Thank you for your clue. And I'm now able to do what I've been dreaming of :D Kind Regards, Henry Yonathan "All successful communication is Hypnosis" - Milton H. Erickson ----- Original Message ----- From: Timo Sirainen [mailto:tss at iki.fi] To: Dovecot Mailing List [mailto:dovecot at dovecot.org] Subject: Re: [Dovecot] Can not Create Maildir using userdb> On Tue, 2009-01-13 at 10:27 +0700, Henry Yonathan wrote: > > Thank you for your reply. > > So, you mean that both user_query and password_query should have the > > same amount of parameter and the mail parameter from user_query should > > have the exact parameter as userdb_mail from password_query? > > And also I've to turn on userdb prefetch {} > > password_query also needs to return the password. But other than that, > yes.---- Belanja buku lewat internet, GRATIS ONGKOS KIRIM ke seluruh Indonesia. Kunjungi website http://www.bookoopedia.com. Hipokuku.com - Cara Baru Isi Pulsa Lewat Internet. Kunjungi website http://www.hipokuku.com untuk informasi selengkapnya.
Apparently Analagous Threads
- Can not Create Maildir using userdb sql
- newbie
- trying to resurrect discussion about "Cannot signal a process over a channel (rfc 4254, section 6.9)"
- Weighted SUR, 2SLS regressions
- trying to resurrect discussion about "Cannot signal a process over a channel (rfc 4254, section 6.9)"