[MlMt] Submailbox string format (or, string format modifiers in general)

Joe Abley jabley at hopcount.ca
Tue Apr 28 11:55:30 EDT 2015


Hi all,

Apologies if this is a repeated question (I did search the archives, 
but, full disclosure, I didn't search very hard).

I subscribe to a lot of mailing lists.

I have a smart mailbox set up as:

  - all messages
  - here the List-Id header exists
  - submailbox for each unique value of list-id -> identifier
  - mailbox name format ${list-id.identifier}

This gives me subfolders like

   89all.ietf.org
   92all.ietf.org
   afnog.afnog.org
   dbound.ietf.org
   dns-wg.ripe.net
   dnsop.ietf.org

which is great, except that I'd really like the sort order to group 
things differently. I'd like to see

   net.ripe.dns-wg
   org.afnog.afnog
   org.ietf.89all
   org.ietf.92all
   org.ietf.dbound
   org.ietf.dnsop

If there was a format string modifier I could use in the mailbox name 
format like

   ${list-id.identifier:reverse-dot-labels}

or something, then I'd have exactly what I want.

Maybe I could do something similar with regular expressions and 
back-references? Note that I don't know in the general case how many 
labels are in the list-id identifier.

The format string description in the manual is a bit brief. Is there a 
way to do this?


Joe


More information about the mailmate mailing list