Re: [SOGo] multi-domain and identical usernames

2017-01-09 Thread To Ja
I'm happy to say that finally I made it working.
Not through SOGo configuration, but via custom javascript.

My data model for Exim, dovecot and roundcube is that user gets
authenticated everywhere with full usern...@domain.tld
Users are able to login in roundcube with username only (without domain)
because roundcube takes care of concatenating username and correct domain.
This was not possible in SOGo out of the box.
I modified this file
/usr/share/GNUstep/SOGo/WebServerResources/js/Common.js
and now SOGo login screen behaves the same way as roundcube. Namely:
1. user enters only his/her username on the logon page
2. JS script takes care of concatenating '@alpha.com' or '@beta.com'  to
the username depending whether user is accessing mail.alpha.com or
mail.beta.com
Of course data model for SOGo also use full usern...@domain.tld for c_uid

I am not that much of web or JS developer, so if anybody has an opinion on
this approach, I am looking forward to read it.

One more problem to solve - https://sogo.nu/bugs/view.php?id=3981
and SOGo webmail will be ready for our production : )
Can't wait.


On Sun, Jan 8, 2017 at 7:26 PM, Christoph Kreutzer  wrote:

> Hi,
>
> in my experience your configuration is just not possible (however I’m
> unable to find it specifically written in the docs).
> But there are several parts about it:
> - see SOGoEnableDomainBasedUID,
> - „c_uid - will be used for authentication“
> - „c_name - which can be identical to c_uid - will be used to uniquely
> identify entries“
>
> What would be possible:
> see SOGoLoginDomains
> And maybe you could modify the login page, so that the domain value is
> selected using JS and eventually hidden. See: https://sogo.nu/nc/
> support/faq/article/how-to-customize-the-html-2.html
>
> But I’m afraid a vHost-based config doesn’t seem to be possible.
>
> Don’t you like your users signing in using their mail address? I find that
> more intuitive, personally.
>
> Best regards,
> Christoph
>
> Am 08.01.2017 um 18:22 schrieb To Ja (goa.ra...@gmail.com)  >:
>
> Hi Kai-Uwe.
> Thank you for your input. I really appreciate it.
> However I don't see how just this data model should support my requirement
> (the same usernames on multiple domains).
>
> I already have Exim+Dovecot+Roundcube combo that supports it perfectly.
> I am now hoping to replace Roundcube with SOGo as a webmail.
> However what is simple in Roundcube, where I can define separate config
> for mail.alpha.com and mail.beta.com
>
> // try to load host-specific configuration
> $config['include_host_config'] = array(
>   'mail.alpha.com' => 'alpha_config.inc.php',
>   'mail.beta.com' => 'beta_config.inc.php',
> );
>
> This seems imposible in SOGo out of the box.
> Hopefully I am wrong with that statement and that's why I am asking other
> users for opinion.
>
> Thanks!
>
>
> On Sun, Jan 8, 2017 at 4:21 PM, "Kai-Uwe Rommel"  wrote:
>
> users-requ...@sogo.nu wrote on 08.01.2017 15:40:02:
> >
> > Hi SOGo users.
> > Has anyone managed to set up multi-domain configuration with
> > webmail, where users login just with their usernames and identical
> > usernames are handled correctly?
> > What I mean:
> > j...@alpha.com and j...@beta.com will use just "joe" as a username in
> > their webmails (mail.alpha.com and mail.beta.com).
> > I've spent whole day trying to do that, with no success yet.
> I am using MySQL as the authentication source and user table for
> Dovecot and SOGo. My user table looks like this (names changed):
> select * from mail.dovecot_user
> +---+--+++--
> --++
> | uuid  | gid  | cn | email  | home
> | active |
> +---+--+++--
> --++
> | 10003 | 5000 | julius.schulz  | julius.sch...@dom.com  |
> /var/spool/mail/dom.com/julius.schulz  |  1 |
> | 10004 | 5000 | clemens.schulz | clemens.sch...@dom.com |
> /var/spool/mail/dom.com/clemens.schulz |  1 |
> | 10001 | 5000 | joachim.schulz | joachim.sch...@dom.com |
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10018 | 5000 | root   | r...@localhost.dom.com |
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10002 | 5000 | postmaster | postmas...@dom.com |
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10016 | 5000 | ebay_wf| ebay...@dom.com|
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10020 | 5000 | agnes.meier| agnes.me...@dom.com|
> /var/spool/mail/dom.com/agnes.meier|  1 |
> ...
>
> I am using "cn" as the column to use for login, so users log in
> with "firstname.lastname" only. As you can see, for one mailbox
> I have defined a few aliases this way. This is in this case
> not for different domains but you should be able to use it
> that way as well. But in addition, you would 

Re: [SOGo] multi-domain and identical usernames

