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
33
votes
1 answer

How to Handle Refresh Token When Multiple Requests are going out?

I am using reactjs, mbox and axios and ran into a problem. I have a api that gives out an access token and a refresh token. The access token dies every 20mins and when this happens the server sends a 401 back and my code will automatically send the…
chobo2
  • 83,322
  • 195
  • 530
  • 832
20
votes
2 answers

Reading the mail content of an mbox file using python mailbox

I am trying to print the content of the mail ( Mail body) using Python mailbox. import mailbox mbox = mailbox.mbox('Inbox') i=1 for message in mbox: print i print "from :",message['from'] print "subject:",message['subject'] print…
Technopolice
  • 467
  • 2
  • 5
  • 12
17
votes
1 answer

Parsing mbox files in Python

Python newbie here. I want to walk through a large mbox file, parsing email messages. I can do that with: import sys import mailbox def gen_summary(filename): mbox = mailbox.mbox(filename) for message in mbox: subj =…
Mark Fletcher
  • 701
  • 1
  • 14
  • 36
16
votes
2 answers

Extracting the body of an email from mbox file, decoding it to plain text regardless of Charset and Content Transfer Encoding

I am trying to use Python 3 to extract the body of email messages from a thunderbird mbox file. It is an IMAP account. I would like to have the text part of the body of the email available to process as a unicode string. It should 'look like' the…
DCB
  • 531
  • 1
  • 3
  • 9
13
votes
4 answers

How to split an mbox file into n-MB big chunks using the terminal?

So I've read through this question on SO but it does not quite help me any. I want to import a Gmail generated mbox file into another webmail service, but the problem is it only allows 40 MB huge files per import. So I somehow have to split the mbox…
Alex
  • 9,911
  • 5
  • 33
  • 52
12
votes
2 answers

Read a big .mbox file with Python

I'd like to read a big 3GB .mbox file coming from a Gmail backup. This works: import mailbox mbox = mailbox.mbox(r"D:\All mail Including Spam and Trash.mbox") for i, message in enumerate(mbox): print("from :",message['from']) …
Basj
  • 41,386
  • 99
  • 383
  • 673
11
votes
1 answer

LaTeX: Finding width of a given text and adding a horizontal space of that width

I would like to add a white space of exactly the width of a given text. I could use \hspace{}, but then I need the width that given piece of text is going to use in my LaTeX document. Another idea is to create an invisible box containing the text.…
Björn Marschollek
  • 9,899
  • 9
  • 40
  • 66
11
votes
3 answers

Convert Maildir to mbox

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…
Cybercampbell
  • 2,486
  • 11
  • 48
  • 75
8
votes
3 answers

How to split mailbox into single file per message?

I'd like to split my inbox into separate files (one file per one message) by bash command, or may be simple program in Java. How can I do it? WBR, Thanx.
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
7
votes
3 answers

How can I reorder an mbox file chronologically?

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

Large sample mbox file for testing purposes

For developing a mail client I need a very large mbox test file containing as many mails as possible. Preferably >100.000 mails (>10GB). It should be realistic mail data since I don't only want to test performance but also mail filters and…
pintpint
  • 321
  • 1
  • 3
  • 5
6
votes
1 answer

git-am with mailbox patch fails when it contains a cover letter

When running git-am to apply a patch series I had saved into an mbox file from a mailing list, if the mbox also contains the cover letter (otherwise known as PATCH [0/N]), it complains as follows: 128 git … am --3way ~/patches/sample.mbox Patch is…
Larunbe
  • 61
  • 2
5
votes
3 answers

Mime4j: DefaultMessageBuilder fails to parse mbox content

I've downloaded mime4j 0.8.0 snapshot from subversion and built it with maven. The relevant jars I generated can be found here. Now I try to parse a toy mbox file from mime4j test. I use this sample code. Briefly: final File mbox = new…
zvisofer
  • 1,346
  • 18
  • 41
4
votes
4 answers

Reading an mbox file in C#

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…
Sonia David
4
votes
1 answer

Reading mail from mbox folder using python

I want to read mails from a mbox file and do some action based on that. I don't want to write/modify the mbox file but it will be modified by another process (Mostly adding new mails). I am reading this documentation.…
balki
  • 26,394
  • 30
  • 105
  • 151
1
2 3 4 5 6 7 8