Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Cameron Simpson
On 30Sep2020 15:20, Sam Kuper  wrote:
>On Wed, Sep 30, 2020 at 02:18:08PM +0100, Chris Green wrote:
>> Absolutely no problem, is there a place to put them on mutt.org? [..]
>> I keep the code in mercurial [..]
>
>Best bet would probably be to:
>
>1. Upload the files to a code hosting repository: gitlab.com;
>sourcehut.org; notabug.org; or similar.  (Sourcehut.org supports
>Mercurial directly; I think the others only support Git.)

Aye. I use Mercurial too. My primary publication site is sourcehut, but 
I maintain git mirrors on github and bitbucket (I used to use bitbucket 
before they dropped Mercurial and I like their commit history view).

So: sourcehut is the easiest place: https://hg.sr.ht/

If you want to publish to a git-based site there's the hg-git extension, 
which works fine but relies on bookmarks, which must have distinct names 
from your branch names. I've got a script hg-gitup which will push your 
branch names up instead (still uses the hg-git extension for maintaining 
the git state, but pushes with git to avoid the naming issue):

  https://hg.sr.ht/~cameron-simpson/css/browse/bin/hg-gitup?rev=tip

Cheers,
Cameron Simpson 


Re: Getting more useful information in file browser - possible with maildir?

2020-09-30 Thread Derek Martin
On Wed, Sep 30, 2020 at 02:21:22PM +0100, Chris Green wrote:
> On Tue, Sep 29, 2020 at 09:49:52AM -0500, Derek Martin wrote:
> > On Tue, Sep 29, 2020 at 08:30:42AM +0100, Chris Green wrote:
> > > The same place in a mbox hierarchy shows me the size of the maibox and
> > > the date of the last change.
> > 
> > You're looking at this all wrong.  It's purely a side effect of how
> > the mailbox abstraction is represented: you get that only because they
> > just happen to be files--exactly what the file browser was meant to
> > handle.
> > 
> "I'm" a user! :-)  I want the information I used to get.  That it's
> "purely a side effect" of some technical change is unipoortant to the
> user.  Yes, with my techie hat on I understand why it is, but I can
> also see that there are ways to get the information I want, albeit
> with some more code.

It's not just more code, it's expensive code, at least in some cases.
Without reviewing the messages to get the exact details, I think some
of what you want is doable, and some is really not.

Some of it really isn't Mutt's purview, per se--it's your MDA's
purview.  I can't say why Christian gets dates and proper sorting on
his mail folder directories and you're not; that would take some
investigation.  I could guess that it might be that maildir-aware MDAs
update the utimes on the folder directory when it delivers a file...
and even if it's not that, you could do that in your MDA with
os.utime(), which should force the issue.

Recursively calculating the space used by the mail folder, on the
other hand... just no. =8^)

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



signature.asc
Description: PGP signature


Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Kevin J. McCarthy

On Wed, Sep 30, 2020 at 04:50:19PM +0100, Chris Green wrote:

On Wed, Sep 30, 2020 at 03:20:50PM +0100, Sam Kuper wrote:

2. Having done that, I guess you could (subject to Kevin McCarthy's
approval - he's the Mutt maintainer and I can't speak for him) perhaps
edit https://gitlab.com/muttmua/mutt/-/wikis/ConfigTricks to add a
sentence or two describing your tools and linking to the hosted version
of them that you created in the previous step.


What does the (mutt) world think about doing this?  I'm happy to do it
if there's a lot of interest but if only a few are interested then
I'll just leave at putting them up here as attachments (as I have done).


The wiki is for the community; it's just an unfortunate limitation of 
GitLab's wiki permissions that I can't open editing up wider for now.


