[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
- On 2004.06.02, in 60C14C611F1DDD4198D53F2F43D8CA3B88C75B@orsmsx410.jf.intel.com,
- "Villalovos, John L" john.l.villalovos@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@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@dcs.nac.uci.edu
- On 2004.06.02, in 1086204944.24881.158.camel@tesuji.nac.uci.edu,
- "Dan Stromberg" strombrg@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@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
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
participants (5)
-
Dan Stromberg
-
David Champion
-
Mauricio Araya V.
-
Timo Sirainen
-
Villalovos, John L