mbox

How can I reformat messages in an mbox file with bash or Perl?

Hello, I have a huge mbox file, with maybe 500 emails in it. It looks like the following: From [email protected] Fri Aug 12 09:34:09 2005 Message-ID: <[email protected]> Date: Fri, 12 Aug 2005 09:34:09 +0900 From: me <[email protected]> User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 ...

How can I reorder an mbox file chronologically?

Hello, I have a single spool mbox file that was created with evolution, containing a selection of emails that I wish to print. My problem is that the emails are not placed into the mbox file chronologically. I would like to know the best way to place order the files from first to last using bash, perl or python. I would like to oder by ...

How can I sort an mbox file by date?

Hello, I would like to know how to modify the below code to strip =20 characters at the end of many lines, and mainly to sort the messages chronologically from first received or sent to last. I am not sure if this would be an internal Perl routine or not. #!/usr/bin/perl use warnings; use strict; use Mail::Box::Manager; my $file = shi...

Reading an mbox file in C#

Hi, One of our staff members has lost his mailbox but luckily has a dump of his email in mbox format. I need to somehow get all the messages inside the mbox file and squirt them into our tech support database (as its a custom tool there are no import tools available). I've found SharpMimeTools which breaks down a message but not allow ...

mbox to mysql

Hey Everyone, Has anyone come across a way to import the contents of mbox files (10 megs or so) into MySQL? Thanks, j ...

How can I get the date of an email using Perl's Mail::MboxParser::Mail?

This is a simple question. I have a little program here that reads a list of emails in a specific inbox of a user account specified by the program. I can access an account using its username, password and host. The only problem is I don't know how to get the date on each of these mails. Here's some part of my code: my $pop = new Mail::...

shell script to extract mail attachments with specific filename

I'm writing a shell script to extract mail attachments from an mbox file At the moment I use this command: cat mboxfile|formail -des munpack -qf But I'd like to embed the sender email address in the filename, something like: user@host_filename.extension Can you suggest me some tool? ...

Convert Maildir to mbox

Hi, Im changing hosts and i need to convert my maildir accounts on my old server to mbox on my new server. Any ideas on the best way to do this? I found this: for i in new/* cur/*;do formail <”$i” >> ../mbox;done But i dont really understand it. I have a basic knowledge of linux and I have root access to my server via ssh. most of t...

Zend Framework - POP3 - retrieving message source

Is it possible to retrieve the complete message source (similar tu Unix Mbox format) using Zend_Mail_Storage_Pop3 from the Zend Framework? I'm using the following code to retrieve messages: $mail = new Zend_Mail_Storage_Pop3(array('host' => 'localhost', 'user' => 'test', ...