RoundCube 0.6 on IspConfig 2

Discussion in 'Tips/Tricks/Mods' started by clixclix, Oct 31, 2011.

  1. clixclix

    clixclix Member HowtoForge Supporter

    Hi everybody,

    if you wish to install by yourself RoundCube 0.6 on an IspConfig 2 server, after you downloaded, unzipped and installed RoundCube (or upgraded from version < 0.6) remember to perform the next modifications on the file config/main.inc.php file:

    1) Modify the line:
    Code:
    $rcmail_config['plugins'] = array('new_user_identity', 'virtuser_file');
    (Before RoundCube 0.6, the 'virtuser_file' plugin didn't have to be activated explicitly)

    2) Add the line:
    Code:
    $rcmail_config['virtuser_file'] = '/etc/postfix/virtusertable';
    (/etc/postfix/virtusertable is kept up by IspConfig2)


    I hope this can help other people to save time during RoundCube setup.
     
  2. madmucho

    madmucho Member

    0.7 too

    This settings works for me thank You, also working on 0.7 version
     
  3. jortega

    jortega New Member

    Probably this is pretty gross hacking, but works fine in ispconfig 2.

    To use roundcube 0.8 with ispconfig, and to be able to use the email for login, a simple modification is required in the ../plugins/virtuser_file/virtuser_file.php

    I'll show the entire function to look for, and the change is commented. Is a one line addition that checks for the prefix web[number]_ (example "web9_") and any mail containing [email protected].

    Now the only thing that we need is a way to access the user's names as appears in ispconfig to make this thing work automagically (without the need to change the webx_user to the real name manually inside roundcube). Any ideas??

    Code:
     
    private function findinvirtual($pattern)
        {
                $result = array();
                $virtual = null;
    
                if ($this->file)
                    $virtual = file($this->file);
    
                if (empty($virtual))
                    return $result;
    
                // check each line for matches
                foreach ($virtual as $line) {
                    $line = trim($line);
                    if (empty($line) || $line[0]=='#')
                        continue;
    
                    if (preg_match($pattern, $line))
                            {
                                    // hack to make any webx_ prefix and www. prefix from virtusertable
                                    [COLOR="Red"]if ((preg_match ('/^web\d+_/i', $line)) OR (stripos($line, 'www.')>0)) continue;[/COLOR]                                // end hack
                                    $result[] = $line;
                            }
                }
    
                return $result;
        }
    
    }
    
     

Share This Page