Roundcube Community Forum

 

Howto install virtuser_query plugin

Started by tobi79, October 18, 2015, 05:25:04 PM

Previous topic - Next topic

tobi79

Hi all,

I tryed the last hour to config the virtuser_query, but I didnt find any running config. I activate the plugin and have add these two lines:

$config['virtuser_query_dsn'] = 'mysql://roundcube:[email protected]/mailserver';
$config['virtuser_query'] = array('email' => 'SELECT email FROM virtual_users WHERE login = "%u"');

I tryed aswell:
$config['virtuser_query'] = 'SELECT email FROM mailserver.virtual_users WHERE login = "%u"';

But all didnt work. Could anyone help me?

Thx
Tobi

alec

Use %u without quotes, they will be added by the engine.

tobi79

Hi!

Thx for the quick answer and hint. But if I delete the quotes the select did not work and additional is anything wrong. Currently I think that the option virtuser_query_dsn does not work, the logindata are all ok. Is the used string wrong?

Tobi

alec

Did you check error log? Enable sql_debug to see what queries are executed.

Pilat

I have the same problem. I set

$config['debug_level'] = 1;
$config['sql_debug'] = true;
$config['virtuser_query'] = array('email' => 'select a.alias from dbmail_users u left join dbmail_aliases a on u.user_idnr = a.deliver_to where u.userid="%u"');

$config['plugins'] = array('acl', 'virtuser_query');

There are no one error or any row about using virtuser_query in logs/sql

SKaero

Quote from: Pilat on December 24, 2015, 03:52:33 AM
I have the same problem. I set

$config['debug_level'] = 1;
$config['sql_debug'] = true;
$config['virtuser_query'] = array('email' => 'select a.alias from dbmail_users u left join dbmail_aliases a on u.user_idnr = a.deliver_to where u.userid="%u"');

$config['plugins'] = array('acl', 'virtuser_query');

There are no one error or any row about using virtuser_query in logs/sql
As stated by alec above:
Quote from: alec on October 19, 2015, 01:57:59 AM
Use %u without quotes, they will be added by the engine.

natasha01

To begin, you should note that from RoundCube v1.0 and onwards, the configuration settings are included in one file only, as opposed to previous versions where they were split between two files.

First, locate the following file and make a copy named config.inc.php in the same directory. Use the -p option to preserve mode, ownership, and original timestamp:

# cp -p /etc/roundcubemail/defaults.inc.php /etc/roundcubemail/config.inc.php