Hi,
I'm trying to configure the multidomain feature in sogo. My question is, how
does SOGO decide which domain it is going to use? SOGO always takes the first
domain configuration.
My apache server configuration looks like this:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin ad...@localhost
ServerName mail.domain.a
ErrorLog /var/log/apache2/mail.domain.a_error.log
CustomLog /var/log/apache2/mail.domain.a_access.log combined
Alias /SOGo.woa/WebServerResources/ \
/usr/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ \
/usr/lib/GNUstep/SOGo/WebServerResources/
AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) \
/usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2
<Directory /usr/lib/GNUstep/SOGo/>
AllowOverride None
Order deny,allow
Allow from all
</Directory>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*jpg">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*png">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*gif">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*css">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*js">
SetHandler default-handler
</LocationMatch>
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPassInterpolateEnv On
ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
<Proxy http://127.0.0.1:20000/SOGo>
## adjust the following to your configuration
RequestHeader set "x-webobjects-server-port" "8443"
RequestHeader set "x-webobjects-server-name" "mail.domain.a"
RequestHeader set "x-webobjects-server-url"
"https://mail.domain.a:8443"
## When using proxy-side autentication, you need to uncomment
and
## adjust the following line:
# RequestHeader set "x-webobjects-remote-user"
"%{REMOTE_USER}e"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
AddDefaultCharset UTF-8
Order allow,deny
Allow from all
</Proxy>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin ad...@localhost
ServerName mail.domain.b
ErrorLog /var/log/apache2/mail.domain.b_error.log
CustomLog /var/log/apache2/mail.domain.b_access.log combined
Alias /SOGo.woa/WebServerResources/ \
/usr/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ \
/usr/lib/GNUstep/SOGo/WebServerResources/
AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) \
/usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2
<Directory /usr/lib/GNUstep/SOGo/>
AllowOverride None
Order deny,allow
Allow from all
</Directory>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*jpg">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*png">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*gif">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*css">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*js">
SetHandler default-handler
</LocationMatch>
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPassInterpolateEnv On
ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
<Proxy http://127.0.0.1:20000/SOGo>
## adjust the following to your configuration
RequestHeader set "x-webobjects-server-port" "8443"
RequestHeader set "x-webobjects-server-name" "mail.domain.b"
RequestHeader set "x-webobjects-server-url"
"https://mail.domain.b:8443"
## When using proxy-side autentication, you need to uncomment
and
## adjust the following line:
# RequestHeader set "x-webobjects-remote-user"
"%{REMOTE_USER}e"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
AddDefaultCharset UTF-8
Order allow,deny
Allow from all
</Proxy>
</VirtualHost>
My sogo configuration looks like the following:
{
NSGlobalDomain = {
};
sogod = {
OCSFolderInfoURL =
"mysql://user:p...@localhost:3306/sogo/sogo_folder_info";
SOGoACLsSendEmailNotifications = YES;
SOGoAppointmentSendEmailNotifications = YES;
SOGoDraftsFolderName = Drafts;
SOGoFoldersSendEmailNotifications = YES;
SOGoIMAPServer = localhost;
SOGoLanguage = English;
SOGoMailingMechanism = smtp;
SOGoProfileURL =
"mysql://user:p...@localhost:3306/sogo/sogo_user_profile";
SOGoSMTPServer = localhost;
SOGoSentFolderName = Sent;
SOGoTimeZone = Europe/Vienna;
SOGoTrashFolderName = Trash;
domains = {
domain.a = {
SOGoMailDomain = domain.a;
SOGoUserSources = (
{
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN =
"ou=Users,domainName=domain.a,o=domains,dc=domain,dc=a";
bindDN = "cn=vmailadmin,dc=domain,dc=a";
bindFields = uid;
bindPassword = password;
canAuthenticate = YES;
displayName = "Openldap access";
hostname = localhost;
id = directory;
isAddressBook = YES;
port = 389;
}
);
};
domain.b = {
SOGoMailDomain = domain.b;
SOGoUserSources = (
{
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN =
"ou=Users,domainName=domain.b,o=domains,dc=domain,dc=a";
bindDN = "cn=vmailadmin,dc=domain,dc=a";
bindFields = uid;
bindPassword = password;
canAuthenticate = YES;
displayName = "Openldap access";
hostname = localhost;
id = directory;
isAddressBook = YES;
port = 389;
}
);
};
domain.c = {
SOGoMailDomain = domain.c;
SOGoUserSources = (
{
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN =
"ou=Users,domainName=domain.c,o=domains,dc=domain,dc=a";
bindDN = "cn=vmailadmin,dc=domain,dc=a";
bindFields = uid;
bindPassword = password;
canAuthenticate = YES;
displayName = "Openldap access";
hostname = localhost;
id = directory;
isAddressBook = YES;
port = 389;
}
);
}
};
};
}
Thanks for your help!--
[email protected]
https://inverse.ca/sogo/lists