If you've recently updated your version of Dovecot and getting this error in RoundCube:
Connection to storage server failed
It may be that the dovecot index files are for an older version of dovecot, and don't work with the new version.
To resolve that issue, simply delete all dovecot index files, and dovecot will re-create them when it notices they're missing.
You should test this on one user first, before doing it on all users.
# cd /var/qmail/mailnames # service dovecot stop # find /var/qmail/mailnames | grep dovecot | xargs rm -f # service dovecot start
Dovecot will recreate the dovecot* files once the user logs in.