Author Topic: SOGo + Openchange on a Zentyal server  (Read 8927 times)

mphilippi

  • Guest
SOGo + Openchange on a Zentyal server
« on: December 18, 2012, 01:21:06 pm »
Hi!

I'm trying to install SOGo + Openchange on my newly installed Test VM to see if it works with Zentyal.
SOGo works perfectly with the Zentyal provided modules but I can't get Openchange (which simulates the Exchange server to Outlook clients) to work properly with Samba 4. Autodiscover in Outlook works and it recognizes the Server as its Exchange host and the configuration finishes but Outlook crashes when I load it up.

Has anyone tried to install Openchange on a Zentyal system or has experience with Openchange in general?

For those who want to make just SOGo work with Zentyal 3.0, here is an installation guide:

Add the SOGo repository to /etc/apt/sources.list:
Code: [Select]
echo -e "\n# SOGo repository\ndeb http://inverse.ca/ubuntu precise precise\n" >> /etc/apt/sources.list
Authenticate the repository:
Code: [Select]
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x810273C4
Then refresh your package list:
Code: [Select]
apt-get update
And install SOGo:
Code: [Select]
apt-get install sogo memcached rpl
Create a MySQL-database for SOGo (MySQL root password can be found in /var/lib/zentyal/conf/zentyal-mysql.passwd):
Code: [Select]
mysql -u root -p

mysql> CREATE DATABASE `sogo`;
mysql> CREATE USER 'sogo'@'localhost' IDENTIFIED BY 'SOGO_PASSWORD';
mysql> GRANT ALL PRIVILEGES ON `sogo`.* TO 'sogo'@'localhost' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> exit

Next, I would recommend going into the Zentyal-webinterface changing its port to e.g. 81 (remember to add an :81 to the URL after you saved the changes ;)). Then go to the Webserver configuration module and enable HTTPS and save the changes.

Then open /etc/apache2/conf.d/SOGo.conf in an editor and change the following lines according to your configuration:
Code: [Select]
## adjust the following to your configuration
  RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-name" "yourhostname"
  RequestHeader set "x-webobjects-server-url" "https://yourhostname"

Enable the needed Apache modules:
Code: [Select]
a2enmod proxy proxy_http headers rewrite
Change to user "sogo":
Code: [Select]
su sogo
and create a new file named sogo.script
Code: [Select]
nano /home/sogo/sogo.script
Code: [Select]
defaults write sogod SOGoTimeZone "Europe/Berlin"
defaults write sogod SOGoMailDomain "DOMAIN.local"
defaults write sogod SOGoLanguage "German"
defaults write sogod SOGoAppointmentSendEMailNotifications YES
defaults write sogod SOGoFoldersSendEMailNotifications YES
defaults write sogod SOGoACLsSendEMailNotifications YES
defaults write sogod SOGoCalendarDefaultRoles '("PublicViewer","ConfidentialDAndTViewer")'
defaults write sogod SOGoSieveServer "sieve://localhost:4190"
defaults write sogod SOGoVacationEnabled YES
defaults write sogod SOGoMailMessageCheck every_minute
defaults write sogod SOGoFirstDayOfWeek 1
defaults write sogod SOGoFoldersSendEMailNotifications = YES;
defaults write sogod SOGoForwardEnabled = YES;
defaults write sogod SOGoDraftsFolderName Drafts
defaults write sogod SOGoSharedFolderName "Shared Folders"
defaults write sogod SOGoTrashFolderName Trash
defaults write sogod SOGoSentFolderName Sent
defaults write sogod SOGoOtherUsersFolderName "Other Users"

defaults write sogod SOGoSuperUsernames '(ADMINUSER)'

defaults write sogod SOGoUserSources '({CNFieldName=cn; IDFieldName=uid; UIDFieldName=uid; IMAPHostFieldName=; baseDN="ou=Users,dc=DOMAIN,dc=local"; bindDN="uid=Administrator,ou=Users,dc=DOMAIN,dc=local"; bindPassword="ADMINPASSWORD"; canAuthenticate=YES; displayName="Shared Addresses"; hostname="localhost"; id=public; isAddressBook=YES; port=390;})'

