Umm.. Do you use %u in mail_location or anywhere else?

The only thing I can think of is that your password_query modifies
the username to be "OK". I can think of nothing in Dovecot's code
that would set USER=OK.


Not seeing it anywhere else except for my 'WHERE' clauses.

password_query = SELECT clearpasswd AS password FROM authenticate.users AS u WHERE u.userID = '%u'
user_query = SELECT file AS home, uid, gid, concat('maildir:storage=', TRUNCATE(quota/1024,0)) AS quota FROM iwmailsystem.virtmailbox AS v WHERE v.userID  = '%u'
 

mail_location is this:
mail_location = maildir:%h

 The only entry in dovecot.conf that uses %u but isnt commented is: login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c


Other ideas?

-c