1

Topic: Error adding new user

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8 OPENLDAP
- Linux/BSD distribution name and version: CentOS 7.4.1708
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): NGinx
- Manage mail accounts with iRedAdmin-Pro? 3.1
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Fresh install.

Got   Error: TYPE_OR_VALUE_EXISTS({'info': 'enabledService: value #30 provided more than once', 'desc': 'Type or value
exists'},) error while adding new user to any of 2 domains.

postmaster@ editing is OK.

/var/log/messages has related lines

Apr 28 04:35:12 mail uwsgi: mail.bits.su [pid: 769|app: 0|req: 35/35] 195.144.6.123 () {62 vars in 1468 bytes} [Sat Apr 28 04:35:12 2018] POST /iredadmin/create/user/daxin.com.ua=> generated 0 bytes in 9 msecs (HTTP/1.1 303) 3 headers in 400 bytes (2 switches on core 0)

Apr 28 04:35:13 mail uwsgi: mail.bits.su [pid: 769|app: 0|req: 36/36] 195.144.6.123 () {56 vars in 1677 bytes} [Sat Apr 28 04:35:12 2018] GET /iredadmin/create/user/daxin.com.ua?msg=TYPE_OR_VALUE_EXISTS%28%7B%27info%27%3A%20%27enabledService%3A%20value%20%2330%20provided%20more%20than%20once%27%2C%20%27desc%27%3A%20%27Type%20or%20value%20exists%27%7D%2C%29 => generated 22553 bytes in 1034 msecs (HTTP/1.1 200) 2 headers in 145 bytes (2 switches on core 0)

Post's attachments

2018-04-28 11-40-17 Add mail user - Google Chrome.png
2018-04-28 11-40-17 Add mail user - Google Chrome.png 22.49 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: Error adding new user

Bug in the latest iRedAdmin-Pro-LDAP-3.1. Here's the patch to fix it:

diff -r b774e2add791 libs/ldaplib/iredldif.py
--- a/libs/ldaplib/iredldif.py    Thu Apr 26 21:17:34 2018 +0800
+++ b/libs/ldaplib/iredldif.py    Sun Apr 29 23:17:04 2018 +0800
@@ -296,18 +296,8 @@
         passwd = [str(passwd)]
 
     enabled_services = list(attrs.USER_SERVICES_OF_NORMAL_USER) + settings.ADDITIONAL_ENABLED_USER_SERVICES
-    # Dovecot-2.3 uses 'imaptls' instead of 'imapsecured'
-    if 'imapsecured' in enabled_services:
-        enabled_services += ['imaptls']
-    if 'pop3secured' in enabled_services:
-        enabled_services += ['pop3tls']
 
     if disabled_services:
-        if 'imapsecured' in disabled_services:
-            disabled_services += ['imaptls']
-        if 'pop3secured' in disabled_services:
-            disabled_services += ['pop3tls']
-
         enabled_services = set(enabled_services) - set(disabled_services)
         enabled_services = list(enabled_services)
 

3

Re: Error adding new user

Work like a charm. Thank you.