If you would like to add a link and blurb, either open a ticket, or 
clone the git repos  and open a Merge 
Request.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Chris Green
On Wed, Sep 30, 2020 at 03:20:50PM +0100, Sam Kuper wrote:
> On Wed, Sep 30, 2020 at 02:18:08PM +0100, Chris Green wrote:
> > On Wed, Sep 30, 2020 at 12:03:41PM +0100, Sam Kuper wrote:
> >> On Tue, Sep 29, 2020 at 08:13:14AM +0100, Chris Green wrote:
> >>> On Mon, Sep 28, 2020 at 05:48:38PM -0500, Derek Martin wrote:
>  I confess to some curiosity here...  What are you doing in your
>  home-grown MDA
> >>>
> >>> It's all driven from one text file so that when I subscribe to a new
> >>> mailing list all I have to do is add an entry to that file.
> >> 
> >> Nice!  If you would be willing to publish/share the Python files
> >> (under a Free Software license), that would be great :)
> >
> > Absolutely no problem, is there a place to put them on mutt.org? [..]
> > I keep the code in mercurial [..]
> 
> Best bet would probably be to:
> 
> 1. Upload the files to a code hosting repository: gitlab.com;
> sourcehut.org; notabug.org; or similar.  (Sourcehut.org supports
> Mercurial directly; I think the others only support Git.)
> 
> 2. Having done that, I guess you could (subject to Kevin McCarthy's
> approval - he's the Mutt maintainer and I can't speak for him) perhaps
> edit https://gitlab.com/muttmua/mutt/-/wikis/ConfigTricks to add a
> sentence or two describing your tools and linking to the hosted version
> of them that you created in the previous step.
> 
What does the (mutt) world think about doing this?  I'm happy to do it
if there's a lot of interest but if only a few are interested then
I'll just leave at putting them up here as attachments (as I have done).

-- 
Chris Green


Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Chris Green
On Wed, Sep 30, 2020 at 03:20:50PM +0100, Sam Kuper wrote:
> On Wed, Sep 30, 2020 at 02:18:08PM +0100, Chris Green wrote:
> 
> > I've attached them here anyway.
> 
> Thanks :)  Would you be willing to mention a license?
> 
> Without a license, your scripts are technically non-free software, i.e.
> others don't have the right to distribute them, modify them, or share
> their modifications.
> 
> I'd suggest AGPLv3 as a good default Free Software license
> https://www.gnu.org/licenses/license-list.html#AGPLv3.0 ; but given that
> these are small (<300LOC) programs, you might prefer a "pushover"
> license like Apache v2:
> https://www.gnu.org/licenses/license-recommendations.html#small
> https://www.gnu.org/licenses/license-list.html#apache2 .
> 
OK, I've gone with Apache v2, attached again here.

-- 
Chris Green
#!/usr/bin/python3
#
#
# licenseApache v2 (http://www.apache.org/licenses/LICENSE-2.0) 
# author Chris Green - ch...@isbd.co.uk
# 
#
#
# Mail filtering script
#
import mailbox
import os
import sys
import time
import mailLib
import shlex
#
#
# Redirect any exceptions to a file
#
sys.stderr = open("/home/chris/tmp/mail.err", 'a')
#
#
# Some constants (i.e. configuration)
#
home = "/home/chris"
logfile = home + "/tmp/mail.log"
filtfile = home + "/.mutt/filter"
mldir = home + "/mail/"
indir = mldir + "In/"
judir = mldir + "Ju/"
#
#
# Set to log to mail.log in ~/tmp with name 'filter' and the envelope/from
#
log = mailLib.initLog("filter")
#
#
# Initialise destination mailbox name to empty
#
dest = ""
#
#
# Read the message from standard input and make a message object from it
#
msg = mailbox.MaildirMessage(sys.stdin.buffer.read())
#
#
# Extract the To:, Cc: and Subject: headers and the envelope/from
#
msgcc = msg.get("Cc", "unknown").lower()
msgto = msg.get("To", "unknown").lower()
msgsb = msg.get("Subject", "unknown")
msgfm = msg.get("From", "unknown").lower()
#
#
# See if it's in our filter file
#
f = open(filtfile, 'r')
for ln in f:# for each line in filter
if ln[0] == '#':# ignore comments
continue
#
#
# split the line into fields, shlex.split() does quoted strings, add a field
# to create a dummy fourth field if there isn't one in the filter file
#
fld = shlex.split(ln)
fld.append("")
#
#
# copy the fields into better named variables
#
nm = fld[0] # name/alias
dd = fld[1] + "/"   # destination directory
tocc = fld[2].lower()   # list address
sbstrip = '[' + fld[3] + ']'# string to match in and/or strip out of subject
#
#
# see if the filter To/CC column matches the message To: or Cc: or if sbstrip is in Subject:
#
if (tocc in msgcc or tocc in msgto or sbstrip in msgsb):
#
#
# set the destination directory
#
dest = mldir + dd + nm
#
#
# Strip out list name (4th field) from subject if it's there
#
if sbstrip in msgsb:
msg.replace_header("Subject", msgsb.replace(sbstrip, ''))
#
#
# we've found a match so assume we won't get another
#
break
#
#
# if destination mb name hasn't been set yet then set to In/default
# (mail with 'chris' in destination will get to 'inbox')
#
if dest == "":
dest = indir + "default"

