Is there some how I could get the rpm source of toaster for My x86_64 CentOS ..??
 
 
 
Best Regards,
 

David J.
PT. Mentari Multimedia
Amex Building, 2nd floor
Melawai Raya no. 7
Jakarta Selatan 12160
Indonesia
Phone : +62 21 7205353
Fax     : +62 21 7206759
Mobile : +62 852 133 15127
----- Original Message -----
From: Dan Herbon
Sent: Friday, July 14, 2006 4:33 AM
Subject: [qmailtoaster] Toaster + Horde + Passwd

So I’ve researched this extensively and I’d like to find out if anyone out there has a fix for this.

 

My toaster install is using the default installation. Each virtual domain gets its own table in the vpopmail db rather than all in one db. Now the vpopmail backend in the horde/passwd/config/backends.php file is as follows:

 

----------------------------

$backends['vpopmail'] = array (

    'name' => 'Example Vpopmail Server',

    'preferred' => '',

    'password policy' => array(

        'minLength' => 3,

        'maxLength' => 20,

        'maxSpace' => 0,

        'minUpper' => 0,

        'minLower' => 0,

        'minNumeric' => 0

    ),

    'driver' => 'vpopmail',

    'params' => array(

        'phptype'    => 'mysql',

        'hostspec'   => 'localhost',

        'username'   => 'vpopmail',

        'password'   => 'enterqmail',

        'encryption' => 'crypt',

        'database'   => 'vpopmail',

        'table'      => 'vpopmail',   ß-----Problem

        'name'    => 'pw_name',

        'domain'  => 'pw_domain',

        'passwd' =>  'pw_passwd',

        'clear_passwd' => 'pw_clear_passwd',

        'use_clear_passwd' => true,

        'show_encryption' => true

    )

);

----------------------------

 

The vpopmail.php file in /horde/passwd/lib/Driver/ directory does the SELECT statement. The problem is of course the toaster install tries to query the vpopmail table in the vpopmail db but this of course doesn’t exist.

 

The code in the vpopmail.php file:

 

---------------------------

    function _lookup($username, $old_password)

    {

        /* Connect to the database. */

        $res = $this->_connect();

        if (is_a($res, 'PEAR_Error')) {

            return $res;

        }

 

        /* Only split up username if domain is set in backend

         * configuration. */

        if (!empty($this->_params['domain'])) {

            list($name, $domain) = explode('@', $username);

        } else {

            $name = $username;

        }

 

        /* Build the SQL query. */

 

        $sql = 'SELECT ' . $this->_params['passwd'] .

               ' FROM ' . $this->_params['table'] .

               ' WHERE ' . $this->_params['name'] . ' = ?';

        $values = array($name);

        if ($this->_params['domain']) {

            $sql .= ' AND ' . $this->_params['domain'] . ' = ?';

            $values[] = $domain;

        }

        Horde::logMessage('SQL Query by Passwd_Driver_vpopmail::_lookup(): ' . $sql, __FILE__, __LINE__, PEAR_LOG_DEBUG);

 

        /* Execute the query. */

        $result = $this->_db->query($sql, $values);

        if (!is_a($result, 'PEAR_Error')) {

            $row = $result->fetchRow(DB_FETCHMODE_ASSOC);

            $result->free();

            if (is_array($row)) {

                /* Get the password from the database. */

                $current_password = $row[$this->_params['passwd']];

 

                /* See if the passwords match. */

                return $this->comparePasswords($current_password, $old_password);

            }

        }

 

        return PEAR::raiseError(_("User not found"));

    }

---------------------------

 

Any help appreciated

 

Dan

Reply via email to