Roundcube, Dovecot IMAP and case sensitive user names
Do your mail users like it to use mixed upper/lower case in user names? So the problem described below may hit you.
Your mail user is known to the system as email@example.com. The user itself knows himself as User Name so he naturally (it seems) uses User.Name@domain.tld when logging in to the Roundcube webmail page. Roundcube does not care much and saves User.Name@domain.tld to it's internal data base.
It tries to connect to the Dovecot IMAP server and gets a a001 NO Authentication failed. back. Dovecot indeed cares about the case. When trying to use the lower case variant firstname.lastname@example.org Roundcube still seems to use the former mixed case variant it already saved for connecting to the IMAP server.
To make it easy for your users just configure Dovecot to convert user names to lower case before looking it up in the system. Set this variable in /etc/dovecot/dovecot.conf:
auth_username_format = %Lu
And restart Dovecot.