1

Topic: Error: (1054, "Unknown column 'bytes' in 'field list'")

==== Required information ====
- iRedMail version: 0.8.7 (Pro 1.8.2)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian Wheezy
- Related log if you're reporting an issue:
====

I`m not able to get any result when using the "Search mail account" function, it only returns an error:
Error: (1054, "Unknown column 'bytes' in 'field list'")

----

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

2

Re: Error: (1054, "Unknown column 'bytes' in 'field list'")

A bug in iRedAdmin-Pro-MySQL-1.8.2. Here's patch to fix it:

diff --git a/libs/mysql/connUtils.py b/libs/mysql/connUtils.py
--- a/libs/mysql/connUtils.py
+++ b/libs/mysql/connUtils.py
@@ -263,7 +263,7 @@
             qr_user = self.conn.select(
                 'mailbox',
                 vars=sql_vars,
-                what='username,name,quota,bytes,messages,active',
+                what='username,name,quota,active',
                 where='(username LIKE $search_str_user OR name LIKE $search_str) %s %s' % (
                     sql_append_status, sql_append_domains,
                 ),

3

Re: Error: (1054, "Unknown column 'bytes' in 'field list'")

Thanks!