2017-01-08 Thread Christoph Kreutzer
Hi,

in my experience your configuration is just not possible (however I’m unable to 
find it specifically written in the docs).
But there are several parts about it:
- see SOGoEnableDomainBasedUID, 
- „c_uid - will be used for authentication“
- „c_name - which can be identical to c_uid - will be used to uniquely identify 
entries“

What would be possible:
see SOGoLoginDomains
And maybe you could modify the login page, so that the domain value is selected 
using JS and eventually hidden. See: 
https://sogo.nu/nc/support/faq/article/how-to-customize-the-html-2.html 


But I’m afraid a vHost-based config doesn’t seem to be possible.

Don’t you like your users signing in using their mail address? I find that more 
intuitive, personally.

Best regards,
Christoph

> Am 08.01.2017 um 18:22 schrieb To Ja (goa.ra...@gmail.com) :
> 
> Hi Kai-Uwe.
> Thank you for your input. I really appreciate it.
> However I don't see how just this data model should support my requirement 
> (the same usernames on multiple domains).
> 
> I already have Exim+Dovecot+Roundcube combo that supports it perfectly.
> I am now hoping to replace Roundcube with SOGo as a webmail.
> However what is simple in Roundcube, where I can define separate config for 
> mail.alpha.com and mail.beta.com
> 
> // try to load host-specific configuration
> $config['include_host_config'] = array(
>   'mail.alpha.com' => 'alpha_config.inc.php',
>   'mail.beta.com' => 'beta_config.inc.php',
> );
> 
> This seems imposible in SOGo out of the box.
> Hopefully I am wrong with that statement and that's why I am asking other 
> users for opinion.
> 
> Thanks!
> 
> 
> On Sun, Jan 8, 2017 at 4:21 PM, "Kai-Uwe Rommel"  wrote:
> 
> users-requ...@sogo.nu wrote on 08.01.2017 15:40:02:
> > 
> > Hi SOGo users.
> > Has anyone managed to set up multi-domain configuration with 
> > webmail, where users login just with their usernames and identical 
> > usernames are handled correctly?
> > What I mean:
> > j...@alpha.com and j...@beta.com will use just "joe" as a username in 
> > their webmails (mail.alpha.com and mail.beta.com).
> > I've spent whole day trying to do that, with no success yet.
> I am using MySQL as the authentication source and user table for
> Dovecot and SOGo. My user table looks like this (names changed):
> select * from mail.dovecot_user
> +---+--+++++
> | uuid  | gid  | cn | email  | home   
> | active |
> +---+--+++++
> | 10003 | 5000 | julius.schulz  | julius.sch...@dom.com  | 
> /var/spool/mail/dom.com/julius.schulz  |  1 |
> | 10004 | 5000 | clemens.schulz | clemens.sch...@dom.com | 
> /var/spool/mail/dom.com/clemens.schulz |  1 |
> | 10001 | 5000 | joachim.schulz | joachim.sch...@dom.com | 
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10018 | 5000 | root   | r...@localhost.dom.com | 
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10002 | 5000 | postmaster | postmas...@dom.com | 
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10016 | 5000 | ebay_wf| ebay...@dom.com| 
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10020 | 5000 | agnes.meier| agnes.me...@dom.com| 
> /var/spool/mail/dom.com/agnes.meier|  1 |
> ...
> 
> I am using "cn" as the column to use for login, so users log in
> with "firstname.lastname" only. As you can see, for one mailbox
> I have defined a few aliases this way. This is in this case
> not for different domains but you should be able to use it
> that way as well. But in addition, you would have to configure
> Postfix to accept e-mails for the additional domains, too.
> 
> Kai-Uwe Rommel
> 
> 
> -- 
> users@sogo.nu
> https://inverse.ca/sogo/lists
> 
> -- 
> users@sogo.nu
> https://inverse.ca/sogo/lists

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] multi-domain and identical usernames

2017-01-08 Thread To Ja
Hi Kai-Uwe.
Thank you for your input. I really appreciate it.
However I don't see how just this data model should support my requirement
(the same usernames on multiple domains).

I already have Exim+Dovecot+Roundcube combo that supports it perfectly.
I am now hoping to replace Roundcube with SOGo as a webmail.
However what is simple in Roundcube, where I can define separate config for
mail.alpha.com and mail.beta.com

// try to load host-specific configuration
$config['include_host_config'] = array(
  'mail.alpha.com' => 'alpha_config.inc.php',
  'mail.beta.com' => 'beta_config.inc.php',
);

This seems imposible in SOGo out of the box.
Hopefully I am wrong with that statement and that's why I am asking other
users for opinion.

Thanks!


On Sun, Jan 8, 2017 at 4:21 PM, "Kai-Uwe Rommel"  wrote:

