• Re: keyword search of old messages

    From Rich@21:1/5 to bob prohaska on Mon Oct 31 22:13:01 2022
    bob prohaska <bp@www.zefox.net> wrote:
    How does one search through accumulated mutt mail for
    messages containing a particular word in the message body?

    The mutt manual.txt lists the ~A modifer as "all messages":

    Table 4.4. Pattern modifiers
    Pattern modifier Description
    ~A all messages

    for searching from within mutt.

    For example, I think there's an old message containing the
    word foo, but it's not in the title or subject. Is it possible
    to do a full-text search of all messages in a folder?

    Folders are simply text files (or directories containing text files,
    each file containing one message) so they are also searchable using the standard Unix tools (i.e., grep) with help from find and xargs for the
    maildir format (one file per message). The only items that would get
    missed using the standard Unix tools would be odd mailers that base64
    encode their entire message, even when not necessary.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bob prohaska@21:1/5 to All on Mon Oct 31 21:35:50 2022
    I admit this is a dumb question, but couldn't find
    an answer that I recognized in the help list or manpage.

    How does one search through accumulated mutt mail for
    messages containing a particular word in the message body?

    For example, I think there's an old message containing the
    word foo, but it's not in the title or subject. Is it possible
    to do a full-text search of all messages in a folder?

    Thanks, and apologies if I'm missing something obvious.

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Bell_West@21:1/5 to bob prohaska on Mon Oct 31 22:58:14 2022
    On 2022-10-31, bob prohaska wrote:
    Is it possible
    to do a full-text search of all messages in a folder?

    Within what mutt recognises as a mailbox, ~b [regex] .

    Personally I also use mairix to index all folders, but that's a
    slightly different problem.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bob prohaska@21:1/5 to roger+cmm202210@nospam.firedrake.or on Tue Nov 1 00:09:31 2022
    Roger Bell_West <roger+cmm202210@nospam.firedrake.org> wrote:
    On 2022-10-31, bob prohaska wrote:
    Is it possible
    to do a full-text search of all messages in a folder?

    Within what mutt recognises as a mailbox, ~b [regex] .


    That seems to do the trick. Took me a while to recognize
    the tilda as the escape key 8-\

    Thanks for your help!

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Pearson@21:1/5 to bob prohaska on Tue Nov 1 15:21:00 2022
    On Mon, 31 Oct 2022 21:35:50 -0000 (UTC), bob prohaska wrote:
    [snip]
    How does one search through accumulated mutt mail for
    messages containing a particular word in the message body?

    I've been happy with notmuch. It maintains a database that
    speeds up searching over all your old emails, and allows
    slightly complicated requests like requiring X in the email
    body and Y on the subject line and Z in the recipient list.
    In the configuration that I think is the default, the F8 key
    in the mutt index display switches to a notmuch search.

    On my system, the notmuch database occupies 1.2 gigabytes of storage,
    and is updated daily by a cron job. The update takes well under a
    minute. My maildir directory contains about 8 gigabytes of mail.


    --
    To email me, substitute nowhere->runbox, invalid->com.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Wed Nov 2 09:32:27 2022
    * bob prohaska, 2022-11-01 00:09 UTC:
    Roger Bell_West <roger+cmm202210@nospam.firedrake.org> wrote:
    Within what mutt recognises as a mailbox, ~b [regex] .

    That seems to do the trick. Took me a while to recognize
    the tilda as the escape key 8-\

    It's not. ~b is the pattern operator for
    ~b EXPR messages which contain EXPR in the message body.
    man muttrc

    You can use that in any expression and operation that understands
    patterns, limit filters, hooks, ...

    <Esc>b is a macro key binding of
    M <search>~b
    search in message bodies. See mutt help with ? when in index.

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)