Community help for SOGo.conf

I suggest adapting the current template output from the GNUStep DB format to the sogo.conf format. They seem very similar and perhaps few steps are required:

  • Remove the nethserver-sogo-gnustepsetup action. It expands the sogo-config template and pipes its output into GNUStep DB, so we no longer need it. Take note of the events that require it.

  • Rename sogo-config template dir to /etc/e-smith/templates/etc/sogo/sogo.conf. Bind it to the same events of the above action.

  • Adapt 90expand_conf, begin-template, end-template fragments to the sogo.conf format

1 Like

Thax for the hintā€™s :grinning:

Iā€™v already got some results:

# ================= DO NOT MODIFY THIS FILE =================
# 
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at https://dev.nethesis.it/projects/nethserver/wiki/NethServer
# original work from http://www.contribs.org/development/
#
# Copyright (C) 2013 Nethesis S.r.l. 
# http://www.nethesis.it - support@nethesis.it
# 
{


  /* 10 Database configuration (mysql)  */
  // Here comes mysql

  /* 20 Mail */
    SOGoDraftsFolderName = Drafts;
    SOGoSentFolderName = Sent;
    SOGoTrashFolderName = Trash;
    SOGoJunkFolderName = Junk;
    SOGoIMAPServer = 'localhost';
    SOGoSieveServer = 'sieve://127.0.0.1:4190';
    SOGoSMTPServer = '127.0.0.1:587';
    SOGoMailDomain = havak.lan;
    SOGoMailingMechanism = 'smtp';
    NGImap4ConnectionStringSeparator = "/";

Working on this came to a new insight;

The DB entries of folders /Sent/Drafts/Trash should move from Sogo to dovecot DB record;
Sogo should not define those folder names, imap sever should.

This would open the way to force use unified of special folders by auto = subscribe those folders IF a value is given in the dovecot db record. They can be any value (language) you want, migration not taken in account.

Hi,
Made some progress and have an expanding template that works for me:

https://github.com/markVnl/nethserver-sogo/tree/v7-test/root/etc/e-smith/templates/etc/sogo/sogo.conf

havenā€™t changed the init script, the template has to be expanded manually:
expand-template /etc/sogo/sogo.conf
for testing you should (re)move /var/lib/sogo/GNUstep/Defaults/sogod.plist
(which can be restored with: signal-event nethserver-sogo-update)

For now its Ldap only, I have no AD to testā€¦

1 Like

@davidep can you take a look on this?

Congrats @mark_nl! it seems a very good template!

Question: why some fragments have this blank at the bottom?

https://github.com/markVnl/nethserver-sogo/blob/v7-test/root/etc/e-smith/templates/etc/sogo/sogo.conf/20mail#L14

Now you could try to run your own AD on NethServer :wink:

1 Like

They can be left out. It just a ā€œEOFā€; there is a linefeed at the end and i donā€™t like a empty line at the end.

Thinkerd with ADā€™s before, after lots a frustrations Iā€™d promise not to engage it again. Maybe iI.ll wil to get the sogo.conf complete.

Before iā€™ll try I try a Question:
Why are the GNUStep templateā€™s concstucted to expand both AD- usersources and LDAP-group-/usersources?
Or should there be a ā€œ if not $smb{ServerRole} = ā€˜ADSā€™ ; return nothing ā€œ in the LDAPgroup-/usersources?

IIRC they should be mutually-exclusive and - yes - the condition is ServerRole = ADS. We should take into account the fact that in NS v7 this part could change due to Samba4 integration. I suggest to not waste too much time on this!

OK, noted. rewriting your GNUStep template(s) iā€™d did the AD part too. Didnā€™t ā€œcommitā€ to it becaurce it isnā€™t tested; in theory it shuold work (but we heard that before :stuck_out_tongue:)

2 Likes

Very good @mark_nl! If you open a PR for ns v7 someone else will take care of testing it :wink:

@mark_nl you put a lot of effort into it, congrats! SOGo lovers are going to be very grateful! :love_letter:

Till now it wasnā€™t that hard. Last week had some time on a vacation (enjoying the snow and food in your lovely Dolomites) to read in to Neth-/SmeServer and perl. It still has to be proven feasible.

Stupid question, but where do you open a PR?

Reading the above ill opt to merge group_source_ldap and user_source_ldap into one template snippet and add a condition ā€œnot ADSā€ for expansion.

PR = GitHub Pull Request :wink: Here?

https://github.com/NethServer/nethserver-sogo/compare/v7...markVnl:v7-test

Look at the green button ā€œCreate pull requestā€ :thumbsup:

OK, will do in the evening after work

1 Like

I was there too. Itā€™s a pity, we could have met and drank grappa. :smile:

Uh, so you guys MUST upload some pics here

Thanks to @mark_nl we now have a new package for SOGo ready for testing!
Kudos to Mark! :smiley:

See: https://github.com/NethServer/dev/issues/5028

And next steps were omitted :

  1. email Auth
  2. Multi Domain config

A post was merged into an existing topic: How did you spend your recent holidays?

Sorry, concentrated on a 1:1 functionality with GNUStep setup;

Additional features/functionality can be added, although I canā€™t see how to implement real multi domain support if the underlying imap server and (ldap) authentication is focused on a single organization with mail domain aliases.

Wil test the package this weekend