Custom ldap mail field

Hello,

I open this as an issue but it can also be asked as a feature.

I have an ldap bind which gives me the email within the field mail as usual but in my case, we are using this field for legacy. We have now a new MyCustomMail field. Is it possible to use this field?

For example here is what I tried:

main:
  label: 'MyLabel'
  host: 'myhost.fqdn'
  port: 636
  uid: 'supannAliasLogin'
  email: 'MyCustomMail'
  method: 'ssl' # "tls" or "ssl" or "plain"
  bind_dn: 'cn=***,ou=***'
  password: 'MyPassword'
  active_directory: true
  allow_username_or_email_login: true
  block_auto_created_users: false
  base: 'dc=***'
  user_filter: ''
  ## EE only
  group_base: ''
  admin_group: ''
  sync_ssh_keys: false

When using ldapsearch here is what I get:

$ ldapsearch -x -LL -h myhost.fqdn -D cn=***,ou=*** -b dc=*** -w MyPassword supannAliasLogin=mylogin \*
version: 1

dn: uid=***
[...]
supannAliasLogin: mylogin
[...]
mail: mymail@myhost.fqdn
[...]
MyCustomMail: mymail@mynewhost.fqdn

I can login with the supannAliasLogin but would like also to be able to login with MyCustomMail.

Hope this is not already referenced. Cheers, Fabien