[neomutt-users] How to best configure NeoMutt with multiple

boB i_persevere technical_fora at proton.me
Thu Aug 31 09:17:12 CEST 2023

On 31.08.2023 06:36, Kenneth Flak wrote:
>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"

This will be useful for me.  Thanks!  You are at about where I intend to
end up -- keeping and searching through my mail locally.  I also hope
this will greatly speed up my access to my mail as I won't have to wait
on the Proton servers, which at times seem a bit slow.

>I also use this script to automate the pulling of emails and updating of the search database:
>MBSYNC=$(pgrep mbsync)
>NOTMUCH=$(pgrep notmuch)
>if [ -n "$MBSYNC" -o -n "$NOTMUCH" ]; then
>     echo "Already running one instance of mail-sync. Exiting..."
>     exit 0
>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.

Again, thanks!  You are probably going to save me a fair chunk of work!!

Wishing you only the best,
boB i_persevere

You are the storyteller of your own life, and you can create your own
legend, or not.
	-- Isabel Allende

More information about the neomutt-users mailing list