[Dovecot] %d is empty

rihad rihad at mail.ru
Sat Sep 20 11:44:03 EEST 2008


Hi, I'm a Dovecot newb playing with version 1.1.3 port under FreeBSD.
After setting up dovecot-sql.conf for MySQL I can't check mail via POP3:

...
password_query = \
         SELECT CONCAT(username, '@', d.name) AS user, password \
         FROM users u JOIN domains d ON u.domain_id=d.id \
         WHERE username='%n' AND d.name='%d' AND active

(with or without \ line breaks - same thing)

rihad at rihad:~$ telnet nigar pop3
Trying 192.168.0.248...
Connected to nigar.localnet.
Escape character is '^]'.
+OK Dovecot ready.
user rihad at bar.com
+OK
pass 123456
-ERR Authentication failed.
quit
+OK Logging out
Connection closed by foreign host.


MySQL query log shows:
080919 21:19:51    4 Query      SELECT CONCAT(username, '@', d.name) AS
user, password FROM users u JOIN domains d ON u.domain_id=d.id WHERE
username='rihad' AND d.name='' AND active



Further investigation revealed that %u is just rihad and not rihad at bar.com.

Any hints?

TIA.


More information about the dovecot mailing list