SOGo - How to force external login with email account?


(Gabriel GHEORGHIU) #1

Hi guys,

Does anybody know how to configure SOGo to force external login with the email account instead of the user account?

TIA,
Gabriel


Sogo does not get the good LDAP settings
(Artem Fedai) #2

Hi, only by making changes to config files:

 /* LDAP authentication example */
  //SOGoUserSources = (
  //  {
  //    type = ldap;
  //    CNFieldName = cn;
  //    UIDFieldName = uid;
  //    IDFieldName = uid; // first field of the DN for direct binds
  //    bindFields = (uid, mail); // array of fields to use for indirect binds
  //    baseDN = "ou=users,dc=acme,dc=com";
  //    bindDN = "uid=sogo,ou=users,dc=acme,dc=com";
  //    bindPassword = qwerty;
  //    canAuthenticate = YES;
  //    displayName = "Shared Addresses";
  //    hostname = ldap://127.0.0.1:389;
  //    id = public;
  //    isAddressBook = YES;
  //  }
  //);

(Gabriel GHEORGHIU) #3

Hi Nas,

There are two places where I found configuration files for SOGo.
I have tried to make a custom template for 05general_preferences, inserting this line:

$S{SOGoForceExternalLoginWithEmail} = ‘YES’;

after this line:

$S{SOGoMailingMechanism} = ‘smtp’;

without success.

More than likely I’m wrong. Where?

EDIT

I made a custom template in Zentyal with this and it’s working.


(Artem Fedai) #4

You need to edit this file 20user_source_ldap

and input mail instead of uid

now we authorize by the uid

Sorry, have no time to test it today.


(Gabriel GHEORGHIU) #5

Thank you!
I will try!

BR
Gabriel


(Artem Fedai) #6

@GG_jr

How is your going?

I came back from night shift :sleeping:


(Gabriel GHEORGHIU) #7

Hi Artem,

Unfortunately nothing.
This morning at 04:00 I start a business trip for 3 or 4 days and last night I slept early.
Maybe you have time to find the solution. Anyway, you know how to do this, better than me! :smiley:
TIA,

Gabriel GHEORGHIU


(Artem Fedai) #8

@GG_jr
Mini HOW-TO :

mkdir -p /etc/e-smith/templates-custom/sogo-config/

cp -p /etc/e-smith/templates/sogo-config/05general_preferences/etc/e-smith/templates-custom/sogo-config/05general_preferences

Edit
vi /etc/e-smith/templates-custom/sogo-config/05general_preferences add this line:

$S{SOGoForwardEnabled} = 'YES';
+    $S{SOGoForceExternalLoginWithEmail} = 'YES';

cp -p /etc/e-smith/templates/sogo-config/20user_source_ldap /etc/e-smith/templates-custom/sogo-config/20user_source_ldap

Edit this file :

vi /etc/e-smith/templates-custom/sogo-config/20user_source_ldap

        IDFieldName = mail;
        UIDFieldName = uid;
        bindFields = (mail);

Finally run:

signal-event nethserver-sogo-update

(Gabriel GHEORGHIU) #9

Hi Nas,

Thank you for your effort!
If I will be not so tired, I will try in this evening from the hotel.

Kind regards,

Gabriel GHEORGHIU


(Gabriel GHEORGHIU) #10

Hi Nas,

I followed your instructions and I made the changes.
Now, I can login in SOGo only with email account, but:

  1. The SOGo Webmail is loading very slow.
  2. After loading, I can’t see the folders and of course, the emails.
  3. I can write and send emails.
  4. No observable issues with Address Book and Calendar.

BR,
Gabriel


(Artem Fedai) #11

Please restart the httpd service.


(Gabriel GHEORGHIU) #12

I also rebooted the server.
The same thing.


(Artem Fedai) #13

Ok please delete

bindFields = (mail);

run

signal-event nethserver-sogo-update


(Gabriel GHEORGHIU) #14

Wrong username or password. (SOGo 2.3.0)


(Artem Fedai) #15

Some additional fields were required + version of SOGO was updated to 2.3.8.

Another issue is in Multidomain separation in Address Book.

http://sogo.nu/bugs/view.php?id=1001


(Gabriel GHEORGHIU) #16

Solved by @Nas; Thank you Nas!

Mini How-To:

  1. mkdir -p /etc/e-smith/templates-custom/sogo-config/

  2. cp -p /etc/e-smith/templates/sogo-config/05general_preferences /etc/e-smith/templates-custom/sogo-config/05general_preferences

  3. cp -p /etc/e-smith/templates/sogo-config/20user_source_ldap /etc/e-smith/templates-custom/sogo-config/20user_source_ldap

  4. Edit
    /etc/e-smith/templates-custom/sogo-config/05general_preferences
    and add this line (please see the attached pictures):

$S{SOGoForceExternalLoginWithEmail} = ‘YES’;

  1. Edit
    /etc/e-smith/templates-custom/sogo-config/20user_source_ldap
    and make the settings according to the attached pictures.

  2. signal-event nethserver-sogo-update
    (or restart the server).


Multiple, separate domains email server
Outlook CalDav Synchronizer
Community help for SOGo.conf
(Giacomo Sanchietti) #17

I like this thing, can we make it a prop inside the DB?
@alefattorini, @davidep what do you think?


Multiple, separate domains email server
(Alessio Fattorini) #18

Yes, I like it too! It’s on my book now.
Thanks @Nas and @GG_jr great work! :+1: :+1:


Multiple, separate domains email server
(Davide Principi) #19

3 posts were split to a new topic: Email server for multiple (different) domains


(Gabriel GHEORGHIU) #20

Hi Artem,

Unfortunately nothing.
This morning at 04:00 I start a business trip for 3 or 4 days and last night I slept early.
Maybe you have time to find the solution. Anyway, you know how to do this, better than me! :smiley:
TIA,

Gabriel GHEORGHIU