Hi !!
as the real email has been saved in Rounbdcube own's database this will not be exepensive (one only query for the firt login of each user)
What I'm saying is any access to MySQL is expensive. 1 extra query just at login is almost too much.
but it's only the very first login, once RoundCube knows the email it never does the query again. Nevertheless as what i propose is based on PEAR:DB you can make sqlite queries which are very fast, or you can configure no query and no query will be done.
I'm fine with the option being there, it adds a ton of flexibility, however simpler ones must be made available so that large installs are not hamstringed (hamstrung?) with extraneous database usage.
that's exactly what i propose, you can configure a query (if you want) or a default domain or Roundcube could just pick the virtual server name, only if the username does not have a @ or %