mailLib.deliverMdMsg(dest, msg, log)
#!/usr/bin/python
#
#
# licenseApache v2 (http://www.apache.org/licenses/LICENSE-2.0) 
# author Chris Green - ch...@isbd.co.uk
# 
import sys
#
#
#
#
home = "/home/chris"
filtfile = home + "/.mutt/filter"
#
#
# Get mailing lists from filter file
#
f = open(filtfile, 'r')
for ln in f:
if ln[0] == '#':# ignore comments
continue
#
#
# split the line into fields
#
fld = ln.split()
tocc = fld[2]

if (":x" in fld[1]):
continue
sys.stdout.write("alias ")
sys.stdout.write(fld[0] + " ")
sys.stdout.write(tocc + "\n")
#!/usr/bin/python
#
#
# licenseApache v2 (http://www.apache.org/licenses/LICENSE-2.0) 
# author Chris Green - ch...@isbd.co.uk
# 
import sys
#
#
#
#
home = "/home/chris"
filtfile = home + "/.mutt/filter"

#
#
# Get mailing lists from filter file
#
f = open(filtfile, 'r')
for ln in f:
if ln[0] == '#':# ignore comments
continue
#
#
# split the line into fields
#
fld = ln.split()
if (fld[1][0:4] == "Li:x"):
continue# don't output if there's an x flag
if (fld[1][0:2] == "Li"):
sys.stdout.write(fld[2] + " ")# output the list address
#
#
# licenseApache v2 (http://www.apache.org/licenses/LICENSE-2.0) 
# author Chris Green - ch...@isbd.co.uk
# 
import mailbox
import logging
import logging.handlers
import os
import time
#
#
# log a message
#
def initLog(name):
log = logging.getLogger(name)
log.setLevel(logging.DEBUG)
f = logging.handlers.RotatingFileHandler("/home/chris/tmp/mail

Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Sam Kuper
On Wed, Sep 30, 2020 at 02:18:08PM +0100, Chris Green wrote:
> On Wed, Sep 30, 2020 at 12:03:41PM +0100, Sam Kuper wrote:
>> On Tue, Sep 29, 2020 at 08:13:14AM +0100, Chris Green wrote:
>>> On Mon, Sep 28, 2020 at 05:48:38PM -0500, Derek Martin wrote:
 I confess to some curiosity here...  What are you doing in your
 home-grown MDA
>>>
>>> It's all driven from one text file so that when I subscribe to a new
>>> mailing list all I have to do is add an entry to that file.
>> 
>> Nice!  If you would be willing to publish/share the Python files
>> (under a Free Software license), that would be great :)
>
> Absolutely no problem, is there a place to put them on mutt.org? [..]
> I keep the code in mercurial [..]

Best bet would probably be to:

1. Upload the files to a code hosting repository: gitlab.com;
sourcehut.org; notabug.org; or similar.  (Sourcehut.org supports
Mercurial directly; I think the others only support Git.)

2. Having done that, I guess you could (subject to Kevin McCarthy's
approval - he's the Mutt maintainer and I can't speak for him) perhaps
edit https://gitlab.com/muttmua/mutt/-/wikis/ConfigTricks to add a
sentence or two describing your tools and linking to the hosted version
of them that you created in the previous step.


> I've attached them here anyway.

Thanks :)  Would you be willing to mention a license?

Without a license, your scripts are technically non-free software, i.e.
others don't have the right to distribute them, modify them, or share
their modifications.

I'd suggest AGPLv3 as a good default Free Software license
https://www.gnu.org/licenses/license-list.html#AGPLv3.0 ; but given that
these are small (<300LOC) programs, you might prefer a "pushover"
license like Apache v2:
https://www.gnu.org/licenses/license-recommendations.html#small
https://www.gnu.org/licenses/license-list.html#apache2 .

