There is not a lot to go on here; perhaps you can get a more detailed look at what is happening when you use SquirrelMail to attempt the IMAP access by setting this line in
/etc/dovecot.conf This will cause some amount of logging to appear in /var/log/maillog, which may yield some clues. If you need more detail, the nearby line
will fill up your maillog even faster. And for the ultimate in security violation, there is the further declaration
Code:
auth_debug_passwords = yes
Be sure to uncomment these lines when you want to turn on the relevant logging, and then restart dovecot. (And be sure to disable this stuff when you have solved the problem. Otherwise, your maillog will end up with all sorts of stuff in it that you probably would not want stolen.)