Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: freshmint on February 03, 2007, 10:25:08 PM

Title: Auto mail_domain when adding new users
Post by: freshmint on February 03, 2007, 10:25:08 PM
Currently when new users are created their email is set to user@localhost 'cause I have "default_host" set to localhost and nothing on "mail_domain".

Is it possible to make RC use the current domain to create the user?

I use DirectAdmin as control panel and I don't have any virtuser file (to be honest I have no idea how it should be). Also I don't think it's possible for me to keep track of my users domains and update the $rcmail_config['mail_domain'] array. My users will access RC by http://www.domain.com/webmail, so if there's a way to configure RC to use the domain.com when creating the user's email that'd be great.
Title: Re: Auto mail_domain when adding new users
Post by: freshmint on February 03, 2007, 11:43:31 PM
Well, I found the solution myself. I'm posting it here just in case anybody needs it too.

Code: [Select]
$rcmail_config['mail_domain'] = preg_replace("/^www\./i", "", $_SERVER['HTTP_HOST']);