1

Topic: Bulk mail creation succeeded, but users not visble

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version:  Rocky Linux 8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi, I tried creating bulk users using the create_mail_user_OpenLDAP.py script . Executed the slapadd command as mentioned below, without the braces and replacing the mydomain with the correct domain name.

sudo ldapadd -x -D cn=Manager,dc=<mydomain>,dc=<com> -W -f <path to my_users.csv.ldif>

Enter LDAP Password:
adding new entry "mail=abc@<mydomain>.<com>,ou=Users,domainName=<mydomain>.<com>,o=domains,dc=<mydomain>,dc=<com>"

adding new entry "mail=xyz@<mydomain>.<com>,ou=Users,domainName=<mydomain>.<com>,o=domains,dc=<mydomain>,dc=<com>"


Although it did not prompt me with any errors, when I logon to ireadmin I am unable to find these two users under the domain name mentioned.   Any help on what I am doing wrong please...?


Thanks, Best
BA

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Bulk mail creation succeeded, but users not visble

It should be visible as expected.
Please try to export whole LDAP data (to "all.ldif" file in below example) with "slapcat" command and verify the accounts you added:

slapcat -f /etc/openldap/slapd.conf > all.ldif

3

Re: Bulk mail creation succeeded, but users not visble

ZhangHuangbin wrote:

It should be visible as expected.
Please try to export whole LDAP data (to "all.ldif" file in below example) with "slapcat" command and verify the accounts you added:

slapcat -f /etc/openldap/slapd.conf > all.ldif

Hi Zhang, did this export, the two new entries are there alright, and I did a cross check between the lines of the working users and these two new entries, apart from the below given three entries

mailboxFormat: maildir
mailboxFolder: Maildir
preferredLanguage: en_US

which are not present in the newly added entries, all others are there... I am unable to login using webmail and these two entries do not show up in ireadmin as well.  Could you point out what has been done wrong here...?

Thanks, Best

BA

4

Re: Bulk mail creation succeeded, but users not visble

Dear Forum member
This resolved with a simple step.  To cross check whether these users were created, I logged into iredadmin, and clicked on the profile of the domain in question. I saw a Save Changes button which I clicked after adding a Company / Organization name.
Immediately I was able to see both the test users I added to this organization.  Although it turned out to be simple, would like to know how to get this done through the script without having to do this tweak.

Thanks, Best
BA

5

Re: Bulk mail creation succeeded, but users not visble

blueaquan wrote:

mailboxFormat: maildir
mailboxFolder: Maildir
preferredLanguage: en_US

These 3 attributes don't matter at all, because we have default values for mailboxFormat and mailboxFolder in /etc/dovecot/dovecot-ldap.conf, and if preferredLanguage is missing, en_US is used as default value.