Roundcube Community Forum
Release Support => Requests => Topic started by: JMV on January 18, 2017, 11:38:09 AM
-
Hello,
I would like to customize automatically the email for new users because logins are different than the beginning of email address
for example Robert TRUMP account
Full Name: Robert TRUMP
Mail: robert.trump@mydomain.fr
Login: trump
My data are stored in my LDAP on a different server. Unfortunately, I can't change users login
What solution can I find to customize automatically first part of the email?
Thank you (excuse my poor English)
-
Have you tried the new_user_identity plugin that comes with Roundcube?
-
Yes, i tried without suces. The plugin seems not working on my config, when i log a user for the first time roundcube dosen't try to contact annuaire1 (confirmed by tcpdump on annuaire1)
But my public ldap directory works fine on roundcube.
Here a peace of my config
$config['plugins'] = array('acl', 'attachment_reminder', 'filesystem_attachments', 'help', 'jqueryui', 'managesieve', 'markasjunk', 'new_user_identity', 'newmail_notifier', 'password', 'subscriptions_option',);
// Activation logs LDAP
$config['ldap_debug'] = true;
// Definition LDAP
$config['ldap_public']['public'] = array(
'name' => 'Carnet adresse ENSASE',
'hosts' => array('annuaire1'),
'port' => 389,
'user_specific' => false,
'base_dn' => 'ou=Users,dc=st-etienne,dc=archi,dc=fr',
'search_fields' => array(
'mail',
'cn',
'DisplayName',
),
// 'name_field' => 'cn',
'name_field' => 'DisplayName',
'email_field' => 'mail',
'surname_field' => 'sn',
'firstname_field' => 'givenName',
'sort' => 'sn'
);
$config['new_user_identity_addressbook'] = 'cn';
$config['new_user_identity_match'] = 'uid';
$config['new_user_identity_onlogin'] = true;
Thank you
-
It looks like the value of $config['new_user_identity_addressbook'] is incorrect, if you ready the comment above the setting it says:
// The id of the address book to use to automatically set a
// user's full name in their new identity. (This should be an
// string, which refers to the $config['ldap_public'] array.)
So to match your ldap config it would need to be 'public'
-
Thank you very much, it works now.
Have a good day.