summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-11-26remove non-single-threaded optionDirk-Jan C. Binnema
Single-threaded is the build-default, and seems to work well enough for 1.12.7, so remove the option to turn it off. This is because build-options that influence such low-level/core behavior are a pain to maintain.
2024-11-10indexer: make lazy check even lazierDirk-Jan C. Binnema
In lazy-mode, we were skipping directories that did not change; however, this didn't help for the case were users received new messages in big maildirs. So, add another check where we compare the ctime of message files with the time of the last indexing operation. If it's smaller, ignore the message-file. This is faster than having to consult the Xapian database for each message. Note that this requires in mu4e: (setq mu4e-index-lazy-check t) or --lazy-check as a parameter for 'mu index'.
2024-11-10message: treat pcks7::smt::Unknown as encryptedDirk-Jan C. Binnema
GMime isn't more specific, so let's assume it's encrypted; better than nothing. Fixes #2784.
2024-10-08mu-server: try avoiding xapian multi-threaded accessDirk-Jan C. Binnema
Try to avoid multi-threaded operations with Xapian. This remove the thread workers during indexing, and avoids the indexing background thread. So, mu4e has to wait once again during indexing. We can improve upon that, but first we need to know if it avoids the problem of issue #2756.
2024-09-22Fix typos.James Cook
2024-09-03scanner: ignore emacs auto-savesDirk-Jan C. Binnema
It's better to _not_ have auto-saves for your draft directory, but if you do, ignore them at least in mu. It may still trip up mbsync and friends, but not much we can do about that. Clean up the implementation a bit as well.
2024-08-26lib: use time_t_max for empty datetimeMatthew Smith
In Mu::parse_date_time, when provided with an empty string, return time_t_max instead of G_MAXINT64. For systems with a 64-bit time_t, there is no difference. With a 32-bit time_t it caused a test to fail: not ok /utils/date-basic - ERROR:../mu-1.12.4/lib/utils/tests/test-utils.cc:92 void test_date_basic(): assertion failed (parse_date_time(std::get<0>(test), std::get<1>(test)).value_or(-1) == std::get<2>(test)): (18446744073709551615 == 2147483647) This edge case probably only affected the test, as when other parts of the application call parse_date_time (e.g. mu-server.cc and mu-query-processor.cc), they check if the input string is empty first.
2024-08-22message: detect top-level smime parts + testDirk-Jan C. Binnema
Fixes #2745
2024-08-21mu-server: cosmeticDirk-Jan C. Binnema
2024-08-21xapian-db: improve errors, fix warningsDirk-Jan C. Binnema
2024-08-08Update mu-store-worker.hh, remove duplicate `;`Eval Exec
Fix gcc warning: ``` mu4e pre-build [26/198] Compiling C++ object lib/libmu.a.p/mu-query-parser.cc.o 34.390111 mu4e pre-build In file included from ../lib/mu-store.hh:34, 34.390132 mu4e pre-build from ../lib/mu-query-parser.hh:25, 34.390140 mu4e pre-build from ../lib/mu-query-parser.cc:20: 34.390146 mu4e pre-build ../lib/mu-store-worker.hh:162:23: warning: extra ‘;’ [-Wpedantic] 34.390152 mu4e pre-build 162 | Store& store_;; 34.390166 mu4e pre-build | ^ 34.390172 mu4e pre-build | - 34.390177 mu4e pre-build [27/198] Compiling C++ object lib/libmu.a.p/mu-contacts-cache.cc.o 34.538682 ```
2024-08-04lib: commit to disk after indexingDirk-Jan C. Binnema
2024-07-27test_index_move: extend unit testDirk-Jan C. Binnema
Double-check the changed values are seen in a newly opened store.
2024-06-17logging: reduce debug logging a bitDirk-Jan C. Binnema
2024-06-05store-worker: temporarily revertDirk-Jan C. Binnema
Of course, after merging some problems come up. Let's fix those first. This reverts commit f2f01595a51380ae38aafb4cd11a0d3c17a33a10.
2024-06-03server: support doccount data requestDirk-Jan C. Binnema
So we can update doccount in mu4e after indexing
2024-06-03server: pass sexp-commmands through store workerDirk-Jan C. Binnema
To ensure all Xapian rw commands happen in the same thread.
2024-06-03indexer: use store-workerDirk-Jan C. Binnema
Use the store worker (-thread) to do all database modification. Currently, the "removed" field of Progress is always 0.
2024-06-03store-worker: implementDirk-Jan C. Binnema
store-worker is a thread + async queue to throttle requests to a single thread.
2024-06-03xapian-db: remove locks, transaction levelsDirk-Jan C. Binnema
Simplify xapian-db: locks should go elsewhere; transaction level add too much complication.
2024-06-01mu-config: cosmeticDirk-Jan C. Binnema
2024-06-01message: add default ctorDirk-Jan C. Binnema
Useful for stuffing messages in async-queues
2024-06-01lib: fix batch-size after db creationDirk-Jan C. Binnema
Ensure we use the user-specified batch-size immediately after db creation.
2024-05-08mu-store/indexer: consume messages from workersDirk-Jan C. Binnema
Add store::consume_message, which is like add message but std::move from the caller such that the messages longer has copies (with Xapian::Document) on the caller side; this is to avoid threading issues.
2024-05-08mu-query: minor cleanupsDirk-Jan C. Binnema
2024-05-07logging: rework a bit, maybe support syslogDirk-Jan C. Binnema
Seems journal logging fails on NetBSD (no surprise), but has some unwanted/not-fully-understood side-effects. In any case, outside Linux there's no use in even trying to use journald; so we don't do that anymore. Add conditional support for syslog (requires glib 2.80).
2024-05-01scanner: don't skip directory entries with type `DT_UNKNOWN`Jeremy Sowden
According to the readdir(2) man-page, not all file-systems support returning the entry's file-type in `d_type`. For example, the reprotest reproducibility tool, uses the disorderfs FUSE file-system to shuffle the order in which directory entries are returned, and this does not set `d_type`. Therefore, in addition to entries with type `DT_DIR` and `DT_LNK`, also process entries with type `DT_UNKNOWN`. Signed-off-by: Jeremy Sowden <azazel@debian.org>
2024-05-01lib: centralize xapian include, enable move semanticsDirk-Jan C. Binnema
Only include xapian.h in one place, so we can have consistent options. With that in place, we can enable C++ move semantics. We don't do anything with that yet, but we check in the meson.build file to see if we have the required xapian version.
2024-04-30draft: explicitly remove drafts after sendingDirk-Jan C. Binnema
This seems necessary in some cases.
2024-04-28mu-server: better handle msgid-not-found in moveDirk-Jan C. Binnema
It's opportunistic: messages referred to be msgid may not exist, and that's okay.
2024-04-21compat: include sys/wait.h where neededDirk-Jan C. Binnema
netbsd needs this explicitly, other systems let us get away without it.
2024-04-14test-mu-utils: update parse_date_time testsDirk-Jan C. Binnema
We're using ::time_t now.
2024-04-13mu-utils: update casting from int64_t -> time_tDirk-Jan C. Binnema
Esp. for systems with 32-bit time_t.
2024-04-10mu-indexer: re-enable database lockDirk-Jan C. Binnema
Seeing some db corruption; re-enabling this (old) lock to see if it helps. It _does_ slow down indexing significantly.
2024-04-10mu-server: get rid of the sent-handlerDirk-Jan C. Binnema
We no longer need it; we can handle mu4e's sending directly in mu4e-compose.
2024-04-08utils: build test-utils when tests are not disabledDirk-Jan C. Binnema
Fixes #2685
2024-04-06utils: only build mu-tests-utils when tests are enabledDirk-Jan C. Binnema
This fixes a compilation failure. Fixes #2684.
2024-04-05lib/xapian-db: improve error messageDirk-Jan C. Binnema
2024-04-02mu-contact: move email validation to contacts cacheDirk-Jan C. Binnema
So we can be sure the regexp is initialized. This _may_ help for https://bugzilla.opensuse.org/show_bug.cgi?id=1221861 though it is very hard to tell!
2024-04-01mu-utils: Fix build with muslMatthew Smith
In musl, `stdout` is a macro that expands to `(stdout)`, and `::(stdout)` is not valid C++. ../mu-1.12.2/lib/utils/mu-utils.hh:268:32: error: expected id-expression before '(' token 268 | ::stdout); | ^~~~~~ Nothing in the Mu namespace is named stdout, so it is safe to drop the `::`. Bug: https://bugs.gentoo.org/928361
2024-03-15xapian-db: use get_msg on exceptionDirk-Jan C. Binnema
We were using get_error_string, but that might be NULL, which libfmt doesn't like much.
2024-03-15message: flag list-unsubscribe as MailingListDirk-Jan C. Binnema
Flag message that merely have a List-Unsubscribe header with Flags::MailingList too (some marketing message have this header, yet miss "List-Id". Add a test as well.
2024-03-15clang: fix some compiler warningsDirk-Jan C. Binnema
From CI.
2024-03-01tests: add some very basic CLD2_TESTDirk-Jan C. Binnema
just to check if it works at all; no need to check cld2 at all.
2024-03-01message: make sure HAVE_CLD2 is foundDirk-Jan C. Binnema
This broke the language detection code
2024-02-26mu-init: insist that --maildir is absoluteDirk-Jan C. Binnema
2024-02-25tests: check setlocale return valueDirk-Jan C. Binnema
It might fail while nl_langinfo does not.
2024-02-25lib/mu-store: don't assume non-empty in remove_slashDirk-Jan C. Binnema
HT: Arsen Arsenović Fixes #2633.
2024-01-23lib/mu-xapian-db: handle exception with dec_transaction_levelDirk-Jan C. Binnema
I.e., do our book-keeping beforehand.
2024-01-06tests: move to tests/, make optionalDirk-Jan C. Binnema
While not recommended, sometimes it can be useful to disable building the unit tests. This can be done now with meson -Dtests=disabled build