On Mon, Jul 20, 2009 at 09:55:42AM -0400, Tim Gray wrote:
> On Sun 19, Jul'09 at 10:03 PM -0600, lee wrote:
>>> 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"?
>
> The command in your muttrc ends up looking like "mailboxes +mailbox1  
> +mailbox2", which is the syntax mutt wants.

Oh. I was trying the script from the command line just to see what it
would do, and it didn't produce any output. It seems the script fills
a variable it uses. I'm wondering how mutt knows that it needs to take
its information from this variable.

BTW, I ended up making a list for the MUA I was trying out. I cleaned
things up and found I got 173 maildirs. I converted the list so that
mutt can use it. Now things would be a lot easier to find if mutt had
a hierarchical display for the mailfolders. I hope I can at least turn
off the sorting, but I haven't looked into that yet.

>> 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.
>
> Well, it was a quick script I wrote for *my* purposes.

Sorry, I didn't mean to complain. Don't get me wrong, I was only
trying to explain what a script would need to do.

Maybe I should try to write one, could be fun.

> If you run mboxes instead of maildirs, you'd want to look for files
> and ignore directories, instead of vice-versa.

Yeah --- but it's only that I have an old mbox file or two around from
before I switched to maildir. The first MUA I tried on Linux was pine
... I think I also tried elm, but I wasn't happy with them. Then I
found out that there's mutt. That must have been around 1993--1995.

Thanks to mutt, I've never lost a mail. It has always been
reliable. That's awesome work the developers are doing. Thanks!

> Furthermore, I believe for a technically correct maildir structure, you  
> shouldn't have subdirectories in that top level folder.  See:
> <http://wiki.mutt.org/?MuttFaq/Maildir>

Ah, I have what they show under point "2. custom layout of separate
Maildirs", the bottom version. When cleaning up, I found a directory
that was a maildir but contained other maildirs instead of mails, so I
changed that. Having maildirs that also contain other maildirs or
directories isn't a good idea.

> I wanted to keep my mail compatible with an IMAP server if I so chose, so 
> I am using the #1 suggestion in the link.  So I have 'subfolders' named 
> like so:
> work.misc
> work.proj1

Hm. Does it really matter? When you transfer the mail to IMAP, how do
you create the folders on the IMAP server?

>> 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.
>
> See above.  Not an issue in my case.  Feel free to modify the code to 
> suit your purposes.  If you have a limited number of folders, you could 
> always just call the code multiple times:

Thanks! But I don't know python --- I might try where I get to with a
bash script, maybe using find ... But now that I have the list, I
could try to keep them up to date.

Reply via email to