Thank you very much for your answer.
I modified my settings but it still doesn't work.
All requests go on the first declared domain{} element, with the wrong
SOGoIMAPServer, even if the user is only existing in the second domain{}
usersource.
Any idea ?
On 20/01/2017 06:39, To Ja ([email protected]) wrote:
SOGoUserSources = { ... }; must be set separetly for each of your
domains, like:
{
SOGoProfileURL = "mysql://[email protected]:3306/sogo/sogo_user_profile
<http://127.0.0.1:3306/sogo/sogo_user_profile>";
OCSFolderInfoURL = "mysql://[email protected]:3306/sogo/sogo_folder_info
<http://127.0.0.1:3306/sogo/sogo_folder_info>";
OCSSessionsFolderURL =
"mysql://[email protected]:3306/sogo/sogo_sessions_folder
<http://127.0.0.1:3306/sogo/sogo_sessions_folder>";
OCSEMailAlarmsFolderURL =
"mysql://[email protected]:3306/sogo/sogo_alarms_folder
<http://127.0.0.1:3306/sogo/sogo_alarms_folder>";
domains = {
domain1.pl <http://domain1.pl> = {
SOGoMailingMechanism = smtp;
SOGoSMTPServer = 127.0.0.1;
SOGoMailDomain = domain1.pl <http://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
<http://127.0.0.1:3306/sogo/sogo_users>";
canAuthenticate = YES;
isAddressBook = YES;
userPasswordAlgorithm = md5;
IMAPLoginFieldName = mail;
DomainFieldName = domain;
displayName = "Global book for domain1";
}
);
};
domain2.pl <http://domain2.pl> = {
SOGoMailingMechanism = smtp;
SOGoSMTPServer = 127.0.0.1;
SOGoMailDomain = domain2.pl <http://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
<http://127.0.0.1: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]
<mailto:[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
<http://127.0.0.1:3306/sogo/sogo_user_profile>";
OCSFolderInfoURL =
"mysql://sogo:***@127.0.0.1:3306/sogo/sogo_folder_info
<http://127.0.0.1:3306/sogo/sogo_folder_info>";
OCSSessionsFolderURL =
"mysql://sogo:***@127.0.0.1:3306/sogo/sogo_sessions_folder
<http://127.0.0.1:3306/sogo/sogo_sessions_folder>";
SOGoUserSources = { ... };
[...]
domains = {
firstdomain.fr <http://firstdomain.fr> = {
SOGoMailDomain = "firstdomain.fr <http://firstdomain.fr>";
SOGoIMAPServer = "mail1.hosting.com
<http://mail1.hosting.com>";
SOGoSMTPServer = "mail1.hosting.com
<http://mail1.hosting.com>";
};
otherdomain.com <http://otherdomain.com> = {
SOGoMailDomain = "otherdomain.com
<http://otherdomain.com>";
SOGoIMAPServer = "mail2.hosting.com
<http://mail2.hosting.com>";
SOGoSMTPServer = "mail2.hosting.com
<http://mail2.hosting.com>";
};
};
}
--
[email protected] <mailto:[email protected]>
https://inverse.ca/sogo/lists
--
[email protected]
https://inverse.ca/sogo/lists
--
[email protected]
https://inverse.ca/sogo/lists