defaults write sogod SOGoMailingMechanism sendmail
defaults write sogod SOGoSMTPServer "smtp://localhost:25"
defaults write sogod SOGoIMAPServer "imap://localhost:143/?tls=YES"
defaults write sogod SOGoForceIMAPLoginWithEmail YES
defaults write sogod SOGoIMAPAclConformsToIMAPExt YES
defaults write sogod SOGoMailAuxiliaryUserAccountsEnabled YES
defaults write sogod SOGoMemcachedHost "localhost"
defaults write sogod SOGoEnableEMailAlarms YES
defaults write sogod OCSFolderInfoURL "mysql://sogo:SOGO_PASSWORD@localhost:3306/sogo/sogo_folder_info"
defaults write sogod SOGoProfileURL "mysql://sogo:SOGO_PASSWORD@localhost:3306/sogo/sogo_user_profile"
defaults write sogod OCSEMailAlarmsFolderURL "mysql://sogo:SOGO_PASSWORD@localhost:3306/sogo/sogo_alarms_folder"
defaults write sogod OCSSessionsFolderURL "mysql://sogo:SOGO_PASSWORD@localhost:3306/sogo/sogo_sessions_folder"

Then make it executable:
Code: [Select]
chmod +x /home/sogo/sogo.script
And execute it:
Code: [Select]
/home/sogo/sogo.script
Logout as sogo:
Code: [Select]
exit
If you want, you can enable the SOGo cronjobs by commenting out a few lines in /etc/cron.d/sogo

Finally, start/restart all the services:
Code: [Select]
service apache2 restart
Code: [Select]
service sogo restart
Then try to open the SOGo webinterface by entering the SOGo url into your browser:
https://zentyal.DOMAIN.local/SOGo/

--- NOW THE OPENCHANGE INSTALLATION ---

Install the openchange components:
Code: [Select]
apt-get install openchangeserver sogo-openchange openchangeproxy openchange-ocsmanager openchange-rpcproxy
Open /usr/share/zentyal/stubs/samba/smb.conf.mas and add those lines in the [global] section (directly under "server signing = auto"):
Code: [Select]
### Configuration required by OpenChange server ###
dcerpc endpoint servers = epmapper, mapiproxy
dcerpc_mapiproxy:server = true
dcerpc_mapiproxy:interfaces = exchange_emsmdb, exchange_nsp, exchange_ds_rfr
### Configuration required by OpenChange server ###

Change something in the Samba module in the webinterface, change it to the previous setting and save it to rewrite the Samba config files.

Add a symlink to the SOGo configuration under /root which then can be read by Samba:
Code: [Select]
ln -s ~sogo/GNUstep /root/
Provision Openchange:
Code: [Select]
openchange_provision
And the database:
Code: [Select]
openchange_provision --openchangedb
Enable required Apache mods:
Code: [Select]
a2enmod proxy proxy_http wsgi
Restart Samba:
Code: [Select]
service samba4 restart
Restart Openchange:
Code: [Select]
service openchange-ocsmanager restart
Restart Apache:
Code: [Select]
service apache2 restart
Go to the DNS section of the webinterface and add "autodiscover.DOMAIN.local" to the list (add an alias for your zentyal server called "autodiscover").

Add new users (user has to be added to the User list of Samba first):
Code: [Select]
openchange_newuser --create TESTUSER
Then try to add it to Outlook. For me, adding works without any problems. But as soon as I start Outlook, it crashes and tells me that it could not be startet because a foldergroup cannot be opened.

Any idea guys?

Thanks in advance!

Cheers
Marc

christian

  • Guest
Re: SOGo + Openchange on a Zentyal server
« Reply #1 on: December 18, 2012, 01:51:10 pm »
Based on what you describe, it looks like Openchange related issue isn't it? (Saying this, I suppose you did check that you are not facing Samna related issue  :D)
Then you should perhaps post in Openchange forum  (if not already done).

mphilippi

  • Guest
Re: SOGo + Openchange on a Zentyal server
« Reply #2 on: December 18, 2012, 02:20:26 pm »
Hi Christian!

I think that it has something to to with the way how Samba is implemented in Zentyal.
Unfortunately, I have no experience with Samba 4 yet.