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 B3D356DE012F for ; Tue, 19 Jul 2016 04:49:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] 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 Pzz7h-PNYiNE for ; Tue, 19 Jul 2016 04:49:32 -0700 (PDT) X-Greylist: delayed 512 seconds by postgrey-1.35 at arlo; Tue, 19 Jul 2016 04:49:32 PDT Received: from vitrine.ns305973.chezlefab.net (chezlefab.net [91.121.242.52]) by arlo.cworth.org (Postfix) with ESMTP id 9E3ED6DE015B for ; Tue, 19 Jul 2016 04:49:32 -0700 (PDT) Received: by vitrine.ns305973.chezlefab.net (Postfix, from userid 1001) id 0BA401030E6; Tue, 19 Jul 2016 13:42:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=chadok.info; s=mail; t=1468928535; bh=eQ1AYPFYGICrt8Zxspwv7dwKo8voQJtHK1dPpOgZMHA=; h=Date:From:To:Subject:References:In-Reply-To:From; b=KDaDDke+zZy2tZ+KtExiNGZr/sKvFJNnq18r0dHY7PGZBTawweIguc34zwKjm3zKu jE/kPlN7b9uI+fitgzLvMT9NGsB+wwsRTZ/fbDtbie1f3E4jN/fBE4XflruV+QwGs0 Y9ZqObjTW0cpkBECGrNF8ll3XGzW82gV41zi54CM= Date: Tue, 19 Jul 2016 13:42:14 +0200 From: Olivier Schwander To: notmuch@notmuchmail.org Subject: Re: Avoiding the "huge INBOX of death" Message-ID: <20160719114214.cp3l7crruy2y4l4h@vitrine> References: <20160719094205.qmf5sjnja6crt5t3@gotlib> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160719094205.qmf5sjnja6crt5t3@gotlib> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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, 19 Jul 2016 11:49:41 -0000 Le 19 Jul 2016 11:42, Raphaël Fournier-S'niehotta a écrit: > Hello fellow notmuchers, > > I am a longtime "classic" mutt user, willing to switch to a notmuch-based > solution (probably neomutt). However, as far as I understand, I will have to > deal with a "huge INBOX of death", as put by Anarcat in a recent blog post [1], > that when all emails remain in a single maildir, which may the become very > large. > > I would like to avoid this, for quota reasons on my work imap server first, and > also because I sometimes have to use webmail access, with poor searching > capabilities. > > Thus, I think I need to have my emails sorted into maildir folders according to > the notmuch tags. Namely, emails with the "inbox" tag should stay in the INBOX > maildir, those with "archive" should be moved to Archives (all synchronized with > the server). As a bonus, it would be great to have a few more features, like > "mails in Archives older than 6 months are moved to Archives/" (kept > locally and not stored on the server). > > As far as I understand, "afew" and its MailMover feature could be useful for my > case, but it does not seem currently maintained (plus, very few mentions of it > on the notmuch archives) and Michael Turquette said it's buggy [2], so I would > like more feedback to be sure before letting it mess with my maildir. > > Another tool that could be useful is the "maildir-notmuch-sync" script written > by Ethan Schoonover and adapted by Michael Turquette [3]. However, it seems > dedicated to handling the synchronization of Gmail labels, not a generic imap > server hierarchy. > > Perhaps there is another solution to deal with this in a notmuch-based setup, I > would very much like any of your feedback. > > [1]: https://anarc.at/blog/2016-05-12-email-setup/ > [2]: http://deferred.io/2016/01/17/state-of-the-dotfiles.html > [3]: http://deferred.io/2016/01/18/notmuch-tags-gmail-labels-bidirectional-sync.html You could use fdm [1] to store messages into a folder hierarchy based on the date in the messages. In the past, I used something like that to periodically move messages in my inbox to sub-folder with the year: account "archives" disabled maildirs { "${mailpath}INBOX" } action "archive" maildir "${mailpath}%[maildir]/%[mail_year]" match account "archives" { match age > 6 months action "archive" match all action keep } Nowadays, I use a custom script [2] to mirror some notmuch queries to maildirs (ran periodically in my crontab), such like: notmuch-imap.sh ~/Maildir/ NOT tag:archive AND NOT tag:killed AND NOT tag:spam AND tag:inbox notmuch-imap.sh ~/Maildir/.todo NOT tag:archive AND NOT tag:killed AND NOT tag:spam AND tag:todo Both solutions works server-side, since I control my own mail server but it may probably used in an offlineimap hook. Best, Olivier [1]: https://github.com/nicm/fdm [2]: https://chadok.info/~oschwand/poubelle/e53f1d9ac30909fd17ca98f4160375bbc9a6aca5/notmuch-imap.sh.html