On Wed, Sep 23, 2020 at 09:04:11AM +0100, Chris Green wrote: > On Wed, Sep 23, 2020 at 09:44:22AM +1000, raf wrote: >> On Tue, Sep 22, 2020 at 06:30:52PM +0100, Chris Green wrote: >>> On Tue, Sep 22, 2020 at 05:46:53PM +0100, Chris Green wrote: >>>> Is there some way I can get to use real directories to represent my >>>> hierarchy of mail?
>From more recent emails in this thread, I see that you answered (in the affirmative) your question above. Still, for sake of completeness/posterity. >>>> I manually rearrange my mail sometimes and to >>>> deal with very long directory names isn't really practical. For >>>> example I might decide to move mail as follows:- >>>> >>>> ~/Mail/folder/travel/zelmaFrance >>>> >>>> to >>>> >>>> ~/Mail/folder/travel/france/zelma >>>> >>>> With real directories such a move isn't too difficult but with the >>>> default maildir naming it becomes painful. Painful how? >>>> Some software I believe does work the way I want with maildir but >>>> the dotted hierarchy seems to be becoming the standard. Is there >>>> no way round this? I'd really like to move to maildir but I really >>>> can't see it being practical for me as it is. >>>> >>> I just run mb2md on my existing mail folders, I ended up with a >>> single directory (~/Maildir) containing 2354 files mostly with >>> ridiculously long names! This just isn't a sensible way to organise >>> my mail. >> >> I might be talking nonsense, but that maildir hierarchy probably is >> the correct thing, as defined by whoever came up with it, and is what >> is needed for all(?) mail software that deals with maildir to work. IIRC: - Maildir was invented by Daniel J. Bernstein, author of the Qmail MTA. - Maildir++, which extends Maildir, was invented by Sam Varshavchik, author of the Courier MTA. I may be wrong, but I believe that with Mutt you can use either Maildir or Maildir++ as you prefer. >> But if you want to manipulate the hierarchy separately from mail >> software, and still have all mail software work correctly, you might >> be able to implement (or convince someone to implement) a userspace >> fuse file system that provides an alternative view of the real >> maildir file system, that can be mounted alongside the real maildir >> directory. Then, whatever mail software you want to use can work with >> the real maildir hierarchy, and you can manipulate it in the way you >> want outside of mail software. I have no idea how much effort would >> be involved in such a fuse file system, though. Creating a FUSE overlay is probably substantially more effort than using an existing tool designed for the task, e.g. an MDA such as: - Procmail - Maildrop (part of Sam Varshavchik's suite of Courier-related software) - Sieve (there are various implementations, of which Dovecot's is perhaps the most widely used; but installing Dovecot is probably overkill for a client machine rather than a server, so Procmail or Maildrop might be better choices) > The only things dealing with the maildirs are my own mail filter > written in Python and mutt, nothing else. Python should be able to handle Maildir and Maildir++ equally well: Maildir is a directory-based mailbox format invented for the qmail mail transfer agent and now widely supported by other programs. Messages in a Maildir mailbox are stored in separate files within a common directory structure. This design allows Maildir mailboxes to be accessed and modified by multiple unrelated programs without data corruption, so file locking is unnecessary. [..] Folders of the style introduced by the Courier mail transfer agent are also supported. Any subdirectory of the main mailbox is considered a folder if '.' is the first character in its name. Folder names are represented by Maildir without the leading '.'. Each folder is itself a Maildir mailbox but should not contain other folders. Instead, a logical nesting is indicated using '.' to delimit levels, e.g., "Archived.2005.07". Source: https://docs.python.org/3.8/library/mailbox.html#mailbox.Maildir > Way back when maildir first appeared and I used qmail the way I want > things to work was the way it *did* work. It's the maildir++ thing > that's broken it. I don't think anyone in the Mutt camp is forcing anyone else to use Maildir++. So, if someone wants to use Qmail-style Maildir with Mutt, the thing for them to do is probably to give it a try and maybe post on the mailing list (or file a bug report) in case of specific problems. Glad you got it working to your satisfaction in the end :) -- A: When it messes up the order in which people normally read text. Q: When is top-posting a bad thing? () ASCII ribbon campaign. Please avoid HTML emails & proprietary /\ file formats. (Why? See e.g. https://v.gd/jrmGbS ). Thank you.