-- 
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.


Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Patrick Shanahan
* Chris Green  [09-30-20 09:18]:
> On Wed, Sep 30, 2020 at 12:03:41PM +0100, Sam Kuper wrote:
> > On Tue, Sep 29, 2020 at 08:13:14AM +0100, Chris Green wrote:
> > > On Mon, Sep 28, 2020 at 05:48:38PM -0500, Derek Martin wrote:
> > >> I confess to some curiosity here...  What are you doing in your
> > >> home-grown MDA, that you could not already do with procmail, which
> > >> (if you're on a Linux system at least) your mail system is most
> > >> likely already using to deliver your mail?
> > >
> > > It's all driven from one text file so that when I subscribe to a new
> > > mailing list all I have to do is add an entry to that file.  No
> > > changing of procmail rules, no additions to muttrc.  I have attached
> > > the filter file to this message, the comments explain it at least as
> > > well as I can here. [..]
> > >
> > > # Mail filterfile, used to generate Mutt aliases and for filtering
> > > # mail into mailboxes, it's used by:-
> > > #   getAliases.py - generates mutt aliases for the mailing lists
> > > #   getLists.py - generates list names for mutt 'subscribe' and
> > > #   'lists' commands
> > > #   filter.py - called by .forward, delivers mail to appropriate
> > > #   mail box
> > 
> > Nice!  If you would be willing to publish/share the Python files (under
> > a Free Software license), that would be great :)
> > 
> Absolutely no problem, is there a place to put them on mutt.org?  I've
> attached them here anyway.  I've recently upgraded them to Python 3
> and, of course, to maildir.  If anyone wants the mbox versions I could
> probably provide them as I keep the code in mercurial.

I would appreciate seeing the mbox version(s).

tks

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode


Re: Getting more useful information in file browser - possible with maildir?

2020-09-30 Thread Chris Green
On Tue, Sep 29, 2020 at 09:49:52AM -0500, Derek Martin wrote:
> On Tue, Sep 29, 2020 at 08:30:42AM +0100, Chris Green wrote:
> > I have 'set folder_format="%N %-32.32f %m %n"'.  I did have a date as
> > well but all that shows is 'Sep 25' the date of creation of the
> > maildir which is no use at all, it's just the date that the maildir was
> > created nothing to do with the dates of mail inside tne maildir.
> 
> Yup.
> 
> > The same place in a mbox hierarchy shows me the size of the maibox and
> > the date of the last change.
> 
> You're looking at this all wrong.  It's purely a side effect of how
> the mailbox abstraction is represented: you get that only because they
> just happen to be files--exactly what the file browser was meant to
> handle.
> 
"I'm" a user! :-)  I want the information I used to get.  That it's
"purely a side effect" of some technical change is unipoortant to the
user.  Yes, with my techie hat on I understand why it is, but I can
also see that there are ways to get the information I want, albeit
with some more code.

-- 
Chris Green


Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Chris Green
On Wed, Sep 30, 2020 at 12:03:41PM +0100, Sam Kuper wrote:
> On Tue, Sep 29, 2020 at 08:13:14AM +0100, Chris Green wrote:
> > On Mon, Sep 28, 2020 at 05:48:38PM -0500, Derek Martin wrote:
> >> I confess to some curiosity here...  What are you doing in your
> >> home-grown MDA, that you could not already do with procmail, which
> >> (if you're on a Linux system at least) your mail system is most
> >> likely already using to deliver your mail?
> >
> > It's all driven from one text file so that when I subscribe to a new
> > mailing list all I have to do is add an entry to that file.  No
> > changing of procmail rules, no additions to muttrc.  I have attached
> > the filter file to this message, the comments explain it at least as
> > well as I can here. [..]
> >
> > # Mail filterfile, used to generate Mutt aliases and for filtering
> > # mail into mailboxes, it's used by:-
> > #   getAliases.py - generates mutt aliases for the mailing lists
> > #   getLists.py - generates list names for mutt 'subscribe' and
> > #   'lists' commands
> > #   filter.py - called by .forward, delivers mail to appropriate
> > #   mail box
> 
> Nice!  If you would be willing to publish/share the Python files (under
> a Free Software license), that would be great :)
> 
Absolutely no problem, is there a place to put them on mutt.org?  I've
attached them here anyway.  I've recently upgraded them to Python 3
and, of course, to maildir.  If anyone wants the mbox versions I could
probably provide them as I keep the code in mercurial.



