So I think I have it figured out. First, remove the existing SOGoUserSources and duplicate it withing the domains = { ... statement for each domain like this:
domains = {
domain.com = {
SOGoMailDomain = domain.com;
SOGoDraftsFolderName = Drafts;
SOGoUserSources = (
{
// Used for user authentication
type = ldap;
id = <domain>_users;
canAuthenticate = YES;
isAddressBook = NO;
displayName = "LDAP Authentication";
hostname = "ldap://127.0.0.1:389";
baseDN = "o=domains,dc=domain,dc=com";
bindDN = "cn=vmail,dc=domain,dc=com";
bindPassword = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
filter = "objectClass=mailUser AND accountStatus=active AND enabledService=mail AND enabledService=sogo";
scope = SUB;
// The algorithm used for password encryption when changing
// passwords without Password Policies enabled.
// Possible values are: plain, crypt, md5-crypt, ssha, ssha512.
userPasswordAlgorithm = ssha512;
CNFieldName = cn;
IDFieldName = mail;
bindFields = (mail);
// value of UIDFieldName must be unique on entire server
UIDFieldName = mail;
IMAPLoginFieldName = mail;
},
{
type = ldap;
CNFieldName = cn;
bindFields = (mail);
IDFieldName = mail;
UIDFieldName = mail;
IMAPLoginFieldName = mail;
id = <domain>;
isAddressBook = YES;
listRequiresDot = NO;
canAuthenticate = YES;
bindAsCurrentUser = YES;
displayName = "Global Address Book";
hostname = "ldap://127.0.0.1:389";
baseDN = "o=domains,dc=domain,dc=com";
bindDN = "cn=vmail,dc=domain,dc=com";
bindPassword = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
filter = "((enabledService=mail AND accountStatus=active AND enabledService=displayedInGlobalAddressBook) AND ((objectClass=mailUser AND enabledService=sogo) OR (objectClass=mailList) OR (objectClass=mailAlias)))";
SearchFieldNames = (cn, sn, displayName, telephoneNumber, mail, shadowAddress, departmentNumber);
scope = SUB;
}
);
};
domain2.com = {
SOGoMailDomain = domain2.com;
SOGoDraftsFolderName = Drafts;
SOGoUserSources = (
... etc ...
}
);
};
};
These are preliminary results with just two domains. Both are separated and setting permissions for "All Authenticated Users" no longer allows access across domains. Seems to be working fine.