On Sat, Sep 22, 2012 at 07:14:41PM +0100, Jamie Paul Griffin wrote:
> Date: Sat, 22 Sep 2012 19:14:41 +0100
> From: Jamie Paul Griffin <[email protected]>
> To: [email protected]
> Subject: Re: mbox to maildir with mb2md and mutt
> User-Agent: Mutt/1.5.21 (2010-09-15)
> 
 
> 1 - Have you 'thoroughly' read the man page for mb2md
I read, but perhaps I didn't understand everything ...

> 2 - what is the output of ls -a ~/Maildir

.                    .DEB.X08.yFy_gz      .DEB.Y07.xMz_gz   .MUTT.2008.vMAIz    
   .MUTT.2011.mutt-03-11      .OUTBOX.2011.outbox-01-11
..                   .DEB.X08.yFz_gz      .DEB.Y07.yFz_gz   .MUTT.2008.wAVz     
   .MUTT.2011.mutt-04-11      .OUTBOX.2011.outbox-02-11
.abouvrages          .DEB.X08.zJy_gz      .DEB.Y07.zJy_gz   .MUTT.2008.xMRz     
   .MUTT.2011.mutt-05-11      .OUTBOX.2011.outbox-03-11
.ACHATnet            .DEB.X08.zJz_gz      .DPN              .MUTT.2008.yFy      
   .MUTT.2011.mutt-06-11      .OUTBOX.2011.outbox-05-11
.ACHATnet.camera     .DEB.Y07             .ecoatterre       .MUTT.2008.yFz      
   .MUTT.2011.mutt-07-11      .OUTBOX.2011.outbox-06-11
.ACHATnet.caravan    .DEB.Y07.material    .EDF              .MUTT.2008.zJAz     
   .MUTT.2011.mutt-08-11      .OUTBOX.2011.outbox-07-11
.ANGLAIS             .DEB.Y07.oDECx       .emergency-inbox  .MUTT.2009          
   .MUTT.2011.mutt-09-11      .OUTBOX.2011.outbox-09-11
.ATUTU               .DEB.Y07.oDECy       .FGR              .MUTT.2009.rDECz    
   .MUTT.2011.mutt-10-11      .OUTBOX.2011.outbox-10-11
.BUG                 .DEB.Y07.oDECz       .FREE             .MUTT.2009.rNOVz    
   .MUTT.2011.mutt-11-11      .OUTBOX.2011.outbox-12-11
.clisp               .DEB.Y07.pNOVy_gz    .GNUTELLA         .MUTT.2009.rOCTz    
   .MUTT.2011.mutt-12-11      .OUTBOX.2012
.clubMGEN            .DEB.Y07.pNOVz_gz    .GPbonnueil       .MUTT.2009.rSEPTz   
   .MUTT.2012                 .OUTBOX.2012.outbox-01-12
.COURRIER            .DEB.Y07.prog        .GROSFIHC         .MUTT.2009.sAOUTz   
   .MUTT.2012.mutt-01-12      .OUTBOX.2012.outbox-02-12
.COURRIER.amisjp     .DEB.Y07.prog.perl   .LACENTRALE       .MUTT.2009.tJUIz    
   .MUTT.2012.mutt-02-12      .OUTBOX.2012.outbox-03-12
.COURRIER.felicite   .DEB.Y07.prog.shell  .LangC            .MUTT.2009.uJUNz    
   .MUTT.2012.mutt-03-12      .OUTBOX.2012.outbox-04-12
.COURRIER.gerard     .DEB.Y07.qOCTx_gz    .laptop           .MUTT.2009.vMAIz    
   .MUTT.2012.mutt-04-12      .OUTBOX.2012.outbox-05-12
.COURRIER.kim        .DEB.Y07.qOCTy_gz    .LAPTOP           .MUTT.2009.wAVRz    
   .MUTT.2012.mutt-05-12      .OUTBOX.2012.outbox-06-12
.COURRIER.nelson     .DEB.Y07.qOCTz_gz    .LAPTOP.zJ        .MUTT.2009.xMARz    
   .MUTT.2012.mutt-06-12      .OUTBOX.2012.outbox-07-12
cur                  .DEB.Y07.rSEPz_gz    .MAIF             .MUTT.2009.yFz      
   .MUTT.2012.mutt-07-12      .OUTBOX.2012.outbox-08-12
.DEB                 .DEB.Y07.sAOw_gz     .mbox             .MUTT.2009.zJz      
   .MUTT.2012.mutt-08-12      .OUTBOX.2012.outbox-09-12
