0

I am trying to move to mutt for mail client and am trying to have email localy. I have 2 sources of saved email:

  • the first one was obtained from the .mbox file form google: I wrote a script which extacted each email in a separated .txt file (to be able to 1. search with grep content of file 2. organize them according to years and 3. not having to parse a single 10GB+ file each time I want to access the emails).
  • the second one was obtained by saving locally the email from with neomutt application.

There are many fields which seem to be coded differently in a significant way. For example:

In the .mbox split saved file as txt, the fist line is (I think because there are several similar looking field):

From [email protected] Tue Jul 21 07:48:31 2022

Whereas in the file saved locally by mutt, the first line is as follows

From 1370888888881122222@xxx Tue Jul 21 07:48:31 +0000 2022

The email adress is actually only displayed in other fields below:

...
X-Sender: [email protected]
...
Return-path: <[email protected]>
...

Moreover the file saved by mutt appears in color in vim (as if it detects the file structure and not for for the split .txt file of the .mbox)

Here are my questions:

  1. Why those differences
  2. How do vim detects the structure difference
  3. (most importantly!:) is it possible to convert the split .txt file from the mbox in the same format as the one saved in mutt?
12
  • 1
    @MarcusMüller Thank you for your comment. I wrote that to be able to search with grep content of file and organize them according to years without having to run through the whole .mbox file. This was also before using mutt
    – ecjb
    Commented Jun 8 at 12:09
  • @MarcusMüller regarding your second comment: I probably use mutt the wrong way but when I run neomutt -f my10GB_mboxfile.mbox it takes quite a long time (10-20 seconds) to load and then when neomutt was finally done, I was not able to parse through the emails (as nothing was read)
    – ecjb
    Commented Jun 8 at 12:13
  • thanks! I see! Can't guarantee things would be faster, opening a lot of files is usually slow; performance would get better for modifications, though. Commented Jun 8 at 12:21
  • the highlighting in vim might such hinge on the file extension; have you tried renaming one of your .txt files to .mbox or .eml? Commented Jun 8 at 12:23
  • 1
    See also formail (shipped with procmail to process mailbox and mail files). Searching more effectively including by date/sender/subject/body can be done with indexers such as mairix or notmuch both of which you can easily hook into mutt. Commented Jun 8 at 15:28

0

You must log in to answer this question.

Browse other questions tagged .