Hi, I am working through setting up a virtual hosting system using Dovecot, Postfix and Postgres on a CentOS 5 box running an install of the dovecot-1.0-1.2.rc15.el5 RPM. The question I have is, given this password_query SELECT clause, which all return valid values from the database: user password domain can I use a %d in the WHERE clause of my user_query? The reason I ask is that the log file shows the results coming back correctly for the password_query in the log file: dovecot: auth(default): client out: OK 1 user=user1 domain=domain.com Yet, the user_query that is logged shows: dovecot: auth(default): sql(user1,192.168.0.77): SELECT vu.virtual_mailbox AS home, vu.virtual_uid AS uid, vu.virtual_gid AS gid, vd.domain AS domain FROM virtual_users vu, virtual_mailbox_domains vd WHERE vu.domain_key = vd.id AND vu.username = 'user1' AND vd.domain = '' And the actual query in my dovecot-sql.conf looks like this: user_query = SELECT vu.virtual_mailbox AS home, vu.virtual_uid AS uid, vu.virtual_gid AS gid, vd.domain AS domain FROM virtual_users vu, virtual_mailbox_domains vd WHERE vu.domain_key = vd.id AND vu.username = '%u' AND vd.domain = '%d' I would have expected the above %d to contain the "domain" SELECT value from the password_query, but that doesn't seem to be the case. Any insight is most appreciated. Thanks, John
John Dubchak, on 1/24/2008 7:10 AM, said the following:> I am working through setting up a virtual hosting system using Dovecot, > Postfix and Postgres on a CentOS 5 box running an install of the > dovecot-1.0-1.2.rc15.el5 RPM.<broken_record> That's an old/buggy version - please update to a release version (1.0.10 is current) </broken_record> -- Best regards, Charles
On Thu, 2008-01-24 at 06:10 -0600, John Dubchak wrote:> I would have expected the above %d to contain the "domain" SELECT > value from the password_query, but that doesn't seem to be the case.Your password_query most likely dropped the domain by returning user field as Dovecot's "user" field. Have it return instead something like: password_query = select concat(user, '@', domain) as user, ... -------------- 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/20080131/5c31681e/attachment-0002.bin>
Reasonably Related Threads
- Virtual Users and permission denied on POP3 Authentication - cur directory
- troubleshooting new dovecot installation
- Upgrade Question about mail_location
- Maildir format, "From " in the first line
- failed: Permission denied missing +w perm: /home/mail_virtual/2001