[ Gerard ROBIN wrote on Sat 22.Sep'12 at 18:11:37 +0200 ]

> Hello,
> I migrated from mbox to maildir using mb2md. Part of my mailbox (mbox) is:
> -----------------------
> ~/Mail/OUTBOX/2011/m01
> -----------------------
> ~/Mail/OUTBOX/2011/m12
> ~/Mail/OUTBOX/2012/m01
> ----------------------
> ~/Mail/OUTBOX/2012/m09
> 
> mb2md created :
> 
> ~/Maildir/.OUTBOX/cur/
> ~/Maildir/.OUTBOX/new/
> ~/Maildir/.OUTBOX/temp/
> # cur/, new/, temp/ are empty.
> 
> ~/Maildir/.OUTBOX.2011/cur/
> ~/Maildir/.OUTBOX.2011/new/
> ~/Maildir/.OUTBOX.2011/temp/
> # cur/, new/, temp/ are empty.
> 
> ~/Maildir/.OUTBOX.2011.m01/cur/1348215311.000000.mbox:2,S
> ---------------------------------------------------------
> ~/Maildir/.OUTBOX.2011.m01/cur/1348215311.0000011.mbox:2,S
> ~/Maildir/.OUTBOX.2011.m01/new
> ~/Maildir/.OUTBOX.2011.m01/temp
> 
> 1 - This tree structure is different from the initial one.
> 
> 2 - Must we necessarily have a point, before the name of directories ?
> 
> 3 - With mutt, I encounter a problem with the system "maildir", which 
>     does not occur with the system "mbox" :
>     I my .muttrc there are :
> 
>     set mbox_type=maildir
>     set folder="~/Maildir"
>     set spoolfile="~/Maildir/.mbox/"
>     set mask='!^\\.[^.]'
> 
> When I run mutt I can read the content of .mbox. If I press the keys c
> and ? I see the content of ~/Maildir But if I go to the parent directory  
> /home/user/ and I put the cursor on Maildir and press Enter, nothing appears 
> on the screen. If I press Enter I get : There are no messages.
> If I hit the keys c and ? I come back in /home/user/  and now, if I press
> the key c I get : Chdir to: /home/user/ 
> If I complete the path like : /home/user/Maildir/
> I see the content of Maildir.
> 
> Why I can't see the content of ~Maildir when I am in the directory
> /home/user and the cursor is on Maidir and I press the key Enter ?
> 
> This is the behavior of "mutt" with the mbox system.
> 
> Thanks for your help. 

1 - Have you 'thoroughly' read the man page for mb2md
2 - what is the output of ls -a ~/Maildir
3 - what was the command you used to create the Maildirs with mb2md

mb2md -m creates the directory ~/Maildir and sub-directory's {cur,new,tmp} - 
all messages in /var/[spool]/mail/$user are then seperated into files and 
placed in ~/Maildir/cur. This means that ~/Maildir is now your spoolfile. 

If you have mail in mbox format localted at ~/Mail you then should run:

mb2md -s ~/Mail -R

That will recusively create Maildirs for all directories in ~/Mail and puts 
them into ~/Maildir; ~/Maildir is the top level directory, all mboxes will 
appear in ~/Maildir as new Maildir style mail storage. 

Because you have set $spoolfile to be ~/Maildir.mbox it is not seeing the mail 
you had in you /var/[spool]/mail/$user mbox. $folder should be ~/Maildir; 
$spoolfile should be ~/Maildir/; $record should be +.OUTBOX.2012.m09, etc.. If 
you're moving mail for $spoolfile to $mbox, $mbox should be +.mbox.

Also, the program is creating Maildir++ which uses '.' as seperators for 
directory's. As you have '.'s in you mailbox names this could be confusing 
things. 

You can easily create the Maildirs manually: mkdir -p ~/Maildir/{cur,new,tmp} 
and use the same command syntax to create all the directories you need. Then 
from within mutt, using its original mbox set up, tag and copy all mail from 
each folder to the respective Maildirs now located in ~/Maildir/whatever. mutt 
will see the new directories as Maildirs and store the mail correctly (i 
believe). Someone might have to confirm that.

Jamie

Reply via email to