-
|
Is it just me or has the xapian indexing broken with the latest edge build? I try to manually index my mail and the command just instantly returns. The logs say: Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: Thought it might be a variety of PRs at fault. Tried reverting them and rebuilding it a few times and it's bloody 3:25am. Nothing fixed it - so maybe it's just me. Is this not the command that should do it? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
|
I've opened an associated bug report issue: #4719 There was a recent PR which would affect the Xapian feature with If the commit prior doesn't encounter the same error, we could revert that change. AFAIK, we only build from source for compatibility with custom builds of DMS (prior releases before Debian 12 IIRC would have used the Dovecot CE repo package instead, but Debian 12 only has access to Dovecot 2.4 from that which is incompatible with DMS until v16 which will upgrade to Debian 13). So if a build from the upstream repo as we had been doing before with Have you considered Apache Solr? Some DMS users have had various issues raised about Xapian, and found Solr worked better for them. It does require a slight tweak to DMS and a separate container for Solr itself, this is all documented here in our docs if you are unable to resolve the Xapian issue.
I'm short on time, but if this is easy to reproduce, it might be beneficial to get into our test suite. It's possible that something about the change in how we build the plugin prevented that expected symbol from being available 😓 There's also been talk about dropping Xapian in favor of Flatcurve once Dovecot 2.4 lands in DMS with v16 release (Flatcurve is bundled with Dovecot by default IIRC and is meant to be a better choice?).
AFAIK this is a community contributed feature, so none of the active maintainers may be familiar enough to assist. It would be good to ensure it's resolved before DMS v16 is released though 😅 |
Beta Was this translation helpful? Give feedback.
-
|
I'm afraid I've walked myself into this with bad timing and now I need to see it through. I'm a long time docker-mailserver user. It started with me thinking yesterday about the amount of spam getting through rspamd and how much worse it's been getting over the last year. Wondered what version rspamd was and if it was greatly behind so I started digging into it to figure that out. Maybe even run rspamd outside docker mailserver. Then I spotted the xapian package. "What is that?", I wondered. Looked it up. Ah! That explains why my search is literally useless with mailboxes my size. Next thing I know I looked out the window and note the sun is starting to come up! In the next hour or so I'll build the debian 13 branch. See if it works with that by default. Whether it does or not, I think I might need to cherry pick bits out of #4357 and #4557 if they're not in the new branch? I'll test that too if possible. |
Beta Was this translation helpful? Give feedback.
-
|
Excellent news! Just the vanilla debian-13 branch works with xapian, but the config/dovecot.cf has to be changed from: To: If anyone ends up catching debian-13 up with main, let me know and I'll rebuild and retest. I'm going to stay on that branch on my mail server for now unless anything terrible rattles out of it. I don't use LDAP or anything exotic and the logs look good all round. |
Beta Was this translation helpful? Give feedback.
-
|
Ok! Stand down. Figured it out. TLDR:Sorry, it was me, not the edge image. I'll write a small tomb here to explain this in case anyone else stumbles across it in future. What I did to test:What I did was quickly get Claude Code to vibe-code a test harness. From start to finish it:
It's here if of any use to anyone ever again: https://gist.github.com/bocan/af9691d4589f48089bd237979f718474 First, I built directly from So, I thought, maybe it's a problem with the :edge imgage. Pulled that and ran it. And it worked too! I Dig Deeper...Why it looked like an ABI problemWhen full text search wasn't working, the logs showed this line: "undefined symbol" is the classic fingerprint of an ABI mismatch, which is when a plugin was compiled against a different version of Dovecot than the one actually running, so the two no longer fit together. The message names the FTS plugin specifically, and search really was broken, so it felt reasonable to read this as "the Xapian plugin is built wrong." That is the conclusion I jumped to, and it is why I raised this discussion. 😞 Why that was a false alarmThat message is harmless, and it shows up even in a perfectly healthy, working image. Here is what is really happening. Dovecot loads its plugins in several passes. Some plugins depend on others. On an early pass, a plugin whose helper hasn't loaded yet will fail with "undefined symbol," get set aside, and then load successfully on a later pass once its dependency is in place. Dovecot knows this is normal, which is why the very same log line ends with its own reassurance: "(this is usually intentional, so just ignore this message)." I confirmed this by running the exact same command against a clean, untouched :edge image. It printed the identical "undefined symbol" line, then a moment later printed "Module loaded" for that same plugin, and full text search worked fine. So the message was noise, not the cause. What the real cause wasThe actual problem was a small configuration scoping mistake. The Xapian plugin was switched on like this: That enables it for the IMAP protocol (what mail clients use) and the LMTP protocol (how new mail is delivered), but not globally. The catch is that the indexing command, doveadm index, does not run as IMAP or LMTP. It runs in its own separate "doveadm" context, and that context only sees the global setting, where the plugin was never added. So when I proved this directly: with that config, Dovecot reports the plugin active for imap and lmtp but the doveadm context sees only quota, and a full index run wrote zero index files. The fixI set the plugin globally instead of per protocol, by putting this at the top level of the config (outside any protocol block): With that in place, the doveadm context loads Xapian too, doveadm index -A '*' actually builds the index, and search works. Why upgrading to the debian-13 / dovecot 2.4 branch appeared to fix itIt wasn't an ABI fix, because there was no ABI problem. Rebuilding onto the other branch needed a correctly rewrote config, which happened to put the plugin where the indexer could see it. The same result is achieved on :edge just by moving that one mail_plugins line to the global scope. |
Beta Was this translation helpful? Give feedback.
Ok! Stand down. Figured it out.
TLDR:
Sorry, it was me, not the edge image.
There's nothing wrong with :edge as far as I can tell. I just missed the top line when I copy/pasted from the example config
I'll write a small tomb here to explain this in case anyone else stumbles across it in future.
What I did to test:
What I did was quickly get Claude Code to vibe-code a test harness. From start to finish it: