mutt, neomutt, and searching emails
There are some ageing dinosauruses that still use TUIs and even the more archaic mbox "all emails in this folder in a single file" email storage, and to distressingly admit to the truly ancient practice of "grep"ing an mbox file when mutt's search feature is just so dang diddly ang dang SLOW on a 20,000+ email folder (and that's barely 4 years of cypherpunks!). What to do. Well the installation of neomutt many moons ago, which was not accompanied by any man page reading nor even a simple yandex, has not changed the search speed automatically. Mutt (/neomutt)'s "~b" email body search feature is so slow across 20k emails it's impressive, especially given the speed of grep from the command line, and the speed of opening that 20k email folder. The following thought arises: On opening an mbox folder, mutt evidently scans those 20k messages, since it numbers them uniquely, and can jump very quickly to any single email, and also can filter the subjects, senders, recipients etc using it's secret incantations for "L"imiting etc. So it at least appears that mutt indexes that mbox file by (presumably) line number, and also (again, apparently at least) caches certain of the headers of each email. If the above assumptions are correct, then searching the body of emails could be done using grep at the command line, and scanning grep's output for line numbers, and mapping that against mutt's internal mapping of the mbox. Theoretically at least, this is a relatively simple algorithm. But although it's simple, it may be too late given the existence of neomutt which probably just requires some reading, config, and learning the new commands for searching emails using whatever new whizz bang system that puts the neo into neomutt (for the lazy, that would be libnotmuch).
On Sun, May 10, 2020 at 12:08:03PM +1000, Zenaan Harkness wrote:
There are some ageing dinosauruses that still use TUIs and even the more archaic mbox "all emails in this folder in a single file" email storage, and to distressingly admit to the truly ancient practice of "grep"ing an mbox file when mutt's search feature is just so dang diddly ang dang SLOW on a 20,000+ email folder (and that's barely 4 years of cypherpunks!).
Anyone have experience or suggestions on reasonable ways to print/dump the output of 'multiple commands being run in parallel' to the command line/ terminal? For example, mpop can download emails from multiple email accounts in parallel (it uses separate email UID files per account to isolate its download activity to a single email account), but how to actually do this in parallel -and- display the output of each command 'in real time' in a single terminal in a "reasonable" way? I've a little wrapper that retries up to MAX_TRIES=7 if an mpop account download has a TLS error (gmail pop3 dl producing a lot of these the last week or so...), and 7 retries * 5 lines of text per retry (retry header, date time stamp, echo of cmd being run, and finally the 2 mpop "TLS handshake failed" error lines) is a fair few lines of output... is it time to learn a 'full blown' TUI library? If so, is there such a thing usable from a shell script?
participants (1)
-
Zenaan Harkness