[Dovecot] Username bug in '%%' variables selects
Hi! Forgive my bad English.
I trying to set up shared folders, but I can't.
I shared INBOX of 'victor@domain.com' for 'victor@testmail.domain.com' There is my debugging results:
doveadm acl debug -u victor@testmail.domain.com INBOX.shared.victor@domain.com.
doveadm(victor@testmail.domain.com): Error: Couldn't create namespace 'INBOX.shared.' for user victor@domain: userdb didn't return a home directory, but mail_location used it (%h): maildir:%h
That's I seen in logs:
auth-worker: Debug: sql(victor@domain): SELECT CONCAT('/var/spool/mail/', SUBSTRING_INDEX(email, '@', -1), '/', SUBSTRING_INDEX(email, '@', 1)) as home from users
WHERE email='victor@domain'
What happened with my username? 'victor@domain' is not correct value.
My config:
namespace { inbox = yes location = prefix = INBOX. separator = . type = private } namespace { hidden = no list = yes location = maildir:%%h prefix = INBOX.shared.%%u. separator = . subscriptions = no type = shared }
password_query =
SELECT email as username, password
FROM users WHERE email = '%u'
user_query = SELECT CONCAT('/var/spool/mail/', SUBSTRING_INDEX(email, '@', -1), '/', SUBSTRING_INDEX(email, '@', 1)) as home from users
WHERE email='%u'
Please, help me!
-- Best regards,
Victor
I solved this issue by changing a namespace to native type.
namespace { separator = / prefix = inbox = yes }
namespace { separator = . prefix = INBOX. inbox = no hidden = yes list = no alias_for = }
namespace { type = shared separator = / prefix = shared/%%u/ list = yes subscriptions = no hidden = no location = maildir:%%h:INDEX=%h/shared/%%u }
It did not turn out to make the transparent migration. :( Outlooks 2007 reloaded all scheme and frozen.
It's seems a bug in Dovecot.
participants (1)
-
Victor