Hello there,

I stumbled on a problem while configuring Sogo for multi-domains.

I'll try to be as thorough as possible. Here is what I want I have and what I
want to do :

I have an OpenLDAP server configured with only one directory (say
dc=example,dc=com).

I have a mail serveur on Postfix dealing with virtual domains through my LDAP.
A user can access different mail boxes on the different domains with the same
uid (say username@domain1 and username@domain2), postfix and dovecot doing the
job to determine which box to access according to the right part of the email
address. This works fine.

I installed Sogo on the same server, first configuring it for only one domain,
identifying via uid. It worked perfectly, using the first LDAP mail entry to
connect to the mail server.

Now I would like to be able to access my different mail accounts through Sogo.
I've been trying to get that result for several hours without success. I read
the documentation and checked the results on this mailing list but couldn't
find something similar to my problem.

Here is what I do : from Sogo login page, enter username (i.e uid), select a
domain (dom2 or dom1) and connect.

Having defined "SOGoMailDomain = domain2;" in dom2, I was hoping for Sogo to
try to log to the IMAP server via username@domain2. However it seems no matter
what I set in SoGoMailDomain, Sogo still ask LDAP for the username mail entry
(the first, no matter how many there is), and so it still connects to IMAP via
username@domain1.


Here below the domains config part :

// In the main config part :
SOGoEnableDomainBasedUID = YES
SOGoLoginDomains = (dom1, dom2);

  // MULTI-DOMAINES POWAAAA !
  domains = {
        dom1 = {
            SOGoMailDomain = domain1;
            SOGoForceExternalLoginWithEmail = YES;
            SOGoUserSources = (
                {
                  type = ldap;
                  CNFieldName = cn;
                  UIDFieldName = uid;
                  IDFieldName = uid; // first field of the DN for direct binds

                  baseDN = "ou=Users,dc=example,dc=com";
                  bindDN = "uid=binduser,ou=Users,dc=example,dc=com";
                  bindPassword = pass;
                  canAuthenticate = YES;
                  displayName = "Shared Addresses";
                  hostname = ldap://ldap.example.com/????!StartTLS;
                  id = public_dom1;
                  isAddressBook = YES;
                });
        };
        dom2 = {
            SOGoMailDomain = domain2;
            SOGoForceExternalLoginWithEmail = YES;
            SOGoUserSources = (
                {
                  type = ldap;
                  CNFieldName = cn;
                  UIDFieldName = uid;
                  IDFieldName = uid; // first field of the DN for direct binds

                  baseDN = "ou=Users,dc=example,dc=com";
                  bindDN = "uid=binduser,ou=Users,dc=example,dc=com";
                  bindPassword = pass;
                  canAuthenticate = YES;
                  displayName = "Shared Addresses";
                  hostname = ldap://ldap.example.com/????!StartTLS;
                  id = public_dom2;
                  isAddressBook = YES;
                });
    };
    }

As stated above, I get the same mailbox whether I go through dom1 or dom2 :
https://sogo.example.com/SOGo/username@dom1/Mail/view ==
https://sogo.example.com/SOGo/username@dom2/Mail/view

Any help or statement about the possibility or the impossibility to do what I
want would be greatly appreciated.

As a side note, my last question is about SOGoEnableDomainBasedUID : I can't
get it working as expected, whether I set up SOGoLoginDomains or not I can
never connect via username@dom1 (or dom2). Am I missing something?

--
Jean

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

Reply via email to