mbox to maildir conversion

Damien Elmes clug at repose.cx
Thu Jan 9 21:21:47 EST 2003


Michael Still <mikal at stillhq.com> writes:

> So,
>
> it's going to happen finally, I'm moving from pine to something else
> (mutt, emacs, who knows?). I also want maildirs along the way.
>
> I'm a little confused on what is the best way to convert my several gig
> of mboxes to maildirs. There seem to be lots of home grown perl scripts
> out there. Do people have a favourite?

Just keep it all backed up long enough to tell, and it doesn't really matter
;-) Probably one of the easiest available solutions is to set procmail up
with maildirs, and then just use 'formail' (which comes with procmail) to
feed the mboxes into procmail. Then you could also split it up into different
folders at the same time.

> Also, is there a recommended number of files per directory? How do people
> roll these folders over when they get too big?

I use gnus in emacs (http://damien.kangaweb.com/shots/emacs.png), which is
probably one of the most powerful email clients you'll ever find.

Taken from http://emacswiki.org/cgi-bin/wiki.pl?GnusNiftyTricks:

 ((expiry-wait . 30)
  (expiry-target . "nnml:old.clug")
  (total-expire . t)
  (gcc-self . t)
  (to-address . "CLUG <linux at samba.org>")
  (posting-style
   (from "Damien Elmes <clug at repose.cx>")))

Basically says "move all articles older than 30 days into old.clug (from
mail.clug), and don't prompt me (this happens every time you exit a group, so
just a little mail is moved each day). Don't add gcc headers for this group
because I'll get the response back on the list anyway. Set the to-address so
that replies will only go to the list and not to the people who sent them, and
change my identity so I can track spam.

If you wanted to get more complicated, people have lisp snippits that split by 
month, but I find it easier to search through a giant "old" folder for the
lower traffic lists. 

Regards,
-- 
Damien Elmes



More information about the linux mailing list