On 8/17/2010 10:11 AM, Timo Sirainen wrote:
Does it log "Master user lookup for login" if you patch Dovecot with http://hg.dovecot.org/dovecot-2.0/raw-rev/7428338c8df2 ?
Ran the patch - here's the results for bill@plf.net*tom@plf.net
Aug 17 10:42:04 auth: Debug: auth(tom@plf.net,127.0.0.1,master): Master user lookup for login: bill@plf.net Aug 17 10:42:04 auth: Debug: sql(tom@plf.net,127.0.0.1): query: SELECT user_name, domain_name, password FROM users WHERE user_name = 'tom' AND domain_name = 'plf.net' AND owns_domain='1' AND 'plf.net'='' Aug 17 10:42:04 auth: Info: sql(tom@plf.net,127.0.0.1): unknown user Aug 17 10:42:04 auth: Debug: sql(tom@plf.net,127.0.0.1): query: SELECT user_name, domain_name, password FROM users WHERE user_name = 'tom' AND domain_name = 'plf.net' AND masteradmin='1' Aug 17 10:42:04 auth: Info: sql(tom@plf.net,127.0.0.1): unknown user Aug 17 10:42:06 auth: Debug: client out: FAIL 67 user=tom@plf.net Aug 17 10:42:06 imap-login: Info: Aborted login (auth failed, 1 attempts): user=tom@plf.net, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=0, secured
Again my query is:
user_query = SELECT user_name, domain_name FROM users WHERE user_name = '%n' AND domain_name = '%d' AND owns_domain='1'
password_query = SELECT user_name, domain_name, password FROM users WHERE user_name = '%n' AND domain_name = '%d' AND owns_domain='1' AND '%d'='%{login_domain}'