Hello list,
Here is a fast solution to avoid writing of "@domain" after username when your server hosted virtual domains.
With this patch is enought to write only "john" in login form instead of " john@virtualdomain.test" If $rcmail_config['add_domain2username'] is true RoundCube will strip domain name from web addresses like: http://webmail.virtualdomain.test/ or http://www.virtualdomain.test/RoundCube/ and add it to username.
// If this is true will use hostname to get domain name $rcmail_config['add_domain2username'] = true;
Changes in program/include/main.inc
--- start diff --- Index: program/include/main.inc =================================================================== RCS file: /cvsroot/roundcubemail/roundcubemail/program/include/main.inc,v retrieving revision 1.48 diff -u -p -r1.48 main.inc --- program/include/main.inc 23 Mar 2006 22:32:32 -0000 1.48 +++ program/include/main.inc 11 May 2006 14:51:57 -0000 @@ -366,6 +366,19 @@ function rcmail_set_locale($lang) $OUTPUT->set_charset(rcube_language_prop($lang, 'charset')); }
+function parse_domain($url) {
+}
// perfom login to the IMAP server and to the webmail service function rcmail_login($user, $pass, $host=NULL) @@ -376,6 +389,14 @@ function rcmail_login($user, $pass, $hos if (!$host) $host = $CONFIG['default_host'];
$user = $user . '@' . $domain; // add domain from hostname
@@ -1586,13 +1607,18 @@ function rcmail_login_form($attrib) EOF;
$OUTPUT->add_script("$JS_OBJECT_NAME.gui_object('loginform', '$form_name');");
$form_start $SESS_HIDDEN_FIELD $fields[action]
<table><tr>
+<td class="title">Domain</td> +<td class="title">$domain</td>
+</tr><tr>
<td class="title">$labels[user]</td> <td>$fields[user]</td>
--- end of diff