.DEB.X08             .DEB.Y07.sAOx_gz     MUTT              .MUTT.2010          
   .MUTT.2012.mutt-09-12      .OUTBOX.outbox
.DEB.X08.prog        .DEB.Y07.sAOy_gz     .MUTT             
.MUTT.2010.mutt-01-10  new                        .OUTBOX.outbox4_bz2
.DEB.X08.prog.shell  .DEB.Y07.sAOz_gz     .MUTT.2007        
.MUTT.2010.mutt-02-10  .NNX                       .OUTBOX.outbox_bz2
.DEB.X08.rSy         .DEB.Y07.tJIy_gz     .MUTT.2007.yDz    
.MUTT.2010.mutt-03-10  .OUTBOX                    .postponed
.DEB.X08.rSz         .DEB.Y07.tJIz_gz     .MUTT.2007.zNz    
.MUTT.2010.mutt-07-10  .OUTBOX.2007               .procmail.log
.DEB.X08.sAOy        .DEB.Y07.uJNy_gz     .MUTT.2008        
.MUTT.2010.mutt-08-10  .OUTBOX.2007.outbox-01-07  .RACHIS
.DEB.X08.sAOz        .DEB.Y07.uJNz        .MUTT.2008.oNz    
.MUTT.2010.mutt-09-10  .OUTBOX.2007.outbox-02-07  .sbcl
.DEB.X08.tJTz        .DEB.Y07.vMIy_gz     .MUTT.2008.pNz    
.MUTT.2010.mutt-10-10  .OUTBOX.2010               .SNES
.DEB.X08.uJNz        .DEB.Y07.vMIz_gz     .MUTT.2008.qOz    
.MUTT.2010.mutt-11-10  .OUTBOX.2010.outbox-09-10  tmp
.DEB.X08.vMAIz       .DEB.Y07.wAVy_gz     .MUTT.2008.rSz    
.MUTT.2010.mutt-12-10  .OUTBOX.2010.outbox-10-10
.DEB.X08.wAVy        .DEB.Y07.wAVz_gz     .MUTT.2008.sAOz   .MUTT.2011          
   .OUTBOX.2010.outbox-11-10
.DEB.X08.wAVz        .DEB.Y07.xMx_gz      .MUTT.2008.tJTz   
.MUTT.2011.mutt-01-11  .OUTBOX.2010.outbox-12-10
.DEB.X08.xMz         .DEB.Y07.xMy_gz      .MUTT.2008.uJNz   
.MUTT.2011.mutt-02-11  .OUTBOX.2011


> 3 - what was the command you used to create the Maildirs with mb2md

 mb2md -s ~/Mail -R 

> 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. 
I did not do "mb2md -m" because my /var/mail/$user is empty; my .procmailrc is 
like this:

PATH=$HOME/bin:/usr/bin:/bin:.

# For system mbox
# MAILDIR=$HOME/Mail
# DEFAULT=$MAILDIR/mbox

# For system maildir
MAILDIR=$HOME/Maildir   # You would better make sure it exists
DEFAULT=$MAILDIR/.mbox
LOGFILE=$MAILDIR/.procmail.log
LOCKFILE=$HOME/.lockmail
ORGMAIL=$MAILDIR/.emergency-inbox
..................................

So I did: mb2md-s ~/Mail/mbox  -d ~/Maildir, instead of mb2md -m

> If you have mail in mbox format localted at ~/Mail you then should run:
> 
> mb2md -s ~/Mail -R
Yes I did that.
> 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 your
> /var/[spool]/mail/$user mbox. $folder should be ~/Maildir; $spoolfile should 
> be ~/Maildir/;

Yes and now with : set spoolfile="~/Maildir/" when I run mutt, I see my
last messages non sorted by procmail and if I press the keys c and ? I see 
the contents of ~/Maildir. But there is yet a problem : if I come back to 
the parent directory .. and put the cursor on Maildir and I press Enter 
I see my last mails (which are in ~/Maildir/.mbox/cur) ok, but now c and ? gives
me the content of /home/$user ! I can't access the contents of ~/Maildir    
except by giving the path /home/$user/Maildir :(
I don't understand the origin of the problem ?

> $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.

Yes I will do that to create the tree structure of ~/Maildir which suits me.
But should I put a dot before the directories's name as does mb2md ?
(sorry in my previous post I wrote "point" instead of dot) 

Thank you very much for the time you spent to understand my problem.

-- 
Gérard

Reply via email to