Hi, With the little knowledge of Java I made the following modification in org.apache.james.modules.mailbox.LuceneSearchMailboxModule
# add an extra includes import com.google.inject.name.Names; #add an additional line in the configure method bind(Boolean.class).annotatedWith(Names.named("dropIndexOnStart")).toInstance(false); These changes apparently solve the problem, but I don't think it should be solved that way. Best regards! > On 20 Jul 2023, at 08:45, Mihai Zamfira <mihai.zamf...@logika.ro.INVALID> > wrote: > > Dear Benoit, > Deleting indexes has a significant impact for some IMAP clients like Iphone > Mail (standard email client on iphone). > This application uses indexes in the IMAP synchronization process. I found > that if the indexes are deleted, the users who use the Mail application on > iPhone will only be able to access the emails that are found in the newly > created indexes when the James server is started. All other emails that are > in the email repository and are not indexed become inaccessible from the > mobile phone > The workaround is to run a full reindexing process after each startup of the > James server, which consumes time and is not optimal > > Best regards > > >> On 20 Jul 2023, at 05:32, Benoit TELLIER <btell...@linagora.com> wrote: >> >> Hello Mihai, >> >> I reproduced the behaviour you mentionned on my side. >> >> - Start the demo image >> - append a few mails >> >> List files. There is some Lucene files: >> >> >> >> -rw-r--r-- 1 root root 3.1K Jul 20 02:10 _k.fdt >> -rw-r--r-- 1 root root 308 Jul 20 02:10 _k.fdx >> -rw-r--r-- 1 root root 871 Jul 20 02:10 _k.fnm >> -rw-r--r-- 1 root root 6.1K Jul 20 02:10 _k.frq >> -rw-r--r-- 1 root root 1.6K Jul 20 02:10 _k.nrm >> -rw-r--r-- 1 root root 4.5K Jul 20 02:10 _k.prx >> -rw-r--r-- 1 root root 145 Jul 20 02:10 _k.tii >> -rw-r--r-- 1 root root 9.5K Jul 20 02:10 _k.tisDo a search: >> >> $ openssl s_client -host 127.0.0.1 -port 993 >> [...] >> a0 LOGIN user02@james.local 1234 >> a0 OK LOGIN completed. >> a1 SELECT Drafts >> [...] >> a3 SEARCH SEEN >> * SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 >> * 1 FETCH (FLAGS (\Draft \Seen)) >> * 2 FETCH (FLAGS (\Draft \Seen)) >> * 3 FETCH (FLAGS (\Draft \Seen)) >> * 19 FETCH (FLAGS (\Draft \Seen)) >> a3 OK SEARCH completed. >> - Restart James >> >> Then I noticed: >> >> - Lucene files disappeared >> - Search no longer yield results >> >> $ openssl s_client -host 127.0.0.1 -port 993 >> [...] >> a0 LOGIN user02@james.local 1234 >> a0 OK LOGIN completed. >> a1 SELECT Drafts >> [...] >> a3 SEARCH SEEN >> a3 OK SEARCH completed. >> According to me, deletion of the Lucene files caused the alteration of the >> search results. >> I do not understand yet what caused the files to disapear, and is looking >> for "why". >> >> -- >> >> >> Best regards, >> >> >> >> Benoit TELLIER >> >> >> >> General manager of Linagora VIETNAM. >> >> Product owner for Team-Mail product. >> >> Chairman of the Apache James project. >> >> >> >> Mail: btell...@linagora.com >> >> Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) >> >> On Jul 19, 2023 7:33 PM, from Mihai Zamfira hello, >> on apache james 3.8.0 Jpa-guice with external rdbms i notice that when the >> Apache James server is restarted, the lucene indexes are deleted. >> is this normal behavior? >> >> Thanks! >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: <a >> href="mailto:server-user-unsubscr...@james.apache.org">server-user-unsubscr...@james.apache.org</a> >> For additional commands, e-mail: <a >> href="mailto:server-user-h...@james.apache.org">server-user-h...@james.apache.org</a> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org