Networking Forums

Networking Forums > Computer Networking > Linux Networking > Maildir tools

Reply
Thread Tools Display Modes

Maildir tools

 
 
Neil Jones
Guest
Posts: n/a

 
      01-10-2009, 10:43 PM

I have lot of email in the maildir format. What tools are there to
convert it to mbox (i.e. without having to install qmail)? I am aware
of the maildir2mbox tool but I believe it is installed along with qmail.

Thank you in advance for any help.

NJ
 
Reply With Quote
 
 
 
 
Mark Wooding
Guest
Posts: n/a

 
      01-11-2009, 10:22 AM
Bruce Cook <bruce-(E-Mail Removed)> wrote:
> Neil Jones wrote:
>
> > I have lot of email in the maildir format. What tools are there to
> > convert it to mbox (i.e. without having to install qmail)? I am aware
> > of the maildir2mbox tool but I believe it is installed along with qmail.

>
> cat Maildir/cur/* >mbox_file_name
>
> Yes, it's that simple.


No, it really isn't. This fails to reconstruct the `From ' lines or to
properly screw up internal lines that begin with `From '. You will end
up with a hopelessly corrupted mbox file.

-- [mdw]
 
Reply With Quote
 
Neil Jones
Guest
Posts: n/a

 
      01-11-2009, 10:42 AM
Mark Wooding wrote:
> Bruce Cook <bruce-(E-Mail Removed)> wrote:
>> Neil Jones wrote:
>>
>>> I have lot of email in the maildir format. What tools are there to
>>> convert it to mbox (i.e. without having to install qmail)? I am aware
>>> of the maildir2mbox tool but I believe it is installed along with qmail.

>> cat Maildir/cur/* >mbox_file_name
>>
>> Yes, it's that simple.

>
> No, it really isn't. This fails to reconstruct the `From ' lines or to
> properly screw up internal lines that begin with `From '. You will end
> up with a hopelessly corrupted mbox file.
>


Thank you for replying. I ended up installing Qmail to convert the mail
for now. Once the conversion is done, I think I will switch to Postfix.

NJ

 
Reply With Quote
 
Neil Jones
Guest
Posts: n/a

 
      01-11-2009, 12:45 PM
Mark Wooding wrote:
> Bruce Cook <bruce-(E-Mail Removed)> wrote:
>> Neil Jones wrote:
>>
>>> I have lot of email in the maildir format. What tools are there to
>>> convert it to mbox (i.e. without having to install qmail)? I am aware
>>> of the maildir2mbox tool but I believe it is installed along with qmail.

>> cat Maildir/cur/* >mbox_file_name
>>
>> Yes, it's that simple.

>
> No, it really isn't. This fails to reconstruct the `From ' lines or to
> properly screw up internal lines that begin with `From '. You will end
> up with a hopelessly corrupted mbox file.
>
> -- [mdw]


There is a another small issue here. I have a lot of email (in Maildir
format) I have saved at different time on different media. Now I want
sync them without loosing any data. What is the best way to do this?
Has anyone done this before?

Thank you in advance.

NJ
 
Reply With Quote
 
David Brown
Guest
Posts: n/a

 
      01-11-2009, 04:15 PM
Neil Jones wrote:
> I have lot of email in the maildir format. What tools are there to
> convert it to mbox (i.e. without having to install qmail)? I am aware
> of the maildir2mbox tool but I believe it is installed along with qmail.
>
> Thank you in advance for any help.
>
> NJ


I'm curious - why do you want to switch to mbox format? I've been very
happy with maildir format. mbox was fine years ago, when most emails
were small and text-only - with larger emails, including attachments,
mbox format can quickly lead to very large files that are slow to use,
especially for deleting emails. maildir is generally considered to be
more robust with better scaling, and it is *much* better for backups or
replication.

mvh.,

David
 
Reply With Quote
 
Mark Wooding
Guest
Posts: n/a

 
      01-11-2009, 06:05 PM
Neil Jones <castellan2004-(E-Mail Removed)> wrote:

> There is a another small issue here. I have a lot of email (in Maildir
> format) I have saved at different time on different media. Now I want
> sync them without loosing any data. What is the best way to do this?
> Has anyone done this before?


I've not done this, 'cos I still use mbox files, but I'd have thought
that distributed version control systems (e.g., Git, Mercurial or
Bazaar) ought to do the job very well.

The main problem is that you'll get duplicates if you have several
copies of a message in different places with different flags on the
filename. I think you'll have to sort that out manually if the files
don't agree on content. (If you've got a message that's read in one
maildir and unread in another, you can probably drop the unread copy;
I'm not sure whether other flags are so easily dealt with.)

-- [mdw]
 
Reply With Quote
 
Neil Jones
Guest
Posts: n/a

 
      01-11-2009, 07:24 PM
David Brown wrote:
> Neil Jones wrote:
>> I have lot of email in the maildir format. What tools are there to
>> convert it to mbox (i.e. without having to install qmail)? I am aware
>> of the maildir2mbox tool but I believe it is installed along with qmail.
>>
>> Thank you in advance for any help.
>>
>> NJ

>
> I'm curious - why do you want to switch to mbox format? I've been very
> happy with maildir format. mbox was fine years ago, when most emails
> were small and text-only - with larger emails, including attachments,
> mbox format can quickly lead to very large files that are slow to use,
> especially for deleting emails. maildir is generally considered to be
> more robust with better scaling, and it is *much* better for backups or
> replication.
>
> mvh.,
>
> David



I agree with you on this one. One of the reason's is that I am planning
to move my email to Thunderbird on Windows. With Windows, it is
exchange or mbox format. For several years, all my email was on Linux.
My email client was also mutt (believe it or not). All this email
(old) was in Maildir format. I want to convert it to mbox and pull it
into Thunderbird on Windows. These days my email is mostly on Windows.

I use Linux more in a server capacity these days.

NJ
 
Reply With Quote
 
Neil Jones
Guest
Posts: n/a

 
      01-11-2009, 07:26 PM
Mark Wooding wrote:
> Neil Jones <castellan2004-(E-Mail Removed)> wrote:
>
>> There is a another small issue here. I have a lot of email (in Maildir
>> format) I have saved at different time on different media. Now I want
>> sync them without loosing any data. What is the best way to do this?
>> Has anyone done this before?

>
> I've not done this, 'cos I still use mbox files, but I'd have thought
> that distributed version control systems (e.g., Git, Mercurial or
> Bazaar) ought to do the job very well.
>
> The main problem is that you'll get duplicates if you have several
> copies of a message in different places with different flags on the
> filename. I think you'll have to sort that out manually if the files
> don't agree on content. (If you've got a message that's read in one
> maildir and unread in another, you can probably drop the unread copy;
> I'm not sure whether other flags are so easily dealt with.)
>
> -- [mdw]



The duplicate emails is another issue I have discovered. Is there a
unique identifier for the email? Is Message-Id an unique identifier?

I have delete the duplicates with the help of some scripting.

NJ
 
Reply With Quote
 
Mark Wooding
Guest
Posts: n/a

 
      01-11-2009, 11:07 PM
Neil Jones <castellan2004-(E-Mail Removed)> wrote:

> The duplicate emails is another issue I have discovered. Is there a
> unique identifier for the email? Is Message-Id an unique identifier?


It ought to be, when it exists -- which is most of the time. I think
I'd probably just hash the content with SHA1 or something -- after
canonifying whitespace and newlines and so on -- and be done with it,
though!

-- [mdw]
 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      01-12-2009, 01:16 AM
On Jan 10, 6:43*pm, Neil Jones <castellan2004-nsc...@remove-
this.yahoo.com> wrote:
> I have lot of email in the maildir format. *What tools are there to
> convert it to mbox (i.e. without having to install qmail)? *I am aware
> of the maildir2mbox tool but I believe it is installed along with qmail.
>
> Thank you in advance for any help.
>
> NJ


***WHY*** do you want to do this? There are tremendous benefits to
maildir format, and very little excuse in this day and age to use mbox
format with its attendant message corruption and backup problems.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS for Dual Postfix Maildir Store toniintc@gmail.com Linux Networking 0 05-28-2008 06:10 PM
tools Bill Cunningham Linux Networking 2 11-20-2007 06:54 AM
migration mailbox->maildir avlee Linux Networking 0 04-02-2007 11:02 AM
tools joseph Windows Networking 1 09-29-2005 09:01 AM
Maildir/ in /var/spool/mail/$user? (postfix) Nick E. Linux Networking 1 01-30-2004 03:11 AM



1 2 3 4 5 6 7 8 9 10 11