At Sun, 19 Jul 2009 22:16:23 -0400,
Tim Gray wrote:
> 
> Fair enough.  Well, if you are interested, I've attached the code below 
> between the dashes.  I'm assuming you have python installed.  Save it 
> wherever you want and name it whatever you want.  If you want specific 
> folders ignored, add them in the ignore statement.
> 
> Then add the following line to your muttrc file:
> 
> mailboxes `/path/to/script/listbox.py /path/to/mail/folders`

Thanks! Doesn't that need to produce some output, or does mutt have a
way to assign the content of "dirs" from the script to "mailboxes"?

And it would require that there are exclusively maildirs in the
directory you supply as parameter to the script because it doesn't
distinguish between maildirs and directories. That's a distinction a
script needs to make.

What I have is like:


~/Mail
  ARCHIVE       # directory containing maildirs and/or files or directories
  Maildir       # that's the inbox
  lists         # directory containing maildirs
    mutt-users
    debian-user
    ...
  drafts
  spam
  trash
  Per           # directory containing maildirs and/or files or directories
    ARCHIVE     # directory containing maildirs and/or files or directories
    person-1
    person-2
    ...
  Gov           # directory containing maildirs and/or files or directories
    ...
  Com           # directory containing maildirs and/or files or directories
    ...
  file-1
  file-2
  logfile
  mboxfile
  ...


A script to automatically set up the mailboxes would have to check all
directories under ~/Mail and create mailbox statements for only those
that are maildirs.

Reply via email to