Closed iNPUTmice closed 7 years ago
What happens when you leave fetchThreads
and fetchMessages
unset, aka false?
What happens when you leave
fetchThreads
andfetchMessages
unset, aka false?
The same thing happens.
Is there a way to manually query the xapian index directly? Or is that not really feasible?
You can check the contents of your Xapian database in cyrusconfigdir
with
$ xapian-delve-1.5 cyrusconfigdir/search/c/user/cassandane/xapian
UUID = 4769ceaa-08ab-4955-a162-7abf7a2313ad
number of documents = 2
average document length = 92
document length lower bound = 39
document length upper bound = 145
highest document id ever used = 2
has positional information = true
currently open for writing = false
If you pass xapian-delve
the -a
flag, you'll see all indexed terms, in stemmed and and unstemmed versions and prefixed.
Oh this is slightly embarrassing turns out my squatter wasn't running (periodically?)
That's how my cyrus.conf looks like. How can make sure it runs regularly? Preferably when ever new email arrives.
START {
recover cmd="ctl_cyrusdb -r"
squatter cmd="squatter -R"
}
SERVICES {
imap cmd="imapd" listen="imap" prefork=1
imaps cmd="imapd -s" listen="imaps" prefork=0
lmtpunix cmd="lmtpd -a" listen="/var/imap/socket/lmtp"
lmtp cmd="lmtpd -a" listen="localhost:24"
http cmd="httpd" listen="127.0.0.1:6000" prefork=1
}
EVENTS {
checkpoint cmd="ctl_cyrusdb -c" period=30
delprune cmd="cyr_expire -E 3" at=0400
tlsprune cmd="tls_prune" at=0400
}
You'll need to set up a sync_log channel for squatter to pick message arrivals. The man page for squatter has recently been overhauled for this.
E.g. add the following to your imapd.conf
sync_log: on
sync_log_channels: squatter
Still, a 500
error is fishy, something seems broken in your environment but I can't tell.
Those two lines did the trick. Thank you.
Still, a 500 error is fishy, something seems broken in your environment but I can't tell.
Well my guess is that the squatter will auto create the xapian index. And since it didn't ran it didn't create the index and the jmap search code kinda expects it to be there.
Technically this is a configuration problem but since the squatter is optional (and turned off without any configuration) the search code should probably check for the existence of the index first.
Reading between the lines, does this mean that we should document the setting of those two sync_log items as mandatory in the imapd.conf for someone enabling xapian?
@nicola, yes - we should document that you need xapian working for JMAP, and how to make xapian work :)
On Sun, 5 Mar 2017, at 14:15, Nicola N wrote:
Reading between the lines, does this mean that we should document the setting of those two sync_log items as mandatory in the imapd.conf for someone enabling xapian? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2].
--
Bron Gondwana
brong@fastmail.fm
Links:
Xapian is documented as required for JMAP and how to make it work. Just checking that the sync_log lines specifically were part of Xapian pre-reqs as my understanding of squatter functionality and config is limited. (I don't think our Xapian docs mention squatter at all and our basic setup/install guide doesn't either).
So it becomes a larger question of : squatter is necessary, how does one sensibly configure it?
Basically, those two settings. The squatter man page is pretty good/thorough for someone who wants to delve deeper, but that isn't helpful if one doesn't know they need it.
I think the Xapian docs should include a basic squatter configuration:
sync_log: on
)sync_log_channels: squatter
)... and then reference the squatter man page for more info.
There's also this page already, though it's pretty empty: http://www.cyrusimap.org/dev/imap/reference/admin/sop/squatter.html
This is exactly the sort of connect-the-dots documentation that I was suggesting to focus on during my visit. Not that I'm saying to wait, however. The sense I got from reading some of the notes coming through from beta testers, and new users/admins, is that often they don't know what they don't know, and we'll have to craft some clearer road maps for them.
@nicolan let me know if you'd like me to step into any of this. I'm pretty busy right now, but could probably shake loose some time if needed.
I can't get the filters for the getMessageList command to work.
This is the command I'm trying:
And I get an HTTP error 500 in return. Logfile has the following related entries:
Executing
reveals that there is at least one message that has the word Android in both subject and body. Just to be sure I also tested this with searching for from=someemail@domain.tld (which should also exists)
I just rebuild cyrus from the current master just to be on the save side. The configure line I used was:
XAPIAN_CONFIG="$CYRUSLIBS/bin/xapian-config-1.5" ./configure --enable-http --enable-autocreate --enable-xapian --enable-jmap --with-lmdb --prefix=/usr
My old thread #1849 should still have my config files.