1 (edited by jstewart 2018-08-02 23:16:38)

Topic: ldap fields syntax

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I am in the process of importing users from my old mail server using a modified create_mail_user_OpenLDAP.py and I'd like to bring in notes and other info.

I tried using the telephoneNumber field, as the way you have it set up works perfectly in that I can add as many entries as I want, and I see the resulting entries in the user config of the admin panel. The problem is that it uses the Telephone Number syntax, which means I can't use any special characters.

here is an example of my resulting ldif file:
dn: mail=abeuser@domain.net,ou=Users,domainName=domain.net,o=domains,dc=domain,d c=lan
changetype: add
objectClass: inetOrgPerson
objectClass: mailUser
objectClass: shadowAccount
objectClass: amavisAccount
mail: abercrombie@cyg.net
userPassword: redacted
mailQuota: 0
cn: Scott Abercrombie
sn: abercrombie
uid: abercrombie
storageBaseDirectory: /var/vmail
mailMessageStore: vmail1/domain.net/a/b/e/abeuser/
homeDirectory: /var/vmail/vmail1/cyg.net/a/b/e/abeuser/
accountStatus: active
enabledService: internal
enabledService: doveadm
enabledService: lib-storage
enabledService: indexer-worker
enabledService: dsync
enabledService: mail
enabledService: smtp
enabledService: smtpsecured
enabledService: pop3
enabledService: pop3secured
enabledService: pop3tls
enabledService: imap
enabledService: imapsecured
enabledService: imaptls
enabledService: deliver
enabledService: lda
enabledService: forward
enabledService: senderbcc
enabledService: recipientbcc
enabledService: managesieve
enabledService: managesievesecured
enabledService: sieve
enabledService: sievesecured
enabledService: lmtp
enabledService: sogo
enabledService: shadowaddress
shadowLastChange: 17745
amavisLocal: TRUE
title: Title Text
telephoneNumber: 519-555-5555
telephoneNumber: RR #7
telephoneNumber: Some City ON
telephoneNumber: N4N 4N4
employeeNumber: 10422023

I used the telephoneNumber field because you show as many entries in the user profile interface as there are entries. As you can see, some of the notes have special characters such as "#".

The "title" field will work with special characters because the type is "Directory String" rather than "Telephone Number", but only the first entry shows in the user profile.

Is there any way I can alter the system to show the title field the same way as the telephoneNumber field with multiple entries, or even better, have a new field for "Notes" that works the same way as the telephone field?

I don't want to alter the default schema to change the syntax requirements to allow special characters in the telephone field, as that would likley break upgrades.

Thanks.

----

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

2

Re: ldap fields syntax

jstewart wrote:

Is there any way I can alter the system to show the title field the same way as the telephoneNumber field with multiple entries, or even better, have a new field for "Notes" that works the same way as the telephone field?

- I will improve iRedAdmin-Pro to show multiple "title" in next iRedAdmin-Pro release.
- About the "Notes" field, maybe use "Display Name" for extra note?

3

Re: ldap fields syntax

Thanks.
For now, I'll populate the telephoneNumber fields with actual telephone numbers, and any address or other note fields in multiple "title" fields.

Do you have an idea when you will have the new release with the multiple notes in place? No rush, just curious.

I have set a new "Directory of mailbox storage" in the advanced settings. Is that all I need to do? Do I need to reproduce the other folders that are in /var/vmail?

#cd /var/vmail/
#ls -l
drwx------. 5 root  root  114 May  8 04:01 backup
drwx------. 2 mlmmj mlmmj  62 May  7 10:24 mlmmj
drwx------. 2 mlmmj mlmmj   6 May  7 10:25 mlmmj-archive
drwx------. 2 nginx nginx   6 May  7 10:25 pgp-keys
drwx------. 2 vmail vmail   6 May  7 10:24 public
drwx------. 2 vmail vmail  48 May  7 14:39 sieve
drwx------. 3 vmail vmail  21 May  7 10:24 vmail1

the new directory is /home/newdir/vmail1
I set ownership to vmail - what should the directory permissions be?

Thanks.

4

Re: ldap fields syntax

jstewart wrote:

Do you have an idea when you will have the new release with the multiple notes in place? No rush, just curious.

Hard to say.

jstewart wrote:

the new directory is /home/newdir/vmail1
I set ownership to vmail - what should the directory permissions be?

Better not under /home. But if Dovecot can access /home/newdir/, then it's fine.