Questions tagged [mbox]

mbox is a generic term for a family of related file formats used for holding collections of electronic mail messages

All messages in an mbox mailbox are concatenated and stored as plain text in a single file. The beginning of each message is indicated by a line whose first five characters consist of "From" followed by a space (the so named "From_ line" or "'From ' line" or simply "From line") and the sender's e-mail address. A blank line is appended to the end of each message. For a while, the mbox format was popular because text processing tools can be readily used on the plain text files used to store the e-mail messages.

(source)

110 questions
2
votes
0 answers

Reading mbox files with mbox Python module

Good afternoon, I'm working on a kind of spam filter in Python, and I've downloaded some spam and harm emails from this corpus https://spamassassin.apache.org/publiccorpus/ This is the code I made to read the mbox files import os import…
Carlos Gomez
  • 79
  • 3
  • 10
2
votes
2 answers

How can I sort an mbox file by date?

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.…
Joshxtothe4
  • 4,061
  • 10
  • 53
  • 83
2
votes
3 answers

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

I have a huge mbox file, with maybe 500 emails in it. It looks like the following: From x@blah.com Fri Aug 12 09:34:09 2005 Message-ID: <42FBEE81.9090701@blah.com> Date: Fri, 12 Aug 2005 09:34:09 +0900 From: me User-Agent: Mozilla…
Joshxtothe4
  • 4,061
  • 10
  • 53
  • 83
2
votes
2 answers

Split large mbox by sender

I 'm looking for a way to split a very large mbox file into several mbox files (one for each sender). Alternatively, to only extract the messages by a specified sender. Looking up and down the internet, but have not found any (or used the wrong…
bert
  • 7,566
  • 3
  • 31
  • 47
2
votes
1 answer

How can I maake MBOX files (Unix-style email archives) searchable via Spotlight in Mac OS X?

I have a tons of Unix-style mbox e-mail files accumulated for more than ten years, used with MH and other Unix-based mail readers. Is there any way to let MacOS Spotlight to recognize these Unix-style mail files (their filenames just consist of…
golconda
  • 71
  • 3
2
votes
0 answers

Parsing mbox file in java

I downloaded a mailing list archive from SourceForge. Mailing lists are each automatically archived to a mbox file. So now I need to extract the body from mbox file using Java. Is there a mailbox parser in Java? Thanks
user
  • 245
  • 1
  • 5
  • 13
1
vote
1 answer

Parse email to unique text

I have a large mailbox in the mbox format. It is all articles so the header info isn't to relevant (except for the date). What I want is to take my large *.mbx file and produce text files where the filename is the subject of each email and all the…
1
vote
1 answer

How to read mbox email messages using mstor

I am using mstor to read the mbox email messages, but i am not able to connect to the store using the urlName name which i m passing, by default its connecting to other location on my macbine.Do i need to create the store using mstor JCR before…
user972590
  • 251
  • 1
  • 5
  • 13
1
vote
0 answers

email in Hebrew is written in gibberish (mailbox)

I am trying to open a email that is probably written in Hebrew: print(massage.get_payload()[0].get_payload()[0].get_payload()) and the resulting text is gibberish. for example, here is a short segment out of it: =EE=E1=F7=F9=E9=ED how can I turn…
Moran Reznik
  • 1,201
  • 2
  • 11
  • 28
1
vote
0 answers

nomenclature in elsevier latex template

I got some trouble with nomenclature in Elsevier template. I followed this instruction proposed by delrocco. and now when I wrote the \nomenclature command I got nothing (the box is empty)(please see the attached file). I do not know I must use…
sara00
  • 51
  • 6
1
vote
1 answer

Navigating MimeKit.MimeParser

Is it possible to read the Nth attachment of the Mth message, from an mbox file, using MimeKit.MimeParser? In my case, I would store few messages (few fields for each msg including a list of attachments) to an in-memory data structure and after…
Velja Radenkovic
  • 716
  • 1
  • 6
  • 27
1
vote
0 answers

How to merge two mbox files using python

I have two mbox files that I need to combine, merge or concat into one mbox file. I've tried a for loop that pulls the messages into one master list but not sure if this is the best way since I now have two lists that can be combined but need a…
1
vote
0 answers

How to Convert email from MBOX to EML using Python

Is there a way to convert some MBOX files to individual EML files using Python? I have a client that downloaded his emails from GMail as MBOX collection. But I need to convert them to individual EML files so I can upload them to his new email…
Sergio
  • 792
  • 3
  • 10
  • 35
1
vote
2 answers

Access all fields in mbox using mailbox

I am attempting to perform some processing on email messages in mbox format. After searching, and a bit of trial and error tried https://docs.python.org/3/library/mailbox.html#mbox I have got this to do most of what I want (even though I had to…
Milliways
  • 1,265
  • 1
  • 12
  • 26
1
vote
0 answers

Porting mailbox code from Python 2 to Python 3 - problem with mbx.add()

I have a simple E-Mail filtering program that has been working satisfactorily in Python 2 for many years and I'm trying to convert it to Python 3. It runs OK in Python 3 as long as there aren't 'extended' (i.e. non-ASCII) characters in the message…
Chris Green
  • 141
  • 3