Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AA54D431FB6 for ; Mon, 10 Dec 2012 06:27:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.202 X-Spam-Level: * X-Spam-Status: No, score=1.202 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g3vr1kz25lOx for ; Mon, 10 Dec 2012 06:27:20 -0800 (PST) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5EB38431FAF for ; Mon, 10 Dec 2012 06:27:20 -0800 (PST) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ti4KP-00049U-IW for notmuch@notmuchmail.org; Mon, 10 Dec 2012 15:27:29 +0100 Received: from arn78-1-88-186-171-7.fbx.proxad.net ([88.186.171.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Dec 2012 15:27:29 +0100 Received: from R.M.Krug by arn78-1-88-186-171-7.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Dec 2012 15:27:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: notmuch@notmuchmail.org From: Rainer M Krug Subject: Re: OT: Sorting emails in maildir? Date: Mon, 10 Dec 2012 15:27:04 +0100 Lines: 66 Message-ID: <50C5F138.9080108@gmail.com> References: <20121210113922.GE3507@sid.nuvreauspam> <50C5CE45.5060701@gmail.com> <20121210134022.GB6462@sid.nuvreauspam> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arn78-1-88-186-171-7.fbx.proxad.net User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <20121210134022.GB6462@sid.nuvreauspam> X-Enigmail-Version: 1.5a1pre Cc: public-notmuch-gxuj+Tv9EO5zyzON3hdc1g@plane.gmane.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Mon, 10 Dec 2012 14:27:22 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/12/12 14:40, Andrei POPESCU wrote: > On Lu, 10 dec 12, 12:57:57, Rainer M Krug wrote: >> On 10/12/12 12:39, Andrei POPESCU wrote: >>> On Lu, 10 dec 12, 12:30:32, Rainer M Krug wrote: >>>> Hi >>>> >>>> This is slightly offtopic, but I would like to move all emails in a Maildir folder into >>>> an Archive folder. What is the easiest way of doing this? I assume I ave to do this >>>> outside notmuch, but is there an easy way? I have 250 000 emails on my gmail account, and >>>> this is slowing many things down. >>>> >>>> Any suggestions? >>> >>> mv? >> >> I found >> >> notmuch search --output=files $(date +%s -d 2010-01-01)..$(date +%s -d 2010-12-31) >> >> and how I can create a maildir (http://plasmasturm.org/log/81/) >> >> So now I have to pipe the result from the notmuch command above to mv and move it to >> $MAILDIR/ARCHIVE.2010/cur >> >> Is this correct? How can I do this? > > Above you wrote "all emails in a Maildir", which is why I suggested 'mv'. For a more complex > operation I would use my usual mail client (mutt in my case). Sorry - I have forgotten the part "from one year". But I found a solution: notmuch search [...] | xargs -0 -I {} mv {} ~/rkrug/Maildir/Archive/2009/cur $ notmuch search --output=files $(date +%s -d 2009-01-01)..$(date +%s -d 2009-31-12) | xargs -0 -I {} mv {} ~/rkrug/Maildir/Archive/2009/cur to move all emails from 2009 into the maildir Maildir/Archive/2009 I though about using mutt or , but I am using usually thunderbird and notmuch for searching and occasionally answering emails and archiving. So mutt is not that straight forward to me. Thanks, Rainer > > Kind regards, Andrei > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlDF8TcACgkQoYgNqgF2egqbqwCeMggEjTBTn9eiqkiN9EI77EH5 3LsAnj2GWjrri2WFl6SkBXIGCqeJGTbC =2iOX -----END PGP SIGNATURE-----