Hi !!
In that case you don't need to select the host on the login screen but enter your full e-mail address as user name.
the probem is that on Mac, specially Entourage, refuses to work with usernames that contain a @ character, so many of our users username is user.domain.com or another.user.domain.com. One good aproach will be:
only of first login:
a) if the username does not have a @, and if a external query has been configured, execute the query to get the real email b) if the username does not have a @, and if a default domain has been configured, append the configured domain to the user's username c) if the username does not have a @ the use the apache virtual hostname (striping the initial www. if present) and append the hostname domain to the user's username (note that this will not work in servers other than apache)
Once that user is resolved from the virtusertable, it'll be saved in the users table (alias) and don't has to be resolved from the file again on the next login.
that's perfect
1). Too expensive, past 1000 users the lookups take valuable time. If they're in MySQL, then its not so bad, but why waste another MySQL lookup that Courier-AUTHLIB will be doing anyways (or whatever your IMAP server's auth system does).
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)