1 (edited by Emidio Reggiani 2011-05-19 19:15:21)

Topic: [SOLVED] Import and strange behaviour

Hello. I installed the latest Admin Pro on latest iRedMail Mysql and imported users and domains from IMail using a php script.

I cheched the records in the three tables in vmail database (alias, domain, mailbox) and data looks like the other domanins I inserted manually from the Admin interface.

Actually, trying to add a new user in a domain results in error:

Error: Exceeded domain account limit. Please contact your administrator or service provider to increase it.

followed by:

You can create 14 more mail user(s) under domain itrip.it.

The domain has Available quota: 4 GB , 36 account created over a max of 50. There's something I missed other than the three tables above for creating new domains and users?


Emidio

2

Re: [SOLVED] Import and strange behaviour

Can you show me screenshot of domain list? It will show quota related status, which can help troubleshoot.

If you don't want to leak private info, e.g. domain names, please mail to support@ iredmail.org instead of posting in forum.

3

Re: [SOLVED] Import and strange behaviour

I sent to support email (cant find anything here for submitting another file as i did for the new topic).

4

Re: [SOLVED] Import and strange behaviour

Fixed. It's a bug in iRedAdmin-Pro-MySQL-1.1.0, patch attached.

--- libs/mysql/admin.py    2011-05-18 14:54:44.000000000 +0800
+++ libs/mysql/admin.py    2011-05-19 22:09:37.000000000 +0800
@@ -119,7 +119,13 @@
         elif accountType == 'user':
             try:
                 if self.isGlobalAdmin(self.admin):
-                    result = self.conn.select('mailbox', what='COUNT(username) AS total')
+                    if len(self.domains) == 0:
+                        result = self.conn.select('mailbox', what='COUNT(username) AS total')
+                    else:
+                        result = self.conn.select('mailbox',
+                                                  what='COUNT(username) AS total',
+                                                  where='domain IN %s' % web.sqlquote(self.domains),
+                                                 )
                 else:
                     self.sql_append_where = ''
                     if len(self.domains) == 0: