Villalovos, John L
2004-Jun-02 18:11 UTC
[Dovecot] Advice on converting from Mbox to Maildir?
Does anyone have advice or pointers on good documentation on how to convert a system from using the Mbox format to using Maildir? I recently upgraded to Fedora Core 2 from Fedora Core 1 and discovered that UW-IMAP was gone. So I switched over to using Dovecot. So far so good. But I would like to convert my system to start using the Maildir format. How easy is this to accomplish? Can I keep my Inbox /var/spool/mail/user_name as an mbox format and have my other folders as Maildir? What would I have to change for Sendmail to make it use Maildir for the Inbox? Can procmail support Maildir? Any pointers or help would be much appreciated? John
David Champion
2004-Jun-02 19:00 UTC
[Dovecot] Re: Advice on converting from Mbox to Maildir?
* On 2004.06.02, in <60C14C611F1DDD4198D53F2F43D8CA3B88C75B at orsmsx410.jf.intel.com>, * "Villalovos, John L" <john.l.villalovos at intel.com> wrote:> > Can I keep my Inbox /var/spool/mail/user_name as an mbox format and have > my other folders as Maildir?I think so, but offhand I'm not sure how. I assume it's a default_mail_env setting.> What would I have to change for Sendmail to make it use Maildir for the > Inbox?Sendmail doesn't touch the inbox; it depends on the local delivery agent (LDA) to do this. If you use procmail as the LDA, this morphs into your next question:> Can procmail support Maildir?Yes. If a procmail rule specifies delivery to a mailbox whose name ends in "/", it is treated as a Maildir. If you set ORGMAIL=/var/mail/$LOGNAME/ DEFAULT=/var/mail/$LOGNAME/ (noting the ending "/") in /etc/procmailrc, you should have Maildir-format inboxes. N.B. I have not tested any of this. -- -D. dgc at uchicago.edu NSIT::ENSS No money, no book. No book, no study. No study, no pass. No pass, no graduate. No graduate, no job. No job, no money. T h e U n i v e r s i t y o f C h i c a g o
I did this recently. For converting from mbox to Maildir, check out mb2md. I converted a huge collection of folders using it. On Wed, 2004-06-02 at 11:11, Villalovos, John L wrote:> Does anyone have advice or pointers on good documentation on how to > convert a system from using the Mbox format to using Maildir? > > I recently upgraded to Fedora Core 2 from Fedora Core 1 and discovered > that UW-IMAP was gone. So I switched over to using Dovecot. So far so > good. > > But I would like to convert my system to start using the Maildir format. > > How easy is this to accomplish? > > Can I keep my Inbox /var/spool/mail/user_name as an mbox format and have > my other folders as Maildir?I -think- you can, but I chose not to.> What would I have to change for Sendmail to make it use Maildir for the > Inbox?If you have procmail as your MDA off of sendmail, then sendmail doesn't need to be touched.> Can procmail support Maildir?I'm using the procmails that come with RHEL3 and FC2 for Maildir folders without any problem. The only trouble I experienced during the conversion was when I tried to move a huge folder using evolution. Evolution got confused near the end, and I'd been accepting new mail into the target folder, so I had a bit of a mess. I wound up moving stuff a second time using the command line, and eliminating duplicate messages using my sequivs program.> Any pointers or help would be much appreciated? > > John-- Dan Stromberg DCS/NACS/UCI <strombrg at dcs.nac.uci.edu> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040602/1ab5df78/attachment-0001.bin>
On Wed, 2004-06-02 at 21:11, Villalovos, John L wrote:> Can I keep my Inbox /var/spool/mail/user_name as an mbox format and have > my other folders as Maildir?Not with 0.99.10. With 1.0-tests it's possible by defining multiple namespaces. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040602/ad307334/attachment-0001.bin>
David Champion
2004-Jun-02 20:07 UTC
[Dovecot] Re: Advice on converting from Mbox to Maildir?
* On 2004.06.02, in <1086204944.24881.158.camel at tesuji.nac.uci.edu>, * "Dan Stromberg" <strombrg at dcs.nac.uci.edu> wrote:> > I did this recently. > > For converting from mbox to Maildir, check out mb2md. I converted a > huge collection of folders using it.Ah, I meant to address that too. Since procmail supports Maildir, you can also convert with procmail. It's probably slower to do so than with any dedicated conversion utility, but it uses a smaller and consistent set of tools. Here's a shell script. It doesn't address permissions or ownerships, and it doesn't delete the mbox folder. #!/bin/sh test -n "$1" || exit 5 convert () { MBOX="$1"; export MBOX mv "$MBOX" "$MBOX.mbox" mkdir "$MBOX" formail < "$MBOX" -s procmail "$pmrc" # rm -f "$MBOX" } pmrc=${TMPDIR-/tmp}/`basename $0`.pmrc cat <<'PMRC' >"$pmrc" :0 $MBOX/ PMRC for folder in "$@"; do convert "$folder" done rm -f "$pmrc" N.B. This, too, is untested. -- -D. dgc at uchicago.edu NSIT::ENSS No money, no book. No book, no study. No study, no pass. No pass, no graduate. No graduate, no job. No job, no money. T h e U n i v e r s i t y o f C h i c a g o
Villalovos, John L
2004-Jun-02 20:43 UTC
[Dovecot] Advice on converting from Mbox to Maildir?
Dan Stromberg wrote:> For converting from mbox to Maildir, check out mb2md. I converted a > huge collection of folders using it.Thanks. I'll look into that.>> Can procmail support Maildir? > > I'm using the procmails that come with RHEL3 and FC2 for > Maildir folders > without any problem.So how did you setup procmail? Did you setup a /etc/procmailrc And then setup a: DEFAULT=$HOME/Maildir/ line in the file? Thanks, John
Villalovos, John L
2004-Jun-03 15:18 UTC
[Dovecot] Advice on converting from Mbox to Maildir?
To recap what I have learned :) dovecot-bounces at dovecot.org wrote:> Does anyone have advice or pointers on good documentation on how to > convert a system from using the Mbox format to using Maildir? > > I recently upgraded to Fedora Core 2 from Fedora Core 1 and discovered > that UW-IMAP was gone. So I switched over to using Dovecot. > So far so > good. > > But I would like to convert my system to start using the > Maildir format. > > How easy is this to accomplish?Fairly easy on the small system I had. I only have around 8 people using email off of my system.> Can I keep my Inbox /var/spool/mail/user_name as an mbox > format and have > my other folders as Maildir?Timo says that it is NOT available in the version that comes with Fedora Core 2. It will be available in the 1.0 series by defining multiple namespaces. The current 1.0-tests allow this.> What would I have to change for Sendmail to make it use > Maildir for the Inbox?Sendmail does NOT need to be changed.> Can procmail support Maildir?Yes and that is what you need to change. I setup /etc/procmailrc to have the line: DEFAULT=$HOME/Maildir/ Make sure there is the terminating / on that line. What this will do is make all new mail that is delivered via procmail go to each user's Maildir folder. But what you need to do first is convert your existing mbox mail into maildir format. I used the program that was recommended to me: mb2md http://batleth.sapienti-sat.org/projects/mb2md/ This program worked great to convert my /var/spool/mail/user_name stuff and also folders that I had created under ~/mail/ So now my whole system is using Maildir format. If you had a big system this might be a big pain :( John -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting Q: What is the most annoying thing on usenet and in e-mail?
Mauricio Araya V.
2004-Jun-03 21:34 UTC
[Dovecot] Advice on converting from Mbox to Maildir?
On Wed, 2004-06-02 at 12:11, Villalovos, John L wrote:> Does anyone have advice or pointers on good documentation on how to > convert a system from using the Mbox format to using Maildir?I recently had to migrate a server(sendmail) using Mbox format to a new one(postfix) using Maildir. Old accounts had a lot of IMAP folders. http://perfectmaildir.home-dn.net/ Regards, Mauricio -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 187 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040603/50d222d2/attachment-0001.bin>