From: Tomi Ollila Date: Fri, 24 Oct 2014 14:47:23 +0000 (+0300) Subject: mboxvievfs X-Git-Url: http://git.tremily.us/?p=notmuch-archives.git;a=commitdiff_plain;h=b3fde8b63c562039ecbac020999bd18c42956307 mboxvievfs --- diff --git a/e1/690e4271a7326cf0152254927e41ae903ba0a2 b/e1/690e4271a7326cf0152254927e41ae903ba0a2 new file mode 100644 index 000000000..9572c1516 --- /dev/null +++ b/e1/690e4271a7326cf0152254927e41ae903ba0a2 @@ -0,0 +1,153 @@ +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 CF694431FC9 + for ; Fri, 24 Oct 2014 07:47:58 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 oUoCg5UBExQh for ; + Fri, 24 Oct 2014 07:47:49 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 9782D431FBD + for ; Fri, 24 Oct 2014 07:47:49 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id A0A8C10008C + for ; Fri, 24 Oct 2014 17:47:23 +0300 (EEST) +From: Tomi Ollila +To: +Subject: mboxvievfs +User-Agent: Notmuch/0.18.1+130~ga61922f (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +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: Fri, 24 Oct 2014 14:47:59 -0000 + +Hi + +mboxviewfs is a FUSE filesystem program which shows mbox file +as a separate files under YYYY-MM directories in a mountpoint. + +example usage transcript: + +$ cd ~ +$ mkdir notmuchmailbox +$ cd notmuchmailbox + +$ wget https://raw.githubusercontent.com/domo141/nottoomuch/master/mboxview= +fs.c +... +2014-10-24 17:23:33 (524 KB/s) - =E2=80=98mboxviewfs.c=E2=80=99 saved [3196= +6/31966] + +$ sh mboxviewfs.c ++ exec gcc -std=3Dc99 -Wall -Wno-long-long -Wstrict-prototypes -pedantic -W= +cast-align -Wpointer-arith -W -Wwrite-strings -Wcast-qual -Wshadow -O2 -o m= +boxviewfs mboxviewfs.c -D_FILE_OFFSET_BITS=3D64 -isystem /usr/include/fuse = +-pthread -lfuse + +$ wget -c http://notmuchmail.org/archives/notmuch.mbox +$ mkdir notmuch +$ ./mboxviewfs notmuch.mbox notmuch +$ find notmuch -ls +$ find notmuch | xargs stat -c '%x %n' + +$ wget -c http://notmuchmail.org/archives/notmuch.mbox +$ fusermount -u notmuch +$ ./mboxviewfs notmuch.mbox notmuch + +$ mkdir bin +$ echo '#!/bin/sh' > bin/notmuch +$ echo "HOME=3D$HOME/notmuchmailbox; export HOME" >> bin/notmuch +$ echo "exec \"`which notmuch`\" \"\$@\"" >> bin/notmuch +$ chmod 755 bin/notmuch + +$ mkdir mail +$ mkdir mail/notmuch +$ cd mail/notmuch +$ : symbolic links to mail directories +$ for d in ../../notmuch/*; do test -d "$d" || continue; ln -s "$d" .; done +$ ls -l +$ cd ../.. + +$ ./bin/notmuch setup ;: careful here, to run ./bin/notmuch '!!!' +$ ./bin/notmuch new + +Found 19424 total files (that's not much mail). +Warning: /home/too/notmuchmailbox/mail/notmuch/2009-11/000002e4 is an mbox = +containing a single message, +likely caused by misconfigured mail delivery. Support for single-message +mboxes is deprecated and may be removed in the future. +Processed 19424 total files in 1m 21s (239 files/sec.). +Added 19414 new messages to the database. + +$ ./bin/notmuch count=20 +19414 + +$ find notmuch -type f | wc + 19424 19424 485600 + +$ : have to look that difference later... + +$ PATH=3D$PWD/bin:$PATH emacs -f notmuch=20 + + 19 414 inbox 19 414 unread 40 unread-1d + +C-x C-c + +$ fusermount -u notmuch + +$ ./bin/notmuch count +19414 + +$ ./bin/notmuch new +Error reading file /home/too/notmuchmailbox/mail/notmuch/2009-11: No such f= +ile or directory +No new mail. +Note: A fatal error was encountered: Something went wrong trying to read or= + write a file +zsh: exit 1 ./bin/notmuch new + +$ wget -c http://notmuchmail.org/archives/notmuch.mbox +$ ./mboxviewfs notmuch.mbox notmuch +$ ./bin/notmuch new +Warning: /home/too/notmuchmailbox/mail/notmuch/2014-10/00004be0 is an mbox = +containing a single message, +likely caused by misconfigured mail delivery. Support for single-message +mboxes is deprecated and may be removed in the future. +Processed 1 file in almost no time. +Added 1 new message to the database. + +$ ./bin/notmuch count +19415 + +---8<--- + +Next: to set nmbug to this system... + + +Tomi