On (10/02/13 12:02), Tim Gray <[email protected]> put forth the 
proposition:
On Feb 10, 2013 at 02:04 PM +0000, David Woodfall wrote:
So I'm just wondering how people here cope with organising mailing
lists with Maildir and any tips/tricks that may be a better way than my present way.

I do what others have said regarding Maildir/dovecot. The 'layout=fs' option let's dovecot use file system directories as folders instead of the . separator (or something along those lines). It seems to work with no problems when I actually access my mail store through dovecot. Normally I just use mutt on the same computer that the mail is stored and it has no problems with maildir. I think I dynamically generate my mailbox list with a script that crawls through the directories and returns directories that contain "cur", "new", and "tmp".

This isn't a Maildir specific hint, but it does pertain to managing mailing lists. One thing that has helped make list management easier is a couple of simple scripts that read a text file with my subscribed mailing lists and the aliases I use for them. I then source that list from .muttrc at various points where it automatically spits out the appropriate information. For example, in my mailing_lists.txt contains the following line:

  mutt    mutt    [email protected]

I then have the following lines in .muttrc:

  source `getAliases.py > ~/.mutt/aliases-lists; echo \
      ~/.mutt/aliases-lists`
  subscribe `getLists.py`

The getAliases.py script (could easily use awk or whatever you are comfortable with) just spits out the 1st and 3rd columns of the file prefixed with 'alias', so 'alias mutt [email protected]'. I don't recall why I don't just use `source getAliases.py|`. I used to do that, but for some reason in the past switched to the line I have above.

getLists.py just spits out the 3rd column all in one line, so I get subscribed to all the list addresses I want to. I haven't bothered with the logical third step of this system, which is to write a script that uses the second column (my folder names) to generate fcc- and save-hooks for all my mailing lists dynamically, all from a single easy to edit file.

Sorry if this is a long reply - I picked up this tip from someone on this mailing list a while ago...

That's very similar to mine - I have 3 scripts at the moment. One like
yours generates the main file with alias and subscribe lines and also
recreates a .procmailrc-lists for routing. I have that bound to 'A' in
Mutt.

The other two scripts are mentioned elsewhere in this ML. One scans
all my directories looking for new mail, and then generates a
maliboxes command so I can see only those folders with new mail.

The last script just lists all my folders and generates a mailboxes
command so I can get a full view.

I bind these to <F5> and <F6> in Mutt.

It's really nice that Mutt supports scripting like this.

David

Reply via email to