1

Topic: Adding users to domain

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
iRedMail    1.1
iRedAdmin-Pro    4.2 (MySQL)
Dployed with downloadable installed
Ubuntu 18.04 LTS
MySQL version with MariaDB installed
Web Server: NGINX
IredAdmin Pro

When trying to add a new user to a domain , get the message

You can NOT create more users under domain contoso.org. No free domain quota left.

Even when under domain advanced I leave max number of users to 0 or make it 5.

2

Re: Adding users to domain

I fixed this - needed to extend the domain storage quota.  For some reason the new user was defaulting to using all the remaining quota and then consequently failing.  this doesnt make sense.

3

Re: Adding users to domain

This happens when:

- you have a per-domain mailbox quota, but
- you do NOT set a default mailbox quota for new user (in domain profile page)

In this case iRedAdmin-Pro has to allocate all quota to this newly created user.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

4 (edited by temabu 2020-03-25 03:14:01)

Re: Adding users to domain

So I updated to 4.2 again and tried to access users in one of the domains which gives the error.  Same error.  The error entry in syslog is this:

The last error line relates to this line:
File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/ireddate.py", line 198, in utc_to_timezone
#012    return ft.strftime(format)
#012ValueError: year=1000 is before 1900; the datetime strftime() methods require year >= 1900



Mar 24 18:57:38 ms iredadmin: Traceback (most recent call last):
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 257, in process
#012    return self.handle()
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 248, in handle
#012    return self._delegate(fn, self.fvars, args)
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 488, in _delegate
#012    return handle_class(cls)
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 466, in handle_class
#012    return tocall(*args)
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/sqllib/decorators.py", line 33, in proxyfunc
#012    return func(*args, **kw)
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/controllers/sql/user.py", line 144, in GET
#012    msg=form.get('msg', None))
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/iredbase.py", line 191, in render_template
#012    return jinja_env.get_template(template_name).render(context)
#012  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
#012    return self.environment.handle_exception(exc_info, True)
#012  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
#012    reraise(exc_type, exc_value, tb)
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/../templates/default/sql/user/list.html", line 23, in top-level template code
#012    {% from "macros/msg_handlers.html" import user_msg_handler with context %}
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/../templates/default/layout.html", line 201, in top-level template code
#012    {% block main %}{% endblock %}
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/../templates/default/sql/user/list.html", line 157, in block "main"
#012    <i class="fa fa-cog fa-lg fr-space" title="{{ _('Edit account profile') }}{% if r.passwordlastchange %} ({{ _('Password last change:') }} {{ r.passwordlastchange | utc_to_timezone(timezone=session.get('timezone')) }}){% endif %}"></i>
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/ireddate.py", line 198, in utc_to_timezone
#012    return ft.strftime(format)
#012ValueError: year=1000 is before 1900; the datetime strftime() methods require year >= 1900
Mar 24 18:57:38 ms iredadmin:
Mar 24 18:57:38 ms iredadmin: [82.129.66.113] GET /iredadmin/users/bario.com 500 211 "https://ms.bario.com/iredadmin/profile/ … /bario.com"

5

Re: Adding users to domain

Does this error mean something on my end needs changing or is this a bug or something in the later versions?

Certainly with version 3 I dont get this error.  But at least I can demonstrate that from 4.1.2 onwards I do.

Thanks

temabu wrote:

So I updated to 4.2 again and tried to access users in one of the domains which gives the error.  Same error.  The error entry in syslog is this:

The last error line relates to this line:
File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/ireddate.py", line 198, in utc_to_timezone
#012    return ft.strftime(format)
#012ValueError: year=1000 is before 1900; the datetime strftime() methods require year >= 1900



Mar 24 18:57:38 ms iredadmin: Traceback (most recent call last):
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 257, in process
#012    return self.handle()
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 248, in handle
#012    return self._delegate(fn, self.fvars, args)
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 488, in _delegate
#012    return handle_class(cls)
#012  File "/usr/lib/python2.7/dist-packages/web/application.py", line 466, in handle_class
#012    return tocall(*args)
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/sqllib/decorators.py", line 33, in proxyfunc
#012    return func(*args, **kw)
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/controllers/sql/user.py", line 144, in GET
#012    msg=form.get('msg', None))
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/iredbase.py", line 191, in render_template
#012    return jinja_env.get_template(template_name).render(context)
#012  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
#012    return self.environment.handle_exception(exc_info, True)
#012  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
#012    reraise(exc_type, exc_value, tb)
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/../templates/default/sql/user/list.html", line 23, in top-level template code
#012    {% from "macros/msg_handlers.html" import user_msg_handler with context %}
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/../templates/default/layout.html", line 201, in top-level template code
#012    {% block main %}{% endblock %}
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/../templates/default/sql/user/list.html", line 157, in block "main"
#012    <i class="fa fa-cog fa-lg fr-space" title="{{ _('Edit account profile') }}{% if r.passwordlastchange %} ({{ _('Password last change:') }} {{ r.passwordlastchange | utc_to_timezone(timezone=session.get('timezone')) }}){% endif %}"></i>
#012  File "/opt/www/iRedAdmin-Pro-SQL-4.2/libs/ireddate.py", line 198, in utc_to_timezone
#012    return ft.strftime(format)
#012ValueError: year=1000 is before 1900; the datetime strftime() methods require year >= 1900
Mar 24 18:57:38 ms iredadmin:
Mar 24 18:57:38 ms iredadmin: [82.129.66.113] GET /iredadmin/users/bario.com 500 211 "https://ms.bario.com/iredadmin/profile/ … /bario.com"