[RCU] (no subject)
Marc Roos
M.Roos at f1-outsourcing.eu
Mon Feb 17 14:59:53 CET 2020
Hi Dirk,
Thanks!! this indeed looks interesting for some user specific settings
-----Original Message-----
To: users at lists.roundcube.net;
Subject: Re: [RCU] (no subject)
Hi Marc,
On 30/12/2019 21:59, Marc Roos wrote:
> I would like to keep things simple, for a temporary work-a-round.
> Everyone is using the same https url.
>
> I thought about something like creating a small array of usernames and
> then add something like
>
> if (in_array('%u', $userarr)) { $config['smtp_server'] =
> 'out2.example.com'; }
>
> Preferably in the config, so I can update roundcube to newer versions
> easily.
Use the virtuser_query plugin. No need for installation as it comes with
the normal roundcube installation. You just need to activate and
configure in your config file.
In your case you could do something like:
$config['virtuser_query'] = array('host' => "SELECT case when '%u' in
(....) then 'out2.example.com' else 'out1.example.com' end")
For more complicated cases store the relationship in your sql database
or build a stored procedure on the sql server. Any SQL statement which
gives back the host is allowed. %u will be expanded to the user login.
With the plugin you can also adjust other variables per user like the
email-address.
Best Regards
Dirk
More information about the users
mailing list