It could cause trouble; however, if you have webmail.domain.com point to an IP of where RC is, and webmail.domain2.com point to the same IP of where RC is, then you could conceivably use $_SERVER['HTTP_HOST'], wipe out the 'webmail.' portion, and tack that on. Now, that's not to say it's full-proof. The only full-proof plan is to use the array that's set up in the main.inc.php file, or use multiple installations that could use the same database.