1

Topic: Search by Domain in top search box

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

Hi,
     Since the upgrade to iRedAdmin 2.9, the search bar up the top is only searching on mailboxes and not Domains.
Eg: I search on a domain and get no result.

The following search page does not have Domain ticked.  If I tick domain and search, then the domain is found.

So, the search functionality is working however 'domain' is not automatically searched.

How am I able to make domain searches a default in the top search bar?

Kind regards

----

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

2

Re: Search by Domain in top search box

Here's patch to fix it:

diff -r c7fbcdf0497c libs/ldaplib/general.py
--- a/libs/ldaplib/general.py    Tue Aug 01 10:12:15 2017 +0800
+++ b/libs/ldaplib/general.py    Thu Aug 03 08:39:40 2017 +0800
@@ -791,7 +791,7 @@
     s = escape_filter_chars(search_string)
 
     if not account_type:
-        account_type = ['user', 'maillist', 'alias']
+        account_type = ['domain', 'user', 'maillist', 'alias', 'admin']
 
     # Generate LDAP search filter.
     if iredutils.is_email(s):

We will enable it in next release.