Dear All,

I'm trying to deploy SOGo on top of my existing IMAP infrastructure, which is 
powered by PostFix with a MySQL backend to support virtual users and domains.  
All my email users belong to a single MySQL DB and through views it's been easy 
to make SOGo recognize the existing tables.

My problem:  seems like it's impossible to separate users per email domain (see 
for example 
http://mail.opengroupware.org/pipermail/sogo/2010-April/006105.html).

In SOGo, as far as I've seen, which sogo-domain will match, say, user 
[email protected] depends on which userSource [email protected] belongs to.  
Quoting Matto Marjanovic 
(http://mail.opengroupware.org/pipermail/sogo/2010-March/005843.html):

> A sogo-domain is basically a set of UserSources.  If a UID ('c_uid') is
> found in a UserSource, then the sogo-domain of the UID is considered to be
> whatever sogo-domain the UserSource belongs to.  One implication of this is
> that each UserSource must be used by a single sogo-domain.

Correct me if I'm wrong, but that means I cannot segregate users per domain 
because all of them belong to a single UserSource.  This would be quite a 
showstopper:  imagine users of ABC Company being able to browse usernames of 
their competitor XYZ Company in the "sharing calendar" or "subscribe 
addressbook" panel...

POSSIBLE SOLUTIONS

1)  I know I could use a couple of MySQL views to accomplish segregation, i.e. 
set one view per each domain, but it would be VERY inefficient (and would also 
uselessly pollute the database structure).  Imagine having 100 domains:  each 
login would produce 100 queries just to discover which one the user belongs to. 
 Weird.

2)  A slightly better way of handling this would be to declare a filter in the 
UserSource -- something like "(domain = `mydomain.com`)", but as far as I can 
tell filters work only with LDAP sources.

3)  The best solution would be to switch the sogo-domain according to the 
hostname or another http header.  I've tried for a couple of hours but couldn't 
make it happen (let me say SOGo documentation is not that clear about which key 
is used when switching the domain).  Am I missing something, or is it something 
not yet implemented in SOGo?

Thanks,
Corrado Fiore-- 
[email protected]
https://inverse.ca/sogo/lists

Reply via email to