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
# ================= 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 = "/";
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.
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)
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 )
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.
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.