SOGoUserSources = { ... }; must be set separetly for each of your domains,
like:
{
SOGoProfileURL = "mysql://[email protected]:3306/sogo/sogo_user_profile";
OCSFolderInfoURL = "mysql://[email protected]:3306/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://[email protected]:3306/sogo/sogo_sessions_folder
";
OCSEMailAlarmsFolderURL = "mysql://...@
127.0.0.1:3306/sogo/sogo_alarms_folder";
domains = {
domain1.pl = {
SOGoMailingMechanism = smtp;
SOGoSMTPServer = 127.0.0.1;
SOGoMailDomain = domain1.pl;
SOGoTimeZone = Europe/Warsaw;
SOGoSentFolderName = Sent;
SOGoTrashFolderName = Trash;
SOGoDraftsFolderName = Drafts;
SOGoIMAPServer = localhost;
SOGoSieveServer = "sieve://localhost:4190";
SOGoIMAPAclConformsToIMAPExt = YES;
SOGoFirstDayOfWeek = 0;
SOGoMailAuxiliaryUserAccountsEnabled = NO;
SOGoUserSources =
(
{
type = sql;
id = directory1;
viewURL = "mysql://[email protected]:3306/sogo/sogo_users";
canAuthenticate = YES;
isAddressBook = YES;
userPasswordAlgorithm = md5;
IMAPLoginFieldName = mail;
DomainFieldName = domain;
displayName = "Global book for domain1";
}
);
};
domain2.pl = {
SOGoMailingMechanism = smtp;
SOGoSMTPServer = 127.0.0.1;
SOGoMailDomain = domain2.pl;
SOGoTimeZone = Europe/Warsaw;
SOGoSentFolderName = Sent;
SOGoTrashFolderName = Trash;
SOGoDraftsFolderName = Drafts;
SOGoIMAPServer = localhost;
SOGoSieveServer = "sieve://localhost:4190";
SOGoIMAPAclConformsToIMAPExt = YES;
SOGoFirstDayOfWeek = 0;
SOGoMailAuxiliaryUserAccountsEnabled = NO;
SOGoUserSources =
(
{
type = sql;
id = directory2;
viewURL = "mysql://[email protected]:3306/sogo/sogo_users";
canAuthenticate = YES;
isAddressBook = YES;
userPasswordAlgorithm = md5;
IMAPLoginFieldName = mail;
DomainFieldName = domain;
displayName = "Global book for domain2";
}
);
};
};
}
Two more constrains:
- user ID's (c_uid field in sogo_users view) must be in form [email protected]
(you need unique ID's)
- DomainFieldName = domain indicates that you have domain field in sogo_users
view, containing domain for each of your user ID's
Above setup works fine for me in terms of separating two domains on one
SOGo server. You just need to adjust IMAP server settings as per your
requirements.
On Fri, Jan 20, 2017 at 12:14 AM, Olivier LIGNY <[email protected]> wrote:
> Hello,
>
> I try to configure SOGo in multi-domain mode with multiple IMAP/SMTP
> servers, but I can't make it work.
> Here is my sogo.conf file.
> I also tried to copy the SOGoUserSources block inside each domain block,
> and removed the main one, but no change.
> Thanks in advance for any help !
>
>
> {
>
> SOGoProfileURL = "mysql://sogo:***@127.0.0.1:3306/sogo/sogo_user_profile";
> OCSFolderInfoURL = "mysql://sogo:***@127.0.0.1:3306/sogo/sogo_folder_info
> ";
> OCSSessionsFolderURL = "mysql://sogo:***@127.0.0.1:33
> 06/sogo/sogo_sessions_folder";
> SOGoUserSources = { ... };
>
> [...]
>
> domains = {
> firstdomain.fr = {
> SOGoMailDomain = "firstdomain.fr";
> SOGoIMAPServer = "mail1.hosting.com";
> SOGoSMTPServer = "mail1.hosting.com";
> };
> otherdomain.com = {
> SOGoMailDomain = "otherdomain.com";
> SOGoIMAPServer = "mail2.hosting.com";
> SOGoSMTPServer = "mail2.hosting.com";
> };
> };
>
> }
> --
> [email protected]
> https://inverse.ca/sogo/lists
>
--
[email protected]
https://inverse.ca/sogo/lists