November 02, 2009 Archives

02-11-2009 15:40

Roundcube and default identity

So when a user logs onto Roundcube for the first time, they are added to the roundcube database, with the default identity. This identity is <username>@localhost. They can, of course, change this and setup more identities in the Settings, but they shouldn't have to. So I found a patch online and modied it slightly to detect the domainname used to get to roundcube and use that as the default domain. Its simply this:

// replace $rcmail_config['mail_domain'] = '';   with:
$rcmail_config['mail_domain'] = preg_replace("/^[a-zA-Z]*\./i", "", $_SERVER['HTTP_HOST']);
Pretty neat huh?


Posted by DaveQB | Permanent Link | Categories: IT