[neomutt-users] How to best configure NeoMutt with multiple
Kenneth Flak
kennethflak at protonmail.com
Thu Aug 31 08:36:10 CEST 2023
I also haven't found a way to search through the messages from Protonmail server-side, but that's usually not an issue, as I pull all the messages to my machine locally anyway and can search them there... I use mbsync to get the mails, and notmuch to search through them, using this macro:
macro index L "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp at a;s/\^id:// for at a;$,=\"|\";print at a'\`\"<enter>" "show only messages matching a notmuch pattern"
I also use this script to automate the pulling of emails and updating of the search database:
#!/bin/sh
MBSYNC=$(pgrep mbsync)
NOTMUCH=$(pgrep notmuch)
if [ -n "$MBSYNC" -o -n "$NOTMUCH" ]; then
echo "Already running one instance of mail-sync. Exiting..."
exit 0
fi
echo "Deleting messages tagged as *deleted*"
notmuch search --format=text0 --output=files tag:deleted | xargs -0 --no-run-if-empty rm -v
mbsync -a
notmuch new
I run it periodically with a systemd-timer, or manually if I get impatient.
--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @kf at sonomu.club
On 30 Aug 2023 15:46, Andrew Sullivan wrote:
>On Wed, Aug 30, 2023 at 07:16:06PM +0000, technical_fora at proton.me wrote:
>>Out of curiosity how do you effectively search through your server-side
>>mails from within NeoMutt?
>
>On the dovecot instance I operate myself, using the search capabilities of the IMAP server.
>
>On the Exchange365 instance my employer operates, verrry badly. Generally, if I really need to do that, I just go to the web interface. Fortunately, I don't have to do it very much.
>
>A
>
>--
>Andrew Sullivan
>ajs at anvilwalrusden.com
More information about the neomutt-users
mailing list