In normal Zentyal configurations you have the "stub files" that do special configuration for Sogo (and other modules too).
/usr/share/Zentyal/stubs -> inside are directories with module names like "Openchange" and inside of those are the "stubs".
Stub files have almost the same name as regular files like sogo.conf, but end with .mas - so /usr/share/Zentyal/stubs/openchange/sogo.conf.mas actually rewrites /etc/default/sogo (pretty sure that's the right combination).
In the original stubs you see things set to <% domain %> or <% hostname %> instead of "example.lan" or "server01".
To modify these files you have to create the directory /etc/Zentyal/stubs, then you create the directory for the module you want to tweak - for example you'd run the following commands:
sudo mkdir /etc/Zentyal/stubs
sudo mkdir /etc/Zentyal/stubs/openchange
After you can copy your original stub file over and modify it as needed.
In your case you've installed Sogo as a package that is not related to Zentyal and it's likely that in one of the many, many files the read/write permissions are incorrect. You likely need to do some digging on Sogo configuration files and find ones owned by root - I think that several need to be owned by ebox.
You CANNOT just go and do a recursive ownership change without wrecking pretty much everything though.
So I'd suggest going into /usr/share/Zentyal/stubs and looking inside the openchange directory and possibly the samba directory too, I don't believe there's a Sogo directory in there anymore. Once you've nailed that down then just find all of the files that have something to do with Sogo, figure out where it's original is (i.e. /usr/share/Zentyal/stubs/openchange/sogo.mas would probably originally be in /etc/sogo/sogo or something to that effect), check permissions and ownership and set the owner to ebox and permissions to 0644. Once you've figured all of that out then restart openchange:
sudo service Zentyal openchange restart
and then try to use the webmail.
Good luck.