Installed dovecot for the first time, using the FreeBSD port. Found 2 issues with the port, and I've only been able to resolve one of them. First of all, the port, (or perhaps dovecot) does work with mysql 4.1 encryption. I had to create a user with access to the mysql table, then do 'set password = old_password('password');' in order to get dovecot to talk to the server. The second issue, is that dovecot seems to be ignoring my user_query settings. I have the following in dovecot-sql.conf: password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 125 as uid, 125 as gid FROM mailbox WHERE username = '%u' The password query works, however the user query seems to default to something else, and no matter how I change the user_query line in dovecot-sql.conf, it uses the same query. Here's an excerpt from my logs: dovecot: Oct 11 03:19:30 Info: Dovecot v1.0.alpha3 starting up dovecot: Oct 11 03:19:31 Info: auth-worker(default): mysql: Connected to (null) (postfix) dovecot: Oct 11 03:19:35 Info: auth-worker(default): sql(user at example.com,1.2.3.4): query: SELECT password FROM mailbox WHERE username = 'user at example.com' dovecot: Oct 11 03:19:35 Info: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=5.6.7.8 rip=1.2.3.4 resp=AGJqZXVuZ0Bjb2JhbHQtaXQuY29tAHRlc3Qdovecot: Oct 11 03:19:35 Info: auth(default): client out: OK 1 user=user at example.com dovecot: Oct 11 03:19:35 Info: auth(default): master in: REQUEST 1 13590 1 dovecot: Oct 11 03:19:35 Info: auth-worker(default): sql(user at example.com,1.2.3.4): SELECT home, uid, gid FROM users WHERE userid = 'user at example.com' dovecot: Oct 11 03:19:35 Error: auth-worker(default): sql(user at example.com,1.2.3.4): User query failed: Table 'postfix.users' doesn't exist dovecot: Oct 11 03:19:35 Info: imap-login: Internal login failure: user=<user at example.com>, method=PLAIN, rip=67.188.145.230, lip=209.25.157.150, TLS So obviously the query fails because that table doesn't exist. However that's not the query that I have in the configuration file. As a matter of fact, I have no idea where it's pulling that query from. Any pointers would be greatly appreciated.
I can't figure out the SQL issue either I don't think its a FreeBSD issue though -- I think its because most documentation (official, wiki, 3rd party) is for the 0.9x branch, and there's virtually nothing regarding using sql out there for the 1.x branch. (there were a lot of configuration changes and, what seems like general logic changes in regards to authentication , between the .9x and 1.x branches) I posted an almost identical sql issue yesterday. I'm hoping someone will clarify one of our issues. On Oct 11, 2005, at 6:12 PM, Barry Jeung wrote:> The second issue, is that dovecot seems to be ignoring my user_query > settings. I have the following in dovecot-sql.conf:
On Tue, Oct 11, 2005 at 03:12:58PM -0700, Barry Jeung wrote: snip> The second issue, is that dovecot seems to be ignoring my user_query > settings. I have the following in dovecot-sql.conf: > > password_query = SELECT password FROM mailbox WHERE username = '%u' > user_query = SELECT maildir, 125 as uid, 125 as gid FROM mailbox WHERE > username = '%u' > > The password query works, however the user query seems to default to > something else, and no matter how I change the user_query line in > dovecot-sql.conf, it uses the same query. Here's an excerpt from my logs: >snip> > dovecot: Oct 11 03:19:35 Info: auth-worker(default): > sql(user at example.com,1.2.3.4): SELECT home, uid, gid FROM users WHERE userid > = 'user at example.com' >snip> > So obviously the query fails because that table doesn't exist. However > that's not the query that I have in the configuration file. As a matter of > fact, I have no idea where it's pulling that query from. Any pointers would > be greatly appreciated.The query perfectly matches the last example in the dovecot-sql.conf file. In my copy, that's the last line in in the file. Did you uncomment that line? Did you do a search in the file for "SELECT home, uid, gid" to see if there's an uncommented line containing that query?
On Tue, 2005-10-11 at 15:12 -0700, Barry Jeung wrote:> The password query works, however the user query seems to default to > something else, and no matter how I change the user_query line in > dovecot-sql.conf, it uses the same query. Here's an excerpt from my logs:Well, are you sure you're modifying the right file? :) If you change connect settings, do they work? Only other reason that I can think of is that the query line is commented out. In all other cases you should get an error message, or it should work. The user query that you're getting is anyway the default that's built into dovecot-auth binary. Although I'm not sure if it's of any use in there.. Maybe I should remove it. -------------- 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/20051016/9b1fe49e/attachment.bin>