[horde] Horde cyrsql driver

Aleksey Chudov aleksey at bb.lv
Wed Jun 25 22:12:13 UTC 2008


Hello.
I have Horde installation with Cyrus IMAP Mupdate Cluster and virtual 
domains support.
Earlier I used Web-Cyradm 0.5.5 to manage my accounts, but now I need to 
let users open new accounts through IMP, so I try to setup Horde cyrsql 
driver.
I can't find any documentation about this configuration. Bellow is my 
configuration:

horde/config/conf.php

$conf['auth']['params']['cyradmin'] = 'cyrus';
$conf['auth']['params']['cyrpass'] = '<PASSWORD>';
$conf['auth']['params']['imap_dsn'] = '{backend1.mydomain:143/imap/notls}';
$conf['auth']['params']['phptype'] = 'mysql';
$conf['auth']['params']['protocol'] = 'unix';
$conf['auth']['params']['hostspec'] = 'localhost';
$conf['auth']['params']['username'] = 'mail';
$conf['auth']['params']['password'] = '<PASSWORD>';
$conf['auth']['params']['database'] = 'mail';
$conf['auth']['params']['table'] = 'accountuser';
$conf['auth']['params']['username_field'] = 'username';
$conf['auth']['params']['password_field'] = 'password';
$conf['auth']['params']['domain_field'] = 'domain_name';
$conf['auth']['params']['encryption'] = 'md5-hex';
$conf['auth']['params']['folders'] = array('Drafts', 'Sent', 'Spam', 
'Trash');
$conf['auth']['params']['quota'] = 10485760;
$conf['auth']['params']['unixhier'] = true;
$conf['auth']['params']['hidden_accounts'] = array('cyrus', 'backend1', 
'frontend1', 'proxy1');
$conf['auth']['driver'] = 'cyrsql';

horde/imp/config/servers.php

$servers['cyrus'] = array(
    'name' => 'mail.mydomain',
    'server' => 'frontend1.mydomain',
    'hordeauth' => true,
    'protocol' => 'imap/notls',
    'port' => 143,
    'maildomain' => 'mydomain',
    'smtphost' => 'frontend1.mydomain',
    'smtpport' => 25,
    'realm' => '',
    'preferred' => '',
    'admin' => array(
        'params' => array(
            'login' => 'cyrus',
            'password' => '<PASSWORD>',
            'userhierarchy' => 'user/',
            'protocol' => 'imap/notls',
            'hostspec' => 'localhost',
            'port' => 143
        )
    ),
    'quota' => array(
        'driver' => 'imap',
        'params' => array(),
    ),
    'acl' => array(
        'driver' => 'rfc2086',
    )


I have problem:

1. Then I create new user and try to login as user at domain I can login to 
horde and get error "mailbox does not exist"

HORDE [error] [imp] Unable to retrieve quota [pid 21240 on line 998 of 
"/usr/local/horde/imp/lib/IMP.php"]

As I can see it is because Horde creates cyrus mailbox as user at domain 
but insert into MySQL username without domain.
Web-Cyradm create users with domain. For example:

TABLE accountuser:
username         password    domain_name
user at domain   <PASS>      mydomain        - (Web-Cyradm)
user                 <PASS>      mydomain       - (Horde)

TABLE virtual:
alias                dest                  username
user at domain   user at domain    user at domain      - (Web-Cyradm)
user at domain   user at domain    user                   - (Horde)


2. After switch to $conf['auth']['driver'] = 'cyrsql'; I can't change 
IMP mode on login screen. Is it possible?


Could you help me with right configuration?

-- 
Regards, Aleksey




More information about the horde mailing list