From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 349396DE0F82 for ; Tue, 3 Mar 2020 11:48:55 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=pass (2048-bit key; unprotected) header.d=labrat.space header.i=@labrat.space header.b="FZeTnFLY"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -2.497 X-Spam-Level: X-Spam-Status: No, score=-2.497 tagged_above=-999 required=5 tests=[AWL=0.004, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lZUAK1iX5sBI for ; Tue, 3 Mar 2020 11:48:53 -0800 (PST) Received: from mariecurie.labrat.space (mariecurie.labrat.space [116.203.185.229]) by arlo.cworth.org (Postfix) with ESMTPS id ABB596DE0F54 for ; Tue, 3 Mar 2020 11:48:52 -0800 (PST) Received: from labrat.space (unknown [178.38.114.152]) by mariecurie.labrat.space (Postfix) with ESMTPSA id 079F49F9A3C; Tue, 3 Mar 2020 20:48:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=labrat.space; s=201904; t=1583264918; bh=yHQHpQA7orEN043aCnP/xFTvhfz6VV+gu6Omd5domp4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:From:To:CC:Date: Subject:Content-Type:Content-Disposition:Reply-To:In-Reply-To: MIME-Version:Message-ID:References; b=FZeTnFLYQYvp4SfBzG+83IbRTv74NTjJpv+3ZExWHv7NfUbPCxZa2CDerYiu9fy2D exBu1x2Ijvea338DngqjhdVMRTekIf7rEDGcfO1LEYb+Vc0iskFbPbH6HZLqhpN29q 8z52A8Mx5vKidoAT1n7zKgvGU2xviG8NrJaxcUes/wAooT88NHlvd5+3O6X50H+0PZ xjROC3c98vJLz22TMKguHjb35Xy6o65qrGGJ0jroNWsoIL9JUdLWakXGBm6S41sHo+ WD7sgux5Of+n1K6G/dHX4zDVijbLKghic5tlu+69YOb7bia7RoF8heaemMzhEPjdxI BXTqQo7j1ZmTA== Date: Tue, 3 Mar 2020 20:48:46 +0100 From: Reto To: moonmaillist@firemail.cc Cc: notmuch@notmuchmail.org Subject: Re: Best practices for notmuch and neomutt Message-ID: <20200303194846.6chdh7nktwzligaf@feather.localdomain> Mail-Followup-To: moonmaillist@firemail.cc, notmuch@notmuchmail.org References: <4604f4697d634eb702d95ce0f43880ac@firemail.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4604f4697d634eb702d95ce0f43880ac@firemail.cc> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 19:48:55 -0000 On Tue, Mar 03, 2020 at 11:13:47AM +0000, moonmaillist@firemail.cc wrote: > I really want to know best practices or nice virtual-mailboxes, which aren't > included in normal tutorials. Most tutorial just have 1 email address and > only use tags like inbox, archive, deleted and spam. But there must be much > better use cases and much more detailed notmuch queries or even hooks which > are triggered to specific events. I mean in the end you need to make up a system that works for you. I personally just tag it by topic (notmuch / neomutt / distro related...) possibilities are endless. But the more tags you have the harder it gets to keep track and make sense of them. I dump all mails from 3 addresses into one notmuch db. The necessary tricks to cope with that is in neomutt ``` set sendmail="/bin/msmtp --read-envelope-from" set use_from=yes set reverse_name set envelope_from=no # special case for lists, where we aren't explicitly on the to/cc headers reply-hook . 'unmy_hdr From:' reply-hook '~h"Delivered-To: asdf@gmail\.com"' my_hdr from: asdf@gmail.com reply-hook '~h"Delivered-To: xyz@stuff\.com"' my_hdr from: xyz@stuff.com ``` While that may not be the most elegant solution, at least it works. On the notmuch side I just use a after sync script containing all the tagging ``` #first put all in the inbox notmuch tag +inbox -- tag:new #temporary tag which will be removed at the end for email in ${own_adresses[@]}; do notmuch tag +to_me -- "to:${email} and tag:new" done for email in ${own_adresses[@]}; do notmuch tag +sent -- "from:${email} and tag:new" done # then remove all the non inbox stuff one by one # filter stuff we sent from the inbox if it isn't a self message notmuch tag -inbox -- tag:sent and not tag:to_me notmuch tag -inbox +lists +notmuch -- to:notmuch and tag:new # kill muted threads notmuch search --output=threads tag:muted | xargs -r -n1 notmuch tag +muted #get rid of old clutter from mailing lists notmuch tag +archive -- tag:lists and date:..30d and not tag:unread #archived stuff should not be unread notmuch tag -unread -- tag:unread and tag:archive #finally remove the temporary tags notmuch tag -new -to_me -- tag:new ``` Stuff like that... Does this help? Greetings, Reto