steve
(steve)
August 27, 2022, 3:36pm
1
Nethserver 7.9.2009 final
SOGo module
Hi,
I read this topic: SOGo - How to force external login with email account?
I would need to allow users to log in to SOGo only with an email address. However, this solution cannot be solved in the case of SOGo 5.6 running on Nethserver 7.9. I can’t find any templates to modify.
Can this be solved and how?
Thanks for your help
steve
(steve)
August 31, 2022, 8:48am
2
Sorry, but does anyone have an idea for a solution?
Thanks for your help
stephdl
(Stéphane de Labrusse)
August 31, 2022, 9:38am
3
sogo use ldap to autenticate and the ldap of NethServer accepts either user and user@domain.com .
Probably a blind shot but it could be a clue
steve
(steve)
August 31, 2022, 12:11pm
4
Thanks @stephdl ,
maybe no one has addressed this in the case of the new SOGo? Unfortunately, I couldn’t find an option for this in LDAP…
Although I trusted it… It seems that I have to give it up, although it would be easier for users to handle it…
Thanks and Regards
stephdl
(Stéphane de Labrusse)
August 31, 2022, 3:05pm
5
Would you like to explain what you tried to do, it should work
stephdl
(Stéphane de Labrusse)
August 31, 2022, 3:10pm
6
all files to modify are in /etc/e-smith/templates/etc/sogo/sogo.conf/
do a mkdir -p /etc/e-smith/templates-custom//etc/sogo/sogo.conf/
then cp a file to the new direction and modify it accordingly
steve
(steve)
August 31, 2022, 6:25pm
7
I created the directory /etc/e-smith/templates-custom/etc/sogo and copied the file /etc/sogo/sogo.conf.
mkdir /etc/e-smith/templates-custom/etc/sogo
cp /etc/sogo/sogo.conf /etc/e-smith/templates-custom/etc/sogo/
I then edited /etc/e-smith/templates-custom/etc/sogo/sogo.conf.
vi /etc/e-smith/templates-custom/etc/sogo/sogo.conf
I modified the following:
/* 45 AD authentication */
SOGoUserSources =(
{
id = AD_Users;
type = ldap;
CNFieldName = cn;
And I added the following line:
/* 50 Web Interface */
SOGoVacationEnabled = YES;
SOGoForwardEnabled = YES;
SOGoSieveScriptsEnabled = YES;
SOGoMailAuxiliaryUserAccountsEnabled = YES;
SOGoMailCustomFromEnabled = YES;
SOGoForceExternalLoginWithEmail = YES;
However, you can still log in with your username or email address…
Should anything else be changed?
Thanks and Regards
stephdl
(Stéphane de Labrusse)
August 31, 2022, 9:12pm
8
Did u expand the templates ?
signal-event nethserver-sogo-update
steve
(steve)
August 31, 2022, 9:28pm
9
Of course, I ran the
signal-event nethserver-sogo-update
command, in fact an update arrived for the Nethserver and I restarted the server after the update. Nothing changed.
stephdl
(Stéphane de Labrusse)
September 1, 2022, 5:31am
10
Could you post in a github gist the complet template file
/etc/sogo/sogo.conf
steve
(steve)
September 1, 2022, 9:23am
11
@stephdl
I am attaching my /etc/sogo/sogo.conf file:
{
/* **************** 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) */
SOGoProfileURL = "mysql://sogo:***********@localhost/sogo/sogo_user_profile";
OCSFolderInfoURL = "mysql://sogo:***********@localhost/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogo:*************@localhost/sogo/sogo_sessions_folder";
OCSEMailAlarmsFolderURL = "mysql://sogo:***************@localhost/sogo/sogo_alarms_folder";
/* 20 Mail */
SOGoDraftsFolderName = "Drafts";
SOGoSentFolderName = "Sent";
SOGoTrashFolderName = "Trash";
SOGoJunkFolderName = "Junk";
SOGoIMAPServer = "localhost";
SOGoSieveServer = "sieve://localhost:4190";
SOGoSMTPServer = "127.0.0.1:10587";
SOGoMailDomain = "**********.eu";
SOGoSMTPAuthenticationType = "PLAIN";
SOGoMailingMechanism = "smtp";
NGImap4ConnectionStringSeparator = "/";
/* 30 Notifications */
SOGoFoldersSendEMailNotifications = NO;
SOGoACLsSendEMailNotifications = NO;
SOGoAppointmentSendEMailNotifications = YES;
SOGoEnableEMailAlarms = YES;
/* 40 Authentication */
//SOGoPasswordChangeEnabled = YES;
/* 45 AD authentication */
SOGoUserSources =(
{
id = AD_Users;
type = ldap;
CNFieldName = cn;
IDFieldName = sAMAccountName;
UIDFieldName = sAMAccountName;
IMAPLoginFieldName = userPrincipalName;
canAuthenticate = YES;
bindDN = "ldapservice@AD.********.EU";
bindPassword = "*********";
baseDN = "dc=ad,dc=**********,dc=eu";
bindFields = (
sAMAccountName,
userPrincipalName
);
hostname = ldaps://nsdc-nethserver.ad.**********.eu;
filter = "(objectClass='user') AND (sAMAccountType=805306368)";
MailFieldNames = ("userPrincipalName");
scope = SUB;
displayName = "**********.eu users";
isAddressBook = YES;
},
{
id = AD_Groups;
type = ldap;
CNFieldName = name;
IDFieldName = sAMAccountName;
UIDFieldName = sAMAccountName;
canAuthenticate = YES;
bindDN = "ldapservice@AD.*******.EU";
bindPassword = "***********";
baseDN = "dc=ad,dc=*********,dc=eu";
hostname = ldaps://nsdc-nethserver.ad.*********.eu;
filter = "(objectClass='group') AND (sAMAccountType=268435456)";
MailFieldNames = ("mail");
scope = SUB;
displayName = "*********.eu groups";
isAddressBook = YES;
}
);
/* 50 Web Interface */
SOGoVacationEnabled = YES;
SOGoForwardEnabled = YES;
SOGoSieveScriptsEnabled = YES;
SOGoMailAuxiliaryUserAccountsEnabled = YES;
SOGoMailCustomFromEnabled = YES;
//SOGoFirstDayOfWeek = 1;
//SOGoMailReplyPlacement = "above";
//SOGoMailSignaturePlacement = "above";
/* 60 General */
SOGoTimeZone = Europe/Budapest;
SOGoSuperUsernames = (admin); // This is an array - keep the parens!
SOGoMemcachedHost = "127.0.0.1";
SxVMemLimit = 512;
SOGoEnablePublicAccess = YES;
/* From Nethesis GNUStep configuration
Undocumented in sogo instalation manual */
SOGoAppointmentSendEMailReceipts = YES;
/* 70 Active Sync options and tuning */
SOGoMaximumPingInterval = 3540;
SOGoMaximumSyncInterval = 3540;
SOGoInternalSyncInterval = 30;
SOGoMaximumSyncResponseSize = 2048;
SOGoMaximumSyncWindowSize = 100;
WOWatchDogRequestTimeout = 60;
WOWorkersCount = 10;
/* 75 enable cal- and carddav */
SOGoAddressBookDAVAccessEnabled = YES;
SOGoCalendarDAVAccessEnabled = YES;
/* 80 Debug */
//SOGoDebugRequests = YES;
//SoDebugBaseURL = YES;
//ImapDebugEnabled = YES;
//LDAPDebugEnabled = YES;
//PGDebugEnabled = YES;
//MySQL4DebugEnabled = YES;
//SOGoUIxDebugEnabled = YES;
//WODontZipResponse = YES;
//SOGoEASDebugEnabled = YES;
//WOLogFile = "/var/log/sogo/sogo.log";
}
Thank you for your help.
stephdl
(Stéphane de Labrusse)
September 1, 2022, 1:37pm
12
I cannot find SOGoForceExternalLoginWithEmail = YES;
in /etc/sogo/sogo.conf
for me it is normal that it doesn’t work, you missed something
what about
expand-template /etc/sogo/sogo.conf
and
grep -srni 'SOGoForceExternalLoginWithEmail' /etc/e-smith/template*
steve
(steve)
September 1, 2022, 2:53pm
13
There really is something wrong.
The outputs are:
grep -srni ‘SOGoForceExternalLoginWithEmail’ /etc/e-smith/template*
/etc/e-smith/templates-custom/etc/sogo/sogo.conf:93: SOGoForceExternalLoginWithEmail = YES;
expand-template /etc/sogo/sogo.conf
ERROR in /etc/e-smith/templates-custom//etc/sogo/sogo.conf: Program fragment delivered error <<Quantifier follows nothing in regex; marked by ← HERE in m/* ← HERE **************** 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:/ at /etc/e-smith/templates-custom//etc/sogo/sogo.conf line 7.>> at template line 1
ERROR: Template processing failed for //etc/sogo/sogo.conf: 1 fragment generated errors
at /sbin/e-smith/expand-template line 45.
Unfortunately, I don’t understand what this error message refers to…
stephdl
(Stéphane de Labrusse)
September 1, 2022, 4:11pm
14
you made a typo in your custom template
steve
(steve)
September 1, 2022, 4:15pm
15
What typo?
I copied sogo.conf again but did not modify it. I ran it
expand-template /etc/sogo/sogo.conf
command and I get the same error again…
stephdl
(Stéphane de Labrusse)
September 1, 2022, 4:18pm
17
display each new template and the path where they are
steve
(steve)
September 1, 2022, 4:26pm
18
Only the sogo template is new. The path is
/etc/e-smith/templates-custom/etc/sogo/sogo.conf
stephdl
(Stéphane de Labrusse)
September 1, 2022, 4:52pm
19
it is wrong
the template /etc/e-smith/templates/etc/sogo/sogo.conf/10example_template
must be copied to /etc/e-smith/templates-custom/etc/sogo/sogo.conf/10example_template
steve
(steve)
September 1, 2022, 4:59pm
20
This file does not exist.
ls /etc/e-smith/templates/etc/sogo/sogo.conf
10mysql 30notifications 45user_source 60general 75dav template-begin
20mail 40authentication 50webinterface 70activesync 80debug template-end