[NTLUG:Discuss] mbox repair util/script?

. Daniel xdesign at hotmail.com
Tue Nov 21 07:09:58 CST 2006

Gentlemen!  We have a winner!!!  "formail" is definitely the easy way to 
fix a wayward email box file.  I wasn't about to pour over a huge text file 
with a text editor to see a way to clean it up and I wouldn't expect anyone 
else to do it either.  

Following the formail man page, I did a simple <in >out operation.  It was 
quick and easy.  Whatever, if anything, was lost was negligible.

This is a good thing for anyone to file into the backs of their minds.  
Damaged mbox file?  formail can fix it without much muss or fuss.

>On Mon, Nov 20, 2006 at 09:13:15AM -0600, . Daniel wrote:
> > Well this has happened twice so far and I'm wondering why.  My wife's
> > account on my mail server has twice managed to become corrupted in some
> > way.  (The time in between the incidents is greater than a year so I'm 
> > so much worried about the cause as I am about the correction.)
> >
> > I have done a cursory search for a utility to scan and correct a 
> > mbox mail file and I am so far surprised that I haven't found any.  
> > I have been searching for the wrong terms though (in my case, I 
> > "mbox repair").  It's surprising to me because the mbox file format is 
> > so simple.  I'm sure I have overlooked something and that someone here 
> > have a recommendation right off the top of their heads.
> >
> > Anyone have a suggestion for a simple, preferably command-line 
> > utility to repair damaged mbox mailboxes?
>Perhaps formail?  From "man formail":
>        formail is a filter that can be used to force mail into mailbox 
>        perform `From ' escaping, generate  auto-replying  headers,  do  
>        header  munging/extracting  or split up a mailbox/digest/articles 
>        The mail/mailbox/article contents will be expected on stdin.
>"man formail" also says:
>        To convert a non-standard mailbox file into a standard mailbox 
file you
>        can use:
>               formail -ds <old_mailbox >>new_mailbox

あの MSN がリニューアル!さらに使いやすくなりました http://jp.msn.com/ 

More information about the Discuss mailing list