SOGo - How to force external login with email account?

Hi guys,

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

TIA,
Gabriel

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;
  //  }
  //);

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.

1 Like

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.

1 Like

Thank you!
I will try!

BR
Gabriel

@GG_jr

How is your going?

I came back from night shift :sleeping:

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

@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

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

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

Please restart the httpd service.

I also rebooted the server.
The same thing.

Ok please delete

bindFields = (mail);

run

signal-event nethserver-sogo-update

Wrong username or password. (SOGo 2.3.0)

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

1 Like

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

1 Like

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

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

1 Like

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

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