[RCD] determining virtual user domain

A.L.E.C alec at alec.pl
Mon Jun 14 09:30:49 CEST 2010


On 13.06.2010 16:00, Jacob Whatley wrote:
>    static function create($user, $host)
>    {
>      //added by rhyton--------------------------------
>      $host = getenv('HTTP_HOST');
>      $host = preg_replace("/^www\./", "", $host, "1");
>      //-----------------------------------------------
>
> We have used a similar solution with OpenWebMail and Neomail in the past
> with no problems.
>
> Does anyone see any issue with using this modification and if so, what?
> Also, is there perhaps a better way to implement this with more complete
> checking?

It is already implemented in svn-trunk version. You can use variables in 
some config options. From main.inc.php.dist:
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld

-- 
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/



More information about the Dev mailing list