new users with upper case letters "NameLastname@domain" not added in the LDAP group

Problem statement: When creating new mail user in top-level server, using the upper-case symbols in the 'user' part of the 'user'@'domain' (e.g. "Michael@example.com"), the new user does not appear in a LDAP group (e.g. "Mail") as memberUid.

Expected: New user name appears in the LDAP group.

Configuration Note: In Virtualmin Configuration -> Force mailbox usernames to lower case? ->"No";

Creating new users using lower case names works as expected, the LDAP Groups gets the correct record as new memberUid. This shows that the configuration check is passed: Default template is configured for secondary group in "Mail for domain"'

Workaround: in "LDAP Users and Groups" manually add the users in the group "Mail", then the use case (sa described below) works OK.

System: Operating system Debian Linux 9 (SW packages updated from stretch as up to 2017.10.25)

Webmin version 1.860 Virtualmin version 6.01 Theme version Authentic Theme 18.49-9 Kernel and CPU Linux 4.9.0-4-amd64 on x86_64

Dovecot+LDAP for user and groups storage. LDAP pre-configured, and established admin and mail users and groups. LDAP has the group "Mail" with ID 8. Default virtualmin template is configured to assign new mail users ("Mail for domain"->"Secondary group for mail users"->"Unix group" is checked) to the secondary group "Mail" (in opposite to Unix group "mail");

Detected in the scenario: when trying to enable the mailbox access rights for new mail users with case-sensitive names. Ad hoc, the directory /var/mail GID is 8 (mail). When new user is not in the group "mail" (GID 8), the mailbox is not created, with the error message in the log file: " dovecot: imap(Name.Lastname@domain.com): Error: open(/var/mail/Name.Lastname@domain.com) failed: Permission denied (euid=1002(Name.Lastname@domain.com) egid=1006(domain.com) missing +w perm: /var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775) dovecot: imap(Name.Lastname@domain.com): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. " To enable the mailbox access, it is suggested to assign the new users to LDAP group, with the same ID '8' as "mail" unix group.

Status: 
Active

Comments

Title: mail users with upper case letters, like "NameLastname@domain" are not added in the LDAP group, while correspondent secondary group is configured in default "Mail for domain" template, and in webmin->"Users and Groups" » users with upper case letters "NameLastname@domain" not added in the LDAP group
Body: View changes
Title: users with upper case letters "NameLastname@domain" not added in the LDAP group » new users with upper case letters "NameLastname@domain" not added in the LDAP group