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 [email protected] has to precede [email protected] 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 [email protected] entry means that replies to subscription requests etc. will end up # in a 'list' folder so that my confirmation does come from [email protected]. (I'm not # sure that this actually works) # # Name Dir To/CC matching string Strip from subject alug Li [email protected] ALUG alug Li [email protected] ALUG audacity Li [email protected] Audacity-users baa-rag Li [email protected] bba-rag bbb Li [email protected] BHS Li [email protected] BHS-Suffolk cheddar Li [email protected] digikam Li [email protected] Digikam-users digitemp Li [email protected] dnsmasq Li [email protected] Dnsmasq-discuss dnsmasq Li [email protected] Dnsmasq-discuss docutils Li [email protected] Docutils-users dokuwiki Li [email protected] dokuwiki EKS Li [email protected] ex-vidus Li [email protected] fail2ban Li [email protected] geda Li [email protected] glabels Li [email protected] gnome-db Li [email protected] gnucash Li [email protected] GNC gnucash Li [email protected] grub Li [email protected] ixion Li [email protected] ixion Li [email protected] kurviger Li [email protected] leafnode Li [email protected] leafnode-list mercurial Li [email protected] mutt Li [email protected] owfs Li [email protected] Owfs-developers photini Li [email protected] postfix Li [email protected] # raid Li [email protected] snaffle Li [email protected] sqlkit Li [email protected] starbase Li [email protected] starbase-dev starbase Li [email protected] syncthing Li [email protected] "Syncthing Forum" teams Li [email protected] dokuwiki-teams tin-users Li [email protected] xubuntu Li [email protected] xubuntu-users ubuntu Li [email protected] uk-r Li [email protected] uk-riders UKRAA-insts Li [email protected] UKRAA-instruments vbox Li [email protected] VBox-users vile Li [email protected] wxformbuilder Li [email protected] x2go Li [email protected] xfce Li [email protected] yad Li [email protected] # # # 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 [email protected] ifccafe Li [email protected] ifcmods Li [email protected] # # # Put this 'pseudo-list' after the rest so real lists have precedence in the search # cl Li [email protected] # # # Other lists that I'm subscribed to but read via the gmane NNTP interface # canals Ju [email protected] canals-list sqlite Ju [email protected] sqlite web2py Ju [email protected] 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 [email protected] twitter Ju [email protected] odin Ju [email protected] bcs In bcs inbox In chris inbox In chrisisbd tinnews Ju tinnews
