Hi, 

Could you just make your default host be the name of your server, even if it is localhost?  Or use the $_SERVER["server_name"] variable? (http://us3.php.net/reservedvariables)

In any case, you can definitely do what I did which was to hack /program/include/main.inc, around line 332, the function called rcmail_create_user() - this is a great function to hack because it lets you manually manipulate things like replyto, signature ("sent from Conway's awesome RoundCube install!"), or even your own preference fields.  Here, you can change $host by going

$host = "mydarnhost";

anywhere after 

function rcmail_create_user($user, $host)
  {
  global $DB, $CONFIG, $IMAP;


On a development note, we DESPERATELY need the array of possible IMAP servers to be multi-dimensional, so that yo can config with the server, a user-readable server-name, and perhaps some server-specific data.  

Best, 
J-dawg


On Dec 15, 2005, at 11:15 AM, Gavin Conway wrote:

Roundcube and Perdition are on the same server. The IMAP servers are seperate entities. The config of roundcube means that in this instance I would need to set


$rcmail_config['default_host'] = 'localhost';


Unfortunately this means the knock on effect is that any logged in users gets 'username'@'localhost' as their originating email address. Is there any way for me to specify a default domain for email addresses or to set this parameter on a per-user basis? The alternative solution is to attempt to pre-populate the roundcube database with our user ID's or to ensure that our users know that when they initially log in that they will need to setup their identities before they are allowed to send email.