[Dovecot] Master Login using MySQL problem - %{login_domain}

Marc Perkel marc at perkel.com
Tue Aug 17 20:45:15 EEST 2010



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 at plf.net*tom at plf.net

Aug 17 10:42:04 auth: Debug: auth(tom at plf.net,127.0.0.1,master): Master 
user lookup for login: bill at plf.net
Aug 17 10:42:04 auth: Debug: sql(tom at 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 at plf.net,127.0.0.1): unknown user
Aug 17 10:42:04 auth: Debug: sql(tom at 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 at plf.net,127.0.0.1): unknown user
Aug 17 10:42:06 auth: Debug: client out: FAIL   67      user=tom at plf.net
Aug 17 10:42:06 imap-login: Info: Aborted login (auth failed, 1 
attempts): user=<tom at 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}'



More information about the dovecot mailing list