On Mon, Sep 28, 2020 at 05:48:38PM -0500, Derek Martin wrote:
> On Fri, Sep 25, 2020 at 01:33:24PM +0100, Chris Green wrote:
> > Just to report success.  It all appears to be working as I want with
> > 'real' directories for my mail hierarchy.
> 
> Glad to hear it.
> 
> > It was basically quite simple to do, mostly using 'find', first to
> > create a copy of my old mbox directory hierarchy and then to run mb2md
> > against each mbox to the required destination in the new hierarchy.
> > 
> > Obviously there were a few changes to my muttrc to tell mutt to create
> > maildir rather than mbox and the delivery/filter program run by
> > .forward has to create maildir mails rather than mbox ones (which
> > makes it a lot simpler of course).
> 
> 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.

-- 
Chris Green
#
#
# 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
#
# The mutt aliases are the 'Name' in the first column, mail to the 'Name' will 
# be sent to the "To/CC matching string". Where there is more than one entry
# with the same name then mutt will send to the last one so the preferred E-Mail
# address should always be the last entry (see alug and ixion for examples).
#
# Any mail received which has a To: or Cc: which matches the "To/CC matching 
string"
# will be put in a mailbox 'Name' in directory 'Dir' under ~/Mail.  There can 
(as
# noted above) be more than one entry with the same name in the first column, 
this 
# allows E-Mail from different addresses to be delivered to the same mbox.  
Note also
# that xubuntu-us...@lists.ubuntu.com has to precede 
ubuntu-us...@lists.ubuntu.com as
# otherwise the xubuntu mails get caught by ubuntu.
#
# The fourth column (if present) is a string to be stripped from the Subject: 
line
# of messages to the corresponding list.  The string is expected to be 
surrounded
# by [].  It's also used as a 'list' match in some cases where the To: and Cc:
# fields aren't related to the list.
#
# The fifth column (if present) is an additional matching parameter to be 
matched
# as well as the To/CC destination address.  This allows Ipswich Freegle 
messages
# to be split into separate mbox destinations.  The ifc destination mbox is 
where
# a message without offer, received, taken or wanted in the Subject: will go.
#
# The c...@isbd.net entry means that replies to subscription requests etc. will 
end up
# in a 'list' folder so that my confirmation does come from c...@isbd.net.  
(I'm not
# sure that this actually works)
#
# Name          Dir     To/CC matching string                   Strip from 
subject
alug            Li      annou...@lists.alug.org.uk              ALUG
alug            Li      m...@lists.alug.org.uk                  ALUG
audacity        Li      audacity-us...@lists.sourceforge.net    Audacity-users
baa-rag         Li      baa-...@yahoogroups.com                 bba-rag
bbb             Li      beagleb...@googlegroups.com
BHS             Li      bhs-suff...@yahoogroups.co.uk           BHS-Suffolk
cheddar         Li      cheddar-us...@lists.halon.org.uk
digikam         Li      digikam-us...@kde.org                   Digikam-users
digitemp        Li      digit...@googlegroups.com
dnsmasq         Li      dnsmasq-disc...@lists.thekelleys.org.uk Dnsmasq-discuss
dnsmasq         Li      dnsmasq-disc...@thekelleys.org.uk       Dnsmasq-discuss
docutils        Li      docutils-us...@lists.sourceforge.net    Docutils-users
dokuwiki        Li      dokuw...@freelists.org                  dokuwiki
EKS             Li      e...@yahoogroups.com
ex-vidus        Li      ex-vi...@googlegroups.com
fail2ban        Li      fail2ban-us...@lists.sourceforge.net
geda            Li      geda-u...@delorie.com 
glabels         Li      glabels-de...@lists.sourceforge.net
gnome-db        Li      gnome-db-l...@gnome.org
gnucash         Li      gnucash-u...@lists.gnucash.org          GNC
gnucash         Li      gnucash-u...@gnucash.org
grub            Li      help-g...@gnu.org
ixion           Li      ix...@ixiemaster.ixion.org.uk
ixion           Li      ix...@ixion.org.uk
kurviger        Li      kurvi...@googlegroups.com
leafnode        Li      leafnode-l...@dt.e-technik.tu-dortmund.de leafnode-list
mercurial       Li      mercur...@mercurial-scm.org
mutt            Li      mutt-users@mutt.org
owfs            Li      owfs-develop...@lists.sourceforge.net   Owfs-developers
photini         Li      phot...@googlegroups.com
postfix         Li      postfix-us...@postfix.org
# raid            Li      linux-r...@vger.kernel.org
snaffle         Li      snaf...@yahoogroups.com
sqlkit          Li      sql...@googlegroups.com
starbase        Li      starbase-...@yahoogroups.com            starbase-dev
starbase        Li      starbase-...@groups.io
syncthing       Li      nore...@syncthing.net                   "Syncthing 
Forum"
teams           Li      dokuwiki-te...@freelists.org            dokuwiki-teams
tin-users       Li      tin-us...@tin.org
xubuntu         Li      xubuntu-us...@lists.ubuntu.com          xubuntu-users
ubuntu          Li      ubuntu-us...@lists.ubuntu.com
uk-r            Li      uk-rid...@the-hug.net                   uk-riders
UKRAA-insts     Li      ukraa-instrume...@yahoogroups.com       
UKRAA-instruments
vbox            Li      vbox-users-commun...@lists.sourceforge.net      
VBox-users
vile            Li      v...@nongnu.org
wxformbuilder   Li      wxformbuilder-de...@lists.sourceforge.net
x2go            Li      x2go-u...@lists.x2go.org
xfce            Li      x...@xfce.org
yad             Li      yad-com...@googlegroups.com
#
#
# Ipswich Freegle (Freecycle) need special handling as the list address isn't 
in To: or Cc:
# ifcoffer, ifcreceived, ifctaken and ifcwanted are for mails from the list, 
ifc is for
# sending to the list.
#
ifcoffer        Li      ilovefreegle.org                        "Ipswich 
Recycle"
ifcreceived     Ju      ilovefreegle.org                        "Ipswich 
Recycle"
ifctaken        Ju      ilovefreegle.org                        "Ipswich 
Recycle"
ifcwanted       Li      ilovefreegle.org                        "Ipswich 
Recycle"
ifc             Li      ipswichrecy...@groups.ilovefreegle.org
ifccafe         Li      ipswichrecyclec...@yahoogroups.com
ifcmods         Li      ipswichrecycle-ow...@yahoogroups.com
#
#
# Put this 'pseudo-list' after the rest so real lists have precedence in the 
search
#
cl              Li      c...@isbd.net
#
#
# Other lists that I'm subscribed to but read via the gmane NNTP interface
#
canals          Ju      canals-l...@yahoogroups.com             canals-list
sqlite          Ju      sqlite-us...@sqlite.org                 sqlite
web2py          Ju      web...@googlegroups.com                 web2py
#
#
# Non-mailing-list mail, this delivers my mail to mbox files in In, or unwanted 
stuff to junk.
# odin, linkedin and twitter have to be before inbox as they have 'chris' in 
the mail address field.
# The odin entry is to catch all the mail errors that the BBB on Odin sends 
when the WiFi
# connection goes down
#
linkedin        Ju      linkedin.ch...@isbd.co.uk
twitter         Ju      twitter.ch...@isbd.co.uk
odin            Ju      ch...@odin.zbmc.be
bcs             In      bcs
inbox           In      chris
inbox           In      chrisisbd
tinnews         Ju      tinnews

Reply via email to