Roundcube Community Forum

Release Support => Pending Issues => Topic started by: iburnthings on September 10, 2014, 07:56:36 AM

Title: RC and hMail virtuser_query
Post by: iburnthings on September 10, 2014, 07:56:36 AM
I need some help getting virtuser_query plugin to extract usernames from one table, and create identities in RC based on the domains in another table.

My hmail database has a few tables that I need virtuser to look at.
the first is table hm_accounts and it has an accountaddress column which lists as [email protected]
the next is hm_aliases which has custom email addresses for a select number of accounts. aliasname has [email protected] and aliasvalue has [email protected]
the third is hm_domain which has my primary domain as a single entry
the fourth is hm_domain_aliases which has all my secondary domain names linked to the primary. column daaslias lists 'domain1.tld' 'domain2.tld'

so I need virtuser_query to take the hm_accounts entry for the current user %u, remove @domain1.tld from it
then look at hm_domain_aliases and add each %u to each entry in table hm_domain_aliases
create identities for each.
Then less importantly I'd like to have hm_aliases processed and identities created for each custom email

Alternatively if it's possible to get virtuser_file to accept wildcards as part of the flatfile
for example instead of defining each account manually, just put something like.
%[email protected] %u
%[email protected] %u

or a small script to generate my flatfile using a similar method described for virtuser_query

Another option would be to take %u (or the rc table 'identities' extract the 'name' value)
then take 'hm_domain_aliases'
add them together with an @ between them and inject the new values into roundcubemail.identities table

I don't know much about php, scripting, or mysql commands at all. Thanks in advance for the help.
Title: Re: RC and hMail virtuser_query
Post by: timex163 on September 14, 2014, 11:43:21 AM
I have responded to you on the hmailserver forum post.


www.hmailserver.com/forum/viewtopic.php?t=27030