It's easy to set up a special passdb query in dovecot to restrict IMAP access to certain users, e.g. see this documentation on the dovecot wiki.
But when I use a webmailer like Roundcube and want to allow every other user to use it (and not just the users I allowed to use IMAP per method above) this approach fails.
What would be a working configuration idea?
The webmailer is on the same server as dovecot. Maybe a special crafted SQL-passdb-statement along with a allow_nets extra field to the local address for all webmailer-only users? Or a special option in Roundcube itself?