> users-requ...@sogo.nu wrote on 08.01.2017 15:40:02:
> >
> > Hi SOGo users.
> > Has anyone managed to set up multi-domain configuration with
> > webmail, where users login just with their usernames and identical
> > usernames are handled correctly?
> > What I mean:
> > j...@alpha.com and j...@beta.com will use just "joe" as a username in
> > their webmails (mail.alpha.com and mail.beta.com).
> > I've spent whole day trying to do that, with no success yet.
>
>I am using MySQL as the authentication source and user table for
>Dovecot and SOGo. My user table looks like this (names changed):
>
> select * from mail.dovecot_user
> +---+--+++--
> --++
> | uuid  | gid  | cn | email  | home
> | active |
> +---+--+++--
> --++
> | 10003 | 5000 | julius.schulz  | julius.sch...@dom.com  |
> /var/spool/mail/dom.com/julius.schulz  |  1 |
> | 10004 | 5000 | clemens.schulz | clemens.sch...@dom.com |
> /var/spool/mail/dom.com/clemens.schulz |  1 |
> | 10001 | 5000 | joachim.schulz | joachim.sch...@dom.com |
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10018 | 5000 | root   | r...@localhost.dom.com |
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10002 | 5000 | postmaster | postmas...@dom.com |
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10016 | 5000 | ebay_wf| ebay...@dom.com|
> /var/spool/mail/dom.com/joachim.schulz |  1 |
> | 10020 | 5000 | agnes.meier| agnes.me...@dom.com|
> /var/spool/mail/dom.com/agnes.meier|  1 |
> ...
>
>
>I am using "cn" as the column to use for login, so users log in
>with "firstname.lastname" only. As you can see, for one mailbox
>I have defined a few aliases this way. This is in this case
>not for different domains but you should be able to use it
>that way as well. But in addition, you would have to configure
>Postfix to accept e-mails for the additional domains, too.
>
>Kai-Uwe Rommel
>
>
> --
> users@sogo.nu
> https://inverse.ca/sogo/lists
>
-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] multi-domain and identical usernames

2017-01-08 Thread "Kai-Uwe Rommel"

users-requ...@sogo.nu wrote on 08.01.2017 15:40:02:
>
> Hi SOGo users.
> Has anyone managed to set up multi-domain configuration with
> webmail, where users login just with their usernames and identical
> usernames are handled correctly?
> What I mean:
> j...@alpha.com and j...@beta.com will use just "joe" as a username in
> their webmails (mail.alpha.com and mail.beta.com).
> I've spent whole day trying to do that, with no success yet.

I am using MySQL as the authentication source and user table for
Dovecot and SOGo. My user table looks like this (names changed):

select * from mail.dovecot_user
+---+--+++++
| uuid  | gid  | cn | email  | home 
  | active |
+---+--+++++
| 10003 | 5000 | julius.schulz  | julius.sch...@dom.com  | 
/var/spool/mail/dom.com/julius.schulz  |  1 |
| 10004 | 5000 | clemens.schulz | clemens.sch...@dom.com | 
/var/spool/mail/dom.com/clemens.schulz |  1 |
| 10001 | 5000 | joachim.schulz | joachim.sch...@dom.com | 
/var/spool/mail/dom.com/joachim.schulz |  1 |
| 10018 | 5000 | root   | r...@localhost.dom.com | 
/var/spool/mail/dom.com/joachim.schulz |  1 |
| 10002 | 5000 | postmaster | postmas...@dom.com | 
/var/spool/mail/dom.com/joachim.schulz |  1 |
| 10016 | 5000 | ebay_wf| ebay...@dom.com| 
/var/spool/mail/dom.com/joachim.schulz |  1 |
| 10020 | 5000 | agnes.meier| agnes.me...@dom.com| 
/var/spool/mail/dom.com/agnes.meier|  1 |
...

I am using "cn" as the column to use for login, so users log in
with "firstname.lastname" only. As you can see, for one mailbox
I have defined a few aliases this way. This is in this case
not for different domains but you should be able to use it
that way as well. But in addition, you would have to configure
Postfix to accept e-mails for the additional domains, too.

Kai-Uwe Rommel
-- 
users@sogo.nu
https://inverse.ca/sogo/lists

[SOGo] multi-domain and identical usernames

2017-01-08 Thread To Ja
Hi SOGo users.
Has anyone managed to set up multi-domain configuration with webmail, where
users login just with their usernames and identical usernames are handled
correctly?
What I mean:
j...@alpha.com and j...@beta.com will use just "joe" as a username in their
webmails (mail.alpha.com and mail.beta.com).

I've spent whole day trying to do that, with no success yet.
-- 
users@sogo.nu
https://inverse.ca/sogo/lists