1

Topic: Spiderd ERROR [FTS] Failed in querying latest messages

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi everyone,

I'm testing Spiderd and like it so far. There's only one crucial issue I hope to get help with. Once Spiderd is installed and initial import if finished, I can't login with Auditor.

The web browser says "Too many redirects".

In spiderd.log i see lots of messages like this:
ERROR [FTS] Failed in querying latest messages: json: cannot unmarshal array into Go struct field ResultMessage.Headers.To of type string

Nothing interesting in http.log:
302 GET /search    84.81223ms
302 GET /    2.099198ms
302 GET /search   79.997697ms
302 GET /    1.910297ms
302 GET /search   76.558264ms
302 GET /     1.93845ms

I'm importing 2 mailboxes with ~180000 messages. Import goes normal, no issues.

This happens only with users with Auditor role. Admin users work fine. I can login with auditor user before I do the import, so it seems the issue is specifically with showing messages list / data.

Would appreciate any help with this.

Thanks

----

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

2

Re: Spiderd ERROR [FTS] Failed in querying latest messages

Some additional info:

Version v2.7.4
OS ubuntu 24.04
Kernel Version 6.8.0-53-generic (amd64)
Memory 3.8 GiB

3

Re: Spiderd ERROR [FTS] Failed in querying latest messages

As I mentioned, I do import from 2 mailboxes. Trying to test this further, I've spun up 2 more servers with Spiderd and imported only the 1st mailbox in the 1st server and only the 2nd mailbox in the 2nd server.

As a result, my 1st server with only the 1st mailbox works (120000 emails), but the 2nd server with the second mailbox (80000 emails) has the same error "Too many redirects" with the same errors in the logs, as inn above message.

So I guess it's some email from the 2nd mailbox is to blame. Not sure how to troubleshoot further though.

4

Re: Spiderd ERROR [FTS] Failed in querying latest messages

matador wrote:

ERROR [FTS] Failed in querying latest messages: json: cannot unmarshal array into Go struct field ResultMessage.Headers.To of type string

Seems Spider doesn't correctly handle some email with unexpected value in email header `To:`. We need a way to find which message it is, and export it to raw message for further investigation.

We need your help to get this email for investigation, could you please contact me (zhb _at_ iredmail _dot_ org) directly?

5

Re: Spiderd ERROR [FTS] Failed in querying latest messages

Sure, I'll email you in a minute.

6

Re: Spiderd ERROR [FTS] Failed in querying latest messages

ZhangHuangbin wrote:
matador wrote:

ERROR [FTS] Failed in querying latest messages: json: cannot unmarshal array into Go struct field ResultMessage.Headers.To of type string

Seems Spider doesn't correctly handle some email with unexpected value in email header `To:`. We need a way to find which message it is, and export it to raw message for further investigation.

We need your help to get this email for investigation, could you please contact me (zhb _at_ iredmail _dot_ org) directly?

Thank you for fixing the issue! All works as expected now.

7

Re: Spiderd ERROR [FTS] Failed in querying latest messages

The fix will be available in next Spider release soon.