I have more than one site on different servers, and I want to do 1 installation instead of having multiple ones.
So in main.inc.php, I changed:
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config['default_host'] = 'mail.mydomain.com';
to:
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
if((isset($_SESSION['username'])&&$_SESSION['username']!="")||(isset($_POST['_user'])&&$_POST['_user']!="")){
$email_parts = $_SESSION['username'] ? explode("@",$_SESSION['username']) : explode("@",$_POST['_user']);
$rcmail_config['default_host'] = 'mail.'.$email_parts[1];
}else{
$rcmail_config['default_host'] = 'mail.mydomain.com';
}
Is this dangerous?