npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gmail-mbox-stats

v1.2.3

Published

Nice tool to analyze Gmail MBOX file

Downloads

194

Readme

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 senders with largest total size (MB) of attachments.
  • Find the receivers where you sent mails with largest total size (MB) of attachments.
  • 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.

Quick intro of the CSV result files

Quick intro of the CSV result files

Video instruction:

  • Main Tutorial (gmail-mbox-stats)
  • Detailed explanation (gmail-mbox-stats)
  • Old method (Apps Script method) - Not recommended, because NodeJS (gmail-mbox-stats) method is much faster and more stable. The "Apps Script" method does not use the gmail-mbox-stats software at all.

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.

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: 18686

Messages where sender is --> me: 495
                                 Count of mails with at least one attachment: 148
                                 Total count of attachments: 231
                                 Total size of attachments: 120.800749 MB => Million Bytes
                                 Unique sender addresses: 1
                                 Unique sender domains: 1
                                 Unique receiver addresses: 285

Messages where sender is not me: 18191
                                 Count of mails with at least one attachment: 850
                                 Total count of attachments: 2409
                                 Total size of attachments: 231.40515899999997 MB => Million Bytes
                                 Unique sender addresses: 1473
                                 Unique sender domains: 804
                                 Unique receiver addresses: 94


Created new folder "mailStats_2024-11-15_21-28-13"


Start datetime: 2024-11-15_21-28-13
->End datetime: 2024-11-15_21-30-13

Full Execution Time: 2:00.411 (m:ss.mmm)


gmail-mbox-stats v1.2.3
Created by leodevbro (Levan Katsadze)
* [email protected]
* 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-11-15_21-28-13 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-11-15_21-28-13
    ▦ generalStats.csv

    📂 forMailsWhereSenderIsMe
        ▦ me_attachmSizeReceiver.csv
        ▦ me_attachmSizeSender.csv
        ▦ me_attachmSizeSenderDomain.csv
        ▦ 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_attachmSizeReceiver.csv
        ▦ notMeOrUnkn_attachmSizeSender.csv
        ▦ notMeOrUnkn_attachmSizeSenderDomain.csv
        ▦ 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

If you feel like donating: