Author Topic: Quick Howto: SOGo  (Read 50588 times)

snarf77

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #15 on: September 10, 2010, 04:06:15 pm »
Hi Björn,

sorry fo being idiot but when you install SOGo and edit your conf file the first time, which format is that xml or plain text ???

I will try next week to use your file (is it complete in this post or only an extract ?)

thanks again

snarf

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #16 on: September 22, 2010, 07:40:04 am »
Hi Snarf,

No problem!

I finally found the time to finish a clean lucid install now. So I was able to check. By default the GNUstep environment creates an xml file. But it is okay to paste the bracket-style  ({ template as posted here.

It works perfectly fine and you can edit the file with a text editor.  If you use the command line tool, ie., defaults write sogod ... for the first time, the file gets converted to xml (neat! I could not find anything documented when I quickly tried to find a tool for conversion).

Everything runs fine except the ACL features. They did not work out of the box in an hardy environment, but I thought a lucid setup should have all prerequisites. I'll check this issue. Maybe we can find something in the mailing list.

I would suggest to paste my template, adjust it and run defaults write sogod at least once.

Keep me updated!

So long,

Björn

smithkevinc

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #17 on: October 07, 2010, 04:54:23 pm »
I had little issue getting SOGo to work. I'm still debating whether to go Zarafa or SOGo. I'm very reluctant to put 50+ Gbits of email in a DB. SOGo builds on tried and true mail services, and don't forget the great Thunderbird integration. However, Zarafa is the supported solution, seemed pretty responsive in my limited tests, and I was able to get Thunderbird/Lightning to work with it using the IMAP and CalDAV backends. I may be having decision paralysis  :-\

So far we are only missing the folder sharing/ACL features of SOGo. I believe that has as much to do with Dovecot. I've started to look into it, but so far I haven't found much from SOGo about working with Dovecot 1.2 ( which does support folder sharing and ACL). Anyone come up with anything yet?

If Zentyal had gone Cyrus vs Dovecot, SOGo would have made one nice integrated product.

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #18 on: October 07, 2010, 06:30:39 pm »
Hi!

ACL works with some minor changes to dovecot.conf.mas:

In the protocol imap section:

% my @imapPlugins = qw(quota imap_quota autocreate);

change to

% my @imapPlugins = qw(quota imap_quota autocreate acl imap_acl);

and uncomment both in the acl section:

acl = vfile:/etc/dovecot/dovecot-acls:cache_secs=300

and

acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes

And

/etc/init.d/ebox mail restart

Maybe acls could be enabled out of the box?!


Björn

smithkevinc

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #19 on: October 07, 2010, 07:57:13 pm »
Nice thanks, I'll try it out. Just one question or thought. From what I've read I thought it was necessary to set add the shared namespace configuration info.

smithkevinc

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #20 on: October 08, 2010, 03:09:29 am »
Still attempting to get email folder sharing working. I think I'm closer. I tried the above modifications but they don't seem to work as expected. Below is a diff of my modifications of the dovecot.conf.mas thus far. The shared folder show up for users, the shared-mailboxes.db gets written to, but shared folders don't yet appear under the "Shared" folder just yet.

I think the shared-mailboxes.db is not correct, so I'm taking that on next. I think it as something to do with the user name. Contents is currently formated like this:

shared/shared-boxes/user/{user1}/{user2}@{domain}

Probably has to be more like shared/shared-boxes/user/{user1}/{user2} or shared/shared-boxes/user/{user1}@{domain}/{user2}@{domain}, but not the mix of them I'm seeing. I'll have to read the Dovecot docs to be sure.

Diff results:

/usr/share/ebox/stubs/mail$ diff dovecot.conf.mas dovecot.conf.mas.orig
268c268
< namespace private {
---
> #namespace private {
272c272
<    separator = /
---
>    #separator =
276c276
<    prefix =
---
>    #prefix =
284c284
<    inbox = yes
---
>    #inbox = no
300,301c300,301
<    subscriptions = yes
< }
---
>    #subscriptions = yes
> #}
304,305c304,305
< namespace shared {
<    separator = /
---
> #namespace shared {
>    #separator = /
309c309
<    prefix = Shared/%%u/
---
>    #prefix = shared/%%u/
315d314
<    location = maildir:<% $mailboxesDir %>/%%d/%%n:INDEX=<% $mailboxesDir %>/%d/%n/Shared/%%u
318c317
<    subscriptions = no
---
>    #subscriptions = no
322,323c321
<    list = yes
< }
---
> #}
607c605
< % my @imapPlugins = qw(quota imap_quota autocreate acl imap_acl);
---
> % my @imapPlugins = qw(quota imap_quota autocreate);
1261d1258
<   acl = vfile
1266d1262
<   acl_shared_dict = file:<% $mailboxesDir %>/%d/shared-mailboxes.db


smithkevinc

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #21 on: October 08, 2010, 07:44:32 pm »
For those interested. I have email folder sharing partially working. I was correct in that SOGo is writing the ACL information using {username}, but Dovecot wants to see {username@doman}. So far I don't have a fix. I tried changing IDFieldName = uid; UIDFieldName = uid; to IDFieldName = mail; UIDFieldName = mail;. I had an open session when I restarted SOGo and this worked until I tried to log in again. I'm assuming SOGo tried to authenticate with LDAP using {username@domain} and that fails. You would think the if SOGoForceIMAPLoginWithEmail YES is set then ACLs would do the same, but guess not. Any ideas??

smithkevinc

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #22 on: October 08, 2010, 08:03:27 pm »
For those interested. I have email folder sharing partially working. I was correct in that SOGo is writing the ACL information using {username}, but Dovecot wants to see {username@doman}. So far I don't have a fix. I tried changing IDFieldName = uid; UIDFieldName = uid; to IDFieldName = mail; UIDFieldName = mail;. I had an open session when I restarted SOGo and this worked until I tried to log in again. I'm assuming SOGo tried to authenticate with LDAP using {username@domain} and that fails. You would think the if SOGoForceIMAPLoginWithEmail YES is set then ACLs would do the same, but guess not. Any ideas??

This may have done the trick, but your SOGo users lose calendar info.
IDFieldName = mail; UIDFieldName = mail; bindFields = uid;

After some testing I'll post my conclusions.

Update: This works. I'll post my final configs in the near future.
« Last Edit: October 09, 2010, 12:03:25 am by smithkevinc »

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #23 on: October 11, 2010, 10:33:22 pm »

This may have done the trick, but your SOGo users lose calendar info.
IDFieldName = mail; UIDFieldName = mail; bindFields = uid;

Update: This works. I'll post my final configs in the near future.


Hi smithkevinc, yes I just tried your set-up. Works fine! Thanks for the hints. I just had to delete some existing ACL files which have been still in the wrong format. Re: the calendar issue, it should be possible to edit the ids in the database (in sogo_folder_info: c_path, c_path2) so they match again the uid. So long, Björn
« Last Edit: October 11, 2010, 10:37:56 pm by binary-two »

smithkevinc

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #24 on: October 12, 2010, 02:39:02 am »
Quote
Hi smithkevinc, yes I just tried your set-up. Works fine! Thanks for the hints. I just had to delete some existing ACL files which have been still in the wrong format. Re: the calendar issue, it should be possible to edit the ids in the database (in sogo_folder_info: c_path, c_path2) so they match again the uid. So long, Björn

Are you using Thunderbird also with your setup? I've got this (minor) issue:

I'm getting an annoying extra INBOX folder showing up under one shared folder in Thunderbird. It's only one folder and moves to the most recent folder shared and subscribed to. The default INBOX in the private namespace remains, but you can't subscribe to it and you can unsubscribe from the one appearing in the shared namespace. It's visible in Thunderbird, but not in the SOGo web interface.

It doesn't cause any mail errors, but it's annoying and the visible INBOX folder is not accessible so if you click on it you get an error. Plus the .INBOX actually gets created in the file system.

I'm guessing at this point it's a Thunderbird issue, but I'm not certain.

Are you seeing the same thing?

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #25 on: October 12, 2010, 09:29:31 am »

I'm getting an annoying extra INBOX folder showing up under one shared folder in Thunderbird
Are you seeing the same thing?


Yep,  same for Evolution and Roundcube. Only SOGo seems to be hiding this properly. Therefore I think there might be a glitch in our dovecot set-up.  I could not figure out yet what exactly.

Björn
« Last Edit: October 12, 2010, 09:44:03 am by binary-two »

FutureTechSys

  • Zen Warrior
  • ***
  • Posts: 163
  • Karma: +0/-0
    • View Profile
    • Future Tech Systems, LLC
Re: Quick Howto: SOGo
« Reply #26 on: October 13, 2010, 02:49:06 am »
Anybody got this running on 2.0+?

I've now broken Zarafa and anything relating to apache with this procedure :)
Future Tech Systems, LLC
http://www.FutureTechSys.com

See our Zazen servers running Zentyal!
http://www.futuretechsys.com/small-biz/

SpiderOak online backup - 2GB Free!
https://spideroak.com/download/promo/fts

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #27 on: October 13, 2010, 03:47:20 pm »
Anybody got this running on 2.0+?

Yes! That is what we are talking about. Should be no problem, actually.

I've now broken Zarafa and anything relating to apache with this procedure :)

Looking in my crystal ball I assume your apache does not start up.

Please be a bit more specific ;-). What is the output of /etc/init.d/apache2 restart? What do your apache logs say? Did you enable the modules needed (i.e., proxy)?

Björn

FutureTechSys

  • Zen Warrior
  • ***
  • Posts: 163
  • Karma: +0/-0
    • View Profile
    • Future Tech Systems, LLC
Re: Quick Howto: SOGo
« Reply #28 on: October 13, 2010, 04:33:04 pm »
From apache error.log

[Tue Oct 12 21:56:52 2010] [warn] proxy: No protocol handler was valid for the URL /SOGo. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

apache restart:

* Restarting web server apache2                                                                                                                           (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                                                                                                                    [fail]

I also have no idea if email is being received since I have no way to login and look :)

I did in fact enable proxy and proxy http and one other one to do with proxy (forgot which)

I spent hours googling yesterday... Fixed some problems, others came up


PS, I can still access /webaccess from Zarafa, and send and receive email.  Also, I get a 500 HTTP error "Internal Error" when trying to access /SOGo
« Last Edit: October 13, 2010, 04:36:46 pm by FutureTechSys »
Future Tech Systems, LLC
http://www.FutureTechSys.com

See our Zazen servers running Zentyal!
http://www.futuretechsys.com/small-biz/

SpiderOak online backup - 2GB Free!
https://spideroak.com/download/promo/fts

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Quick Howto: SOGo
« Reply #29 on: October 13, 2010, 05:53:18 pm »
1.) protocol handler: sth. is wrong with your apache config, most likely the proxy module setup (really!). 

Please try 'a2enmod proxy_http' again.

2.) no listening sockets: another application or an old apache instance, maybe another apache vhost (but that could cause another error message, I am not sure) is listening on port 80

'fuser -uv 80/tcp' should show you more about what is happening on port 80.

If Zarafa still works, something is messed up with your vhosts, possibly.

3.) Internal Error: cf. 1.) apache does not proxy successfully to sogod, so apache raises this error.

Björn