Git Product home page Git Product logo

gmail-mbox-stats's Introduction

gmail-mbox-stats

npm version PRs Welcome

gmail-mbox-stats is a very simple tool to analyze your Gmail mailbox.

  • Find the senders which sent you most mails.
  • Find the receivers where you sent most mails.

  • Find the domains (@gmail.com, @live.com ...) which appear mostly in sender addresses.
  • Find the receivers where other senders (where sender is not you) sent most mails.

  • Find the addresses which are most often placed in CC by you.
  • Find the addresses which are most often placed in CC by others.

  • Find the addresses which are most often placed in BCC by you.
  • Find the addresses which are most often placed in BCC by others.

  • And more.


Video instruction:



Textual instruction:

  • Download Gmail data from Google Takeout (Preferably select 'Include all messages in Mail', it will include all mail, not just Inbox or just Sent/Spam/Archive/Trash). If your mailbox has 100K mails, the downloaded data can be 10 GB or more. So, be ready to deal with a large file. If it is too large, it may not be a single archive file, but multipart archive files, like split-files of ZIP.

  • Extract MBOX file from the Gmail data file(s).

  • Make sure you have installed NodeJS. It is available for Windows, Mac and also Linux.

  • Open terminal (preferably in the same folder where MBOX file is located) - in Windows/Mac/Linux. For Windows, the terminal should be PowerShell, not CMD.

  • run a command with this syntax:
    npx gmail-mbox-stats mymail="<your email address>" mboxpath="<mbox file path>"

    for example:
    npx gmail-mbox-stats mymail="[email protected]" mboxpath="./All mail Including Spam and Trash.mbox"
    the notation ./ means to find the file All mail Including Spam and Trash.mbox in the current folder of the terminal.









That's it.
Now just see the results:








It will take probably 5-10-15 seconds to analyze 1000 mails (messages),
about 100 seconds for 10K mails,
about 1000 seconds (10-15-20 minutes) for 100K mails and so on.

  • When it finishes, the terminal will log basic information like this:
Success.
Full count of messages: 14577
Messages where sender is me: 425
Messages where sender is not me: 14147
Messages where sender is hidden: 2
Messages where sender is empty: 3

Created new folder "mailStats_2024-04-14_23-50-21"


Start datetime: 2024-04-14_23-50-21
->End datetime: 2024-04-14_23-51-54

Full Execution Time: 1:32.222 (m:ss.mmm)


gmail-mbox-stats v1.0.11
Created by leodevbro (Levan Katsadze)
* linkedin.com/in/leodevbro
* github.com/leodevbro
* facebook.com/leodevbro

If you feel like donating
* buymeacoffee.com/leodevbro
* ko-fi.com/leodevbro
  • Also, there will be a new folder named "mailStats" with execution start datetime,
    like this: mailStats_2024-04-14_23-50-21
    in the same folder where the MBOX file is located.

  • In the 'mailStats' folder, there will be generalStats.csv file. If you import it in Google Sheets it will look like this:


Example generalStats CSV In Google Sheets


  • In the 'mailStats' folder, there will be also two folders:
    forMailsWhereSenderIsMe - the stats for only the mails where sender is you.
    forMailsWhereSenderIsNotMeOrIsUnknown - the stats for only the mails where sender is not you, or sender is unknown.
    In both folders, there will be .csv files of stats. You can import them one by one in Google Sheets.

Here is what the full folder structure looks like:

▨All mail Including Spam and Trash.mbox

📂mailStats_2024-04-14_23-50-21
    ▦generalStats.csv

    📂forMailsWhereSenderIsMe
        ▦me_freqBcc.csv
        ▦me_FreqCc.csv
        ▦me_FreqReceiver.csv --- Here you can find the receivers where you sent most mails
        ▦me_FreqSender.csv
        ▦me_freqSenderDomain.csv
        ▦me_freqSenderPlusName.csv

    📂forMailsWhereSenderIsNotMeOrIsUnknown
        ▦notMeOrUnkn_freqBcc.csv
        ▦notMeOrUnkn_FreqCc.csv
        ▦notMeOrUnkn_FreqReceiver.csv
        ▦notMeOrUnkn_FreqSender.csv --- Here you can find the senders which sent most mails
        ▦notMeOrUnkn_freqSenderDomain.csv
        ▦notMeOrUnkn_freqSenderPlusName.csv


Now, for example, let's import the file notMeOrUnkn_freqSender.csv in Google Sheets:

exampleCsv__notMeOrUnkn_freqSender In Google Sheets

Also, some other files:

me_freqReceiver.csv

exampleCsv__me_freqReceiver In Google Sheets


notMeOrUnkn_freqSenderDomain.csv

exampleCsv__notMeOrUnkn_freqSenderDomain In Google Sheets


notMeOrUnkn_freqSenderPlusName.csv

exampleCsv__notMeOrUnkn_freqSenderPlusName In Google Sheets


notMeOrUnkn_freqReceiver.csv

exampleCsv__notMeOrUnkn_freqReceiver In Google Sheets


notMeOrUnkn_freqCc.csv

exampleCsv__notMeOrUnkn_freqCc In Google Sheets



Thank you.

My name is Levan Katsadze (ლევან კაცაძე), 1995-03-03, from Tbilisi, Georgia (Not USA).

facebook logo youtube logo

If you feel like donating:

Buy Me A Coffee ko-fi




gmail-mbox-stats's People

Contributors

leodevbro avatar

Stargazers

Hernán Silva avatar Chen Ye avatar Temuri avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.