I have server with about 30 mail domains on it.
I wanted my users to use simple logins, not the FQDN ones.
In earlier versions I had to edit some core functionality to allow that, but with plugin API introduction, it became very easy.
So, I share my solution with community. Hope that helps someone.
1) All domains should have the same subdomain for webmail page address.
My ones look like mail.domain.com, mail.domain1.com and so on.
This is because the domain part being extracted from the page URL. If you want to use another subdomain, or don't use subdomain at all - open the domain_login.php file, find the string
$dhost = substr($_SERVER['HTTP_HOST'],5);
and change the 5 ("mail.") to your subdomain's length + 1 (for dot)
So, if no subdomain is used, change it to
$dhost = $_SERVER['HTTP_HOST'];
2) In Apache virtual host configuration for RoundCube webmail page you should have something like:
ServerName mail.domain.com
ServerAlias mail.domain1.com
ServerAlias mail.domain2.com
And so on. Don't forget to add ServerAlias directive for every your new domain.
3) Download the attached file and unzip to the plugins/ directory
4) Edit your config/main.inc.php file to enable the plugin called 'domain_login'
$rcmail_config['plugins'] = array('domain_login');
When plugin enabled, user can visit the page
http://mail.domain.com and enter his localpart login - the domain part is extracted from the page URL and added to user's login to form the FQDN login, which is used to authenticate. Plugin checks for the "@" symbol in user's login, so if the FQDN login was entered then nothing will be added - thus plugin doesn't brake the FQDN-style authentication for those who doesn't need short logins.
P.S. RoundCube rocks!