-- 
Chris Green
#!/usr/bin/python3
#
#
# Mail filtering script
#
import mailbox
import os
import sys
import time
import mailLib
import shlex
#
#
# Redirect any exceptions to a file
#
sys.stderr = open("/home/chris/tmp/mail.err", 'a')
#
#
# Some constants (i.e. configuration)
#
home = "/home/chris"
logfile = home + "/tmp/mail.log"
filtfile = home + "/.mutt/filter"
mldir = home + "/mail/"
indir = mldir + "In/"
judir = mldir + "Ju/"
#
#
# Set to log to mail.log in ~/tmp with name 'filter' and the envelope/from
#
log = mailLib.initLog("filter")
#
#
# Initialise destination mailbox name to empty
#
dest = ""
#
#
# Read the message from standard input and make a message object from it
#
msg = mailbox.MaildirMessage(sys.stdin.buffer.read())
#
#
# Extract the To:, Cc: and Subject: headers and the envelope/from
#
msgcc = msg.get("Cc", "unknown").lower()
msgto = msg.get("To", "unknown").lower()
msgsb = msg.get("Subject", "unknown")
msgfm = msg.get("From", "unknown").lower()
#
#
# See if it's in our filter file
#
f = open(filtfile, 'r')
for ln in f:# for each line in filter
if ln[0] == '#':# ignore comments
continue
#
#
# split the line into fields, shlex.split() does quoted strings, add a field
# to create a dummy fourth field if there isn't one in the filter file
#
fld = shlex.split(ln)
fld.append("")
#
#
# copy the fields into better named variables
#
nm = fld[0] # name/alias
dd = fld[1] + "/"   # destination directory
tocc = fld[2].lower()   # list address
sbstrip = '[' + fld[3] + ']'# string to match in and/or strip out of subject
#
#
# see if the filter To/CC column matches the message To: or Cc: or if sbstrip is in Subject:
#
if (tocc in msgcc or tocc in msgto or sbstrip in msgsb):
#
#
# set the destination directory
#
dest = mldir + dd + nm
#
#
# Strip out list name (4th field) from subject if it's there
#
if sbstrip in msgsb:
msg.replace_header("Subject", msgsb.replace(sbstrip, ''))
#
#
# we've found a match so assume we won't get another
#
break
#
#
# if destination mb name hasn't been set yet then set to In/default
# (mail with 'chris' in destination will get to 'inbox')
#
if dest == "":
dest = indir + "default"

mailLib.deliverMdMsg(dest, msg, log)
#!/usr/bin/python
import sys
#
#
#
#
home = "/home/chris"
filtfile = home + "/.mutt/filter"
#
#
# Get mailing lists from filter file
#
f = open(filtfile, 'r')
for ln in f:
if ln[0] == '#':# ignore comments
continue
#
#
# split the line into fields
#
fld = ln.split()
tocc = fld[2]

if (":x" in fld[1]):
continue
sys.stdout.write("alias ")
sys.stdout.write(fld[0] + " ")
sys.stdout.write(tocc + "\n")
#!/usr/bin/python
import sys
#
#
#
#
home = "/home/chris"
filtfile = home + "/.mutt/filter"

#
#
# Get mailing lists from filter file
#
f = open(filtfile, 'r')
for ln in f:
if ln[0] == '#':# ignore comments
continue
#
#
# split the line into fields
#
fld = ln.split()
if (fld[1][0:4] == "Li:x"):
continue# don't output if there's an x flag
if (fld[1][0:2] == "Li"):
sys.stdout.write(fld[2] + " ")# 

Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Sam Kuper
On Tue, Sep 29, 2020 at 08:13:14AM +0100, Chris Green wrote:
> On Mon, Sep 28, 2020 at 05:48:38PM -0500, Derek Martin wrote:
>> I confess to some curiosity here...  What are you doing in your
>> home-grown MDA, that you could not already do with procmail, which
>> (if you're on a Linux system at least) your mail system is most
>> likely already using to deliver your mail?
>
> It's all driven from one text file so that when I subscribe to a new
> mailing list all I have to do is add an entry to that file.  No
> changing of procmail rules, no additions to muttrc.  I have attached
> the filter file to this message, the comments explain it at least as
> well as I can here. [..]
>
> # Mail filterfile, used to generate Mutt aliases and for filtering
> # mail into mailboxes, it's used by:-
> #   getAliases.py - generates mutt aliases for the mailing lists
> #   getLists.py - generates list names for mutt 'subscribe' and
> #   'lists' commands
> #   filter.py - called by .forward, delivers mail to appropriate
> #   mail box

Nice!  If you would be willing to publish/share the Python files (under
a Free Software license), that would be great :)

-- 
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.


Re: Can mutt be persuaded to use a sensible maildir hierarchy?

2020-09-30 Thread Sam Kuper
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.