SOGo login only email address

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;

  •    IDFieldName = mail;
    
  •    UIDFieldName = uid;
    
  •    IMAPLoginFieldName = uid;
      canAuthenticate = YES;
      bindDN = "ldapservice@AD.DI*******.EU";
      bindPassword = "**********************";
      baseDN = "dc=ad,dc=di*******,dc=eu";
    
  •    bindFields = (mail);
    

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