Hi there,

I couldn't find any similar question.

I want to download all my gmail emails (sent + inbox) and parse each of them as they get downloaded (without storing them, I don't have enough space) and do some analysis on headers + body (not attachments).

I simply want to scrape all email addresses in each email and keep track of the most recent date I had contact with that email and count instances of that particular email address (to easily find out which addresses I contact more often). Maybe two separate counters for inbox and sent.

Bonus: being able to save the string next to the email when present. e.g. xdg@yahoo.com is actually "John Doe"

I would appreciate some high level pointers to appropriate libraries.

Please note that the key is that I can't store so many emails (not enough disk space), so the process needs to be done without storage. Load each email and then flush it from memory.

I coded in Perl around 10 years ago, so I'm quite rusty, but I hope I'll still manage.

thanks,
alfonso


In reply to Dump all my gmail emails to parse them without storing them by alfonso

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.