Community help for SOGo.conf


(Mark Verlinde) #1

A lot of SOGo users would like to move from the GNUstep to /ect/sogo.conf configuration (like me) also sogo-tools seems to rely on sogo.conf.

De dev team probably does this in no-time, but they are busy with more imported stuff.
Moreover it isn’t just making it, testing it takes a great deal of time!
I am a novice in nethserver/sme/centos and even perl, but with some help we should pull it off!

Who’s going to help me?

First steps on a testing/dev machine would be:

mkdir /etc/e-smith/events/nethserver-sogo-update/templates2expand/etc/sogo
touch /etc/e-smith/events/nethserver-sogo-update/templates2expand/etc/sogo/sogo.conf
mkdir /etc/e-smith/templates/etc/sogo/
mv /etc/sogo/sogo.conf /etc/e-smith/templates/etc/sogo/sogo.conf
signal-event nethserver-sogo-update

@Nas Right?

(Artem Fedai) #2

Yes sir :wink: but you need to edit init script also

(Stéphane de Labrusse) #3

You must recreate links in the event nethserver-sogo-update ( probably nethserver-sogo-save if it exists) to point to the correct templates

But in fact all modification, should/will be done also at the rpm level

(Mark Verlinde) #4

Yes off course, just suggesting an head on approach;
first design a good expanding template; test this an then commit and /or build RMP.
I know how to build dpkg’s, i’ll guess (in time) rpm too :grinning:

(Davide Principi) #5

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

(Mark Verlinde) #6

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
# original work from
# Copyright (C) 2013 Nethesis S.r.l. 
# -

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

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

(Mark Verlinde) #7

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.

Introducing new members on community - 16 Feb 16
(Mark Verlinde) #8

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

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…

(Giacomo Sanchietti) #9

@davidep can you take a look on this?

(Davide Principi) #10

Congrats @mark_nl! it seems a very good template!

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

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

(Mark Verlinde) #11

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?

(Davide Principi) #12

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!

(Mark Verlinde) #13

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:)

(Davide Principi) #14

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

(Alessio Fattorini) #15

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

(Mark Verlinde) #16

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.

(Davide Principi) #17

PR = GitHub Pull Request :wink: Here?

Look at the green button “Create pull request” :thumbsup:

(Mark Verlinde) #18

OK, will do in the evening after work

(Filippo Carletti) #19

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

(Alessio Fattorini) #20

Uh, so you guys MUST upload some pics here

How did you spend your recent holidays?