[ejabberd] Different users for different domains

Kirill Ratkin kirill.v.ratkin at gmail.com
Sat May 4 20:19:30 MSK 2013


Yes. it's idea but this is not so common ...
it's just two domains for example ... it could be three, four, five domains
...

What I configure now and ... it seems it works ...

I create two DB in my MySQL ... each DB for each domain.
There are DB excom for example.com and exorg for example.org

And comment line with odic_server:
%%{odbc_server, {mysql, "192.168.1.106", "ejabberdb", "ejabberd", "pass"}}.

But I change odbc_server lines for virtual hosts

{host_config, "example.com", [{auth_method, odbc},
        {odbc_server, {mysql, "192.168.1.106", "excom", "ejabberd",
"pass"}}]}.
{host_config, "example.org", [{auth_method, odbc},
        {odbc_server, {mysql, "192.168.1.106", "exorg", "ejabberd",
"pass"}}]}.

Then I create user 'u2' in both domains. And 'select * from users' returns
'u2' in both databases;
After I create user 'uu' in example.com and add him as friend to u2 in
example.com domain.

Then I do 'select * from rosterusers' for both domain and I see records in
example.com and no records in example.org

it means these are different users in different domains even if they have
same username.

But maybe my test is not complete ...


2013/5/4 Bzzz <lazyvirus at gmx.com>

> On Sat, 4 May 2013 19:34:01 +0400
> Kirill Ratkin <kirill.v.ratkin at gmail.com> wrote:
>
> > I want to configure ejabberd for two domains but I want users were in
> > different domains.
>
> Perhaps this is not the answer you're looking after, but why not
> using 2 servers and have them talking to each other?
>
> This way, you have the wanted result plus a security: if one of
> the server is down for any reason, the other continues to work
> and only one half of the users wants to kill you painfully ;-)
>
> JY
> --
> Man that scratch his butt at night
> awakes with stinking fingers.
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20130504/b5ad1b0c/attachment.html>


More information about the ejabberd mailing list