Multiple domains login in roundcube webmail

Roundcube is very good solution for webmail. I use squirrelmail for almost 4 years and I like it too.

In production server I install squirrelmail and roundcube as well for give other user different experience 🙂

using mail and mail2 as prefix and multiple domains need special attention in roundcube.

After search in their forum I like this snippet :

 function getDomain() {




    if ($arr[0]==$prefix) { unset($arr[0]); $host=implode(‘.’,$arr); }

    else { $host=”; }

    return $host;


plus this line :

$rcmail_config[‘username_domain’] = getDomain();

 put that in config/

for my case where I use mail and mail2 just edit the line :

if ($arr[0]==$prefix) { unset($arr[0]); $host=implode(‘.’,$arr); }


if ($arr[0]==$prefix or $arr[0]==’mail2′) {

unset($arr[0]); $host=implode(‘.’,$arr);


 Working  well for me 🙂

VirtualBox 1.5 work well with FreeBSD 6.2

Recent VirtualBox (version 1.5) work well with FreeBSD 6.2

  • Windows XP SP2 as host
  • Smooth installation
  • 2 GB HD
  • 2 Ethernet card ( dhcp work well and internal too)

Great release, will try this Vbox version for PCBSD 1.4RC 🙂


in Unix | 36 Words

date.timezone in php.ini for php5

My last post about glitch in time related function for php5 I use a function date_default_timezone_set

For global setting as always use date.timezone in php.ini

just change from :

;date.timezone =Asia/Jakarta

uncomment it first by remove semicolon mark into this :

date.timezone =Asia/Jakarta

save php.ini files and restart apache

try view using phpinfo()

you’re done 🙂

in PHP | 64 Words

date_default_timezone_set for php5 date() fixation

Recent upgrade to php5 in appserv make me confuse when my friend ask me about this code :

print date(‘d-M-Y H:i:s’);

hour isn’t accurate

after googling I found about date_default_timezone_set

for full list of supported zone time see this link

edit  the code into

date_default_timezone_set( "Asia/Jakarta" );

// date.timezone = "timezone_here"

print date(‘d-M-Y H:i:s’);

work well 🙂

in PHP | 81 Words

Options in FreeBSD ports

some useful options :

  • make config
  • make showconfig
  • make rmconfig

make rmconfig will remove old options saved.

If not work try to clean first 🙂

Also useful switch in portupgrade :

  • portupgrade -aFrR (will download all required file without install)
  • -i, need your decision.
in Unix | 42 Words