LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-16-2008, 04:18 AM   #1
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Rep: Reputation: 58
How to swhich from mbox to Maildir in dovecot 1.1.x and postfix


Hello, I have a setup for mail like this:

IMAP/IMAPS done by dovecot
SMTP done by postfix

The mail are retrived from /var/spool/mail/%u (%u = username)

Dovecot conf:

mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u

But I wanna switch from mbox to Maildir without losing the mails that I have already:

New Dovecot conf:

mail_location = maildir:~/Maildir

This idea works without any problems, but the old mails I dont have them anymore. Is there a possibility to "export" them or somehow to move them and to have them in the new place?

Thank you!
 
Old 10-16-2008, 05:12 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
You can convert from mbox to Maildir using mb2md.

http://www.gerg.ca/hacks/mb2md/
 
Old 10-16-2008, 05:22 AM   #3
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Original Poster
Rep: Reputation: 58
Ok that sounds good, but the old mails are in "mail" directory and they are set as "Files". For example a folder is actually a file, will this convert the files from mail/ too or just the mails from file mbox?
 
Old 10-16-2008, 05:28 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
You configure mb2md to work on all users's "folders", which are really mbox's. I've done this with gigabytes of mbox data. Just go slowly and test the results before embarking on the full run.
 
Old 10-16-2008, 05:45 AM   #5
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Original Poster
Rep: Reputation: 58
Ok! Seems to work, just its gonna be something like a bitch to do all of them. I need to do a script to do it automatically this for me, but thx anyway, it was a big help.
 
Old 10-16-2008, 05:57 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
It runs recursively, so you just specifiy essentially the user's base mail stores, of the mailq spool.
 
Old 10-16-2008, 06:17 AM   #7
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Original Poster
Rep: Reputation: 58
It doesnt really, i tried already or maybe i dont know how to use it
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mbox and Maildir sectioneight Linux - Software 4 04-06-2007 07:26 PM
mbox to maildir help wadesmart Ubuntu 5 10-31-2006 01:21 PM
postfix dovecot Maildir Danny Regan Debian 3 11-15-2005 04:08 PM
Configuring Maildir with Postfix and Dovecot umbraeOtheisles Linux - Software 0 04-16-2004 09:33 AM
maildir and mbox deflin39 Linux - Newbie 1 01-07-2004 10:08 PM


All times are GMT -5. The